Created
April 25, 2015 08:55
-
-
Save mattcorr/f496ec7e4bc0d7333ea6 to your computer and use it in GitHub Desktop.
azure ad test workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflow Azure-AD-Test | |
{ | |
# Get required variables | |
$cred = Get-AutomationPSCredential -Name 'Automation Account' | |
$subName = Get-AutomationVariable -Name 'Subscription Name' | |
$vmCred = Get-AutomationPSCredential -Name 'VM Account' | |
#perform authentication | |
Add-AzureAccount -Credential $cred | |
Select-AzureSubscription -SubscriptionName $subName | |
# get the remote VM URI | |
$uri = Get-AzureWinRMUri -ServiceName 'azureautodemo' -Name 'azureautodemo' | |
# perform the action on the VM | |
Create-Folder -VMUri $uri -VMCredential $vmCred -Folder 'C:\THIS-IS-A-TEST' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment