Reputation: 29710
I have a number of VMs provisioned in my Azure subscription, protected by an NSG, so I don't have WinRM available remotely.
I'd like to execute a PowerShell script on these VMs as part of my TFS release definition.
Is there any way to execute arbitrary PowerShell scripts on Azure VM resources?
I'm aware of the Custom Script extension for Azure VM resources, but I don't know if this is what I'm after, or if it plays nicely with TFS.
Upvotes: 0
Views: 229
Reputation: 8737
Custom Script Extension would work fine for running scripts on the VM - but it would have to be done as part of "adding" the extension. Meaning you'd have to deploy the extension to the VM to trigger running the script. So you'd do it when the VM is provisioned or submit another deployment to run the script after it's provision.
Either is doable from TFS/VSTS...
Upvotes: 1