Scale session hosts dynamically - Subscription error

%3CLINGO-SUB%20id%3D%22lingo-sub-998204%22%20slang%3D%22en-US%22%3EScale%20session%20hosts%20dynamically%20-%20Subscription%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-998204%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edoes%20anyone%20use%20this%20sctipt%3F%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fset-up-scaling-script%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fset-up-scaling-script%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FRDS-Templates%2Ftree%2Fmaster%2Fwvd-templates%2Fwvd-scaling-script%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FAzure%2FRDS-Templates%2Ftree%2Fmaster%2Fwvd-templates%2Fwvd-scaling-script%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20the%20following%20error%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESelect-AzureRmSubscription%20%3A%20Please%20provide%20a%20valid%20tenant%20or%20a%20valid%20subscription.%3CBR%20%2F%3EAt%20C%3A%5CRDSscaling%5CbasicScale.ps1%3A170%20char%3A1%3CBR%20%2F%3E%2B%20Select-AzureRmSubscription%20-SubscriptionId%20%24currentAzureSubscriptionI%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20CloseError%3A%20(%3A)%20%5BSet-AzureRmContext%5D%2C%20ArgumentException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Azure.Commands.Profile.SetAzureRMContextCommand%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-------------------%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20the%20teanant%20and%20subscriptionID%20is%20correct%20-%20but%20can%20it%20be%20something%20with%20the%20permissions%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20someone%20can%20help%20me%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%2FLars%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1083698%22%20slang%3D%22en-US%22%3ERe%3A%20Scale%20session%20hosts%20dynamically%20-%20Subscription%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1083698%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F310822%22%20target%3D%22_blank%22%3E%40Thobiasen%3C%2FA%3E%26nbsp%3B%3A%20Hmm...%20are%20you%20able%20to%20run%20the%20same%20steps%20manually%20in%20a%20local%20PowerShell%20instance%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

hi

 

does anyone use this sctipt?

https://docs.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script

https://github.com/Azure/RDS-Templates/tree/master/wvd-templates/wvd-scaling-script

 

I get the following error: 

 

Select-AzureRmSubscription : Please provide a valid tenant or a valid subscription.
At C:\RDSscaling\basicScale.ps1:170 char:1
+ Select-AzureRmSubscription -SubscriptionId $currentAzureSubscriptionI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmContext], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.SetAzureRMContextCommand

 

-------------------

 

I know the teanant and subscriptionID is correct - but can it be something with the permissions?

 

Hope someone can help me

 

/Lars

 

1 Reply
Highlighted

@Thobiasen : Hmm... are you able to run the same steps manually in a local PowerShell instance?