azure storage
7 TopicsMoving files from SharePoint online to a mapped network drive
So I have been asked to move over 1,000 files from SPO to a mapped Network Drive hosted in Azure. I was looking to try and configure this using PowerShell if it's possible. I have a csv that holds the server relative URL to each file, a destination (m:\folder\folder) format, what's the best way to achieve this, PNP, Graph SDK? If anyone has done this or has a **bleep** good idea, please let me know as banging my head so far trying to get this moving.773Views0likes3CommentsPowerShell command trying to grab files from External Blob Storage
Hi there, We have a ERP company that backsup a Database, and I want to setup a script to automatically grab those backup files from their Azure storage. I wrote a script to communicate with the storage with the secret key, and grab the .backpac files and store them locally on our SQL desktop. Once I am successful there, I am going to setup a Task Scheduler to do this automatically. But, when I try to run the script, I get an argument error. It's probably something simple, but thought I'd ask. Secret Key, Account name and and database replaced with "xxxxxxx" $firstBlob = az storage blob list --account-key xxxxxxxxxx== --account-name xxxxxxx -c xxxxxx | ConvertFrom-Json | Select-Object name, @{Name="lastModified"; Expression={$_.properties.lastModified}}, properties | Sort-Object -Property lastModified -Descending | Select-Object -First 1 # Check if $firstBlob is not null (i.e., there are blobs found) if ($firstBlob) { Write-Host $firstBlob.name "Found! Downloading..." az storage blob download --account-key xxxxx== --account-name xxxxx-c xxxxxx--name $firstBlob.name --file ./backup.bacpac } else { Write-Host "No backups found." } az : ERROR: argument --name/-n: expected one argument At C:\Users\Administrator\Desktop\Azure.ps1:10 char:5 + az storage blob download --account-key xxxxxxxxx... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (ERROR: argument...ed one argument:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Examples from AI knowledge base: az storage blob download --account-key 00000000 --account-name myaccount --container-name mycontainer --file file.txt --name myblob Downloads a blob to a file path, with automatic chunking and progress notifications. (autogenerated) az storage blob download --account-name myaccount --container-name mycontainer --file file.txt --name myblob Downloads a blob to a file path, with automatic chunking and progress notifications. (autogenerated) https://docs.microsoft.com/en-US/cli/azure/storage/blob#az_storage_blob_download Read more about the command in reference docs518Views0likes1CommentGet-AzureStorageFileContent not working in script
Hi, I need help with one thing because I am writing a script that will download one file from Azure File Sever. Unfortunately, I cannot find the problem and the cause of the errors. When I run the script without saving, i.e. line by line in powershell, it works fine. Unfortunately, when I save the script to a file and call it from Powershell, it bursts with errors. Does anyone have any idea what this is caused by.Solved943Views0likes2CommentsPassing String to PSIpRule
I'm having an Azure PowerShell issue. I can copy and paste a string into a command, but as soon as I pass it as a variable, it doesn't work: String $rulestr @{IPAddressOrRange="13.65.24.129";Action="allow"},@{IPAddressOrRange="13.66.138.94";Action="allow"},@{IPAddressOrRange="13.66.138.95";Action="allow"} Command doesn't work Update-AzStorageAccountNetworkRuleSet -ResourceGroupName <RGName> -AccountName <SAName> -IpRule ($rulestr) Update-AzStorageAccountNetworkRuleSet: Cannot bind parameter 'IPRule'. Cannot convert the "@{IPAddressOrRange="13.65.24.129";Action="allow"},@{IPAddressOrRange="13.66.138.94";Action="allow"},@{IPAddressOrRange="13.66.138.95";Action="allow"}" value of type "System.String" to type "Microsoft.Azure.Commands.Management.Storage.Models.PSIpRule". Command works with exact copy/paste of string Update-AzStorageAccountNetworkRuleSet -ResourceGroupName <RGName> -AccountName <SAName> -IpRule (@{IPAddressOrRange="13.65.24.129";Action="allow"},@{IPAddressOrRange="13.66.138.94";Action="allow"},@{IPAddressOrRange="13.66.138.95";Action="allow"}) Bypass : AzureServices DefaultAction : Deny IpRules : [13.65.24.129,...] VirtualNetworkRules : ResourceAccessRules :Solved1.7KViews0likes1CommentNot able to save the powershell script output in a file
Hello team, I am using an Azure PowerShell and running the script mentioned in the document: https://docs.microsoft.com/en-us/azure/storage/scripts/storage-blobs-container-calculate-size-powershell Actually, We are trying to calculate the container size using that PowerShell script. Our end goal is to get the storage breakout. Unfortunately, the output is too large that it is only showing the last 1000 line of output. Please help me to collect the complete output. Regards, Ayush893Views0likes0CommentsVideo: Mastering Azure using Cloud Shell, PowerShell and Bash!
I recorded my presentation and made it available for everyone. The presentation is a live demo and summary of my blog post “Mastering Azure with Cloud Shell“, which gives you an overview about the Cloud Shell and some of the advanced stuff you can do. In the session you learn: Overview about Cloud Shell Azure PowerShell and Bash experience Persistent Storage using Azure Files Azure Drive Third party tools Editors Visual Studio Code integration Using Git as Source Control Remote manage Azure virtual machines Integration of Cloud Shell in Microsoft Docs, Microsoft Learn and more Cloud Shell in the Azure Mobile App and more. I hope you enjoy watching it and let me know what you think in the comments.1.1KViews1like0Comments