문제

I am following this script http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-Sample-0daf6d9d for backing up vhds. I modified the backup.ps1 to meet my needs but I am having some problems. When I ran the script it would always fail on

Set-AzureSubscription -DefaultSubscription $SubscriptionName

it says

Set-AzureSubscription : A parameter cannot be found that matches parameter name 'DefaultSubscription'.

So I commented it out and ran it. Everything else runs great but it backs up to the wrong container. So why is it doing this? And how do I get it to backup to a place I specify?

Also at the beginning of the script it has Param($ServiceName, $VMName) , how do I pass these to this? Do I use a batch file? I have been setting them manually but I would love to pass them. I just have no idea how. Thank you

도움이 되었습니까?

해결책

You should use Set-AzureSubscription to specify which subscription you're working on. Do you have certificate for the subscription? Or do you have name of it?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top