Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix json format by prettier #7638

Merged
merged 1 commit into from
Oct 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2839,4 +2839,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@
},
"policySigningCertificates": {
"description": "JSON Web Key Set defining a set of X.509 Certificates that will represent the parent certificate for the signing certificate used for policy operations",
"$ref": "../../../../../common-types/rfcs/rfc7517.json#/definitions/JSONWebKeySet"
}
"$ref": "../../../../../common-types/rfcs/rfc7517.json#/definitions/JSONWebKeySet"
}
}
}
},
Expand All @@ -438,7 +438,9 @@
"required": true,
"type": "string",
"description": "Client API version.",
"enum": ["2018-09-01-preview"]
"enum": [
"2018-09-01-preview"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"responses": {
"200": {
"headers": {},
"body": "{\"JobId\":\"903a5ead-140c-11e7-a943-000d3a6140c9\",\"OperationType\":\"Consistency\",\"NodeName\":\"DSCCOMP\",\"IpAddress\":\"172.16.2.5;127.0.0.1;fe80::4c51:9518:aa3c:256a%5;::2000:0:0:0;::1;::2000:0:0:0;2001:0:9d38:78cf:106b:130a:53ef:fdfa;fe80::106b:130a:53ef:fdfa%7\",\"LCMVersion\":\"2.0\",\"ReportFormatVersion\":\"2.0\",\"StartTime\":\"2017-03-28T23:16:27.5870000+00:00\",\"Errors\":[],\"StatusData\":[\"{\\\"IPV4Addresses\\\":[\\\"172.16.2.5\\\",\\\"127.0.0.1\\\"],\\\"CurrentChecksum\\\":\\\"7ABB723643164D83E81032A9607FF164CE685487E5C2A8827284479582853DA4\\\",\\\"MACAddresses\\\":[\\\"00-0D-3A-61-40-C9\\\",\\\"00-00-00-00-00-00-00-E0\\\",\\\"00-00-00-00-00-00-00-E0\\\"],\\\"Type\\\":\\\"Consistency\\\",\\\"HostName\\\":\\\"DSCCOMP\\\",\\\"Locale\\\":\\\"en-US\\\",\\\"StartDate\\\":\\\"2017-03-28T23:16:27.5870000+00:00\\\",\\\"JobID\\\":\\\"{903A5EAD-140C-11E7-A943-000D3A6140C9}\\\",\\\"LCMVersion\\\":\\\"2.0\\\",\\\"IPV6Addresses\\\":[\\\"fe80::4c51:9518:aa3c:256a%5\\\",\\\"::2000:0:0:0\\\",\\\"::1\\\",\\\"::2000:0:0:0\\\",\\\"2001:0:9d38:78cf:106b:130a:53ef:fdfa\\\",\\\"fe80::106b:130a:53ef:fdfa%7\\\"]}\"],\"AdditionalData\":[{\"Key\":\"OSVersion\",\"Value\":\"{\\\"VersionString\\\":\\\"Microsoft Windows NT 10.0.14393.0\\\",\\\"ServicePack\\\":\\\"\\\",\\\"Platform\\\":\\\"Win32NT\\\"}\"},{\"Key\":\"PSVersion\",\"Value\":\"{\\\"CLRVersion\\\":\\\"4.0.30319.42000\\\",\\\"PSVersion\\\":\\\"5.1.14393.693\\\",\\\"BuildVersion\\\":\\\"10.0.14393.693\\\"}\"}]}\r\n\r\n{\"JobId\":\"903a5ead-140c-11e7-a943-000d3a6140c9\",\"OperationType\":\"Consistency\",\"RefreshMode\":\"Pull\",\"Status\":\"Success\",\"ReportFormatVersion\":\"2.0\",\"ConfigurationVersion\":\"2.0.0\",\"StartTime\":\"2017-03-28T23:16:27.5870000+00:00\",\"EndTime\":\"2017-03-28T23:16:27.5870000+00:00\",\"RebootRequested\":\"False\",\"Errors\":[],\"StatusData\":[\"{\\\"StartDate\\\":\\\"2017-03-28T23:16:27.5870000+00:00\\\",\\\"IPV6Addresses\\\":[\\\"fe80::4c51:9518:aa3c:256a%5\\\",\\\"::2000:0:0:0\\\",\\\"::1\\\",\\\"::2000:0:0:0\\\",\\\"2001:0:9d38:78cf:106b:130a:53ef:fdfa\\\",\\\"fe80::106b:130a:53ef:fdfa%7\\\"],\\\"DurationInSeconds\\\":\\\"0\\\",\\\"JobID\\\":\\\"{903A5EAD-140C-11E7-A943-000D3A6140C9}\\\",\\\"CurrentChecksum\\\":\\\"7ABB723643164D83E81032A9607FF164CE685487E5C2A8827284479582853DA4\\\",\\\"MetaData\\\":\\\"Author: Administrator; Name: SetupServer; Version: 2.0.0; GenerationDate: 03\/28\/2017 22:27:31; GenerationHost: CLIENT;\\\",\\\"RebootRequested\\\":\\\"False\\\",\\\"Status\\\":\\\"Success\\\",\\\"IPV4Addresses\\\":[\\\"172.16.2.5\\\",\\\"127.0.0.1\\\"],\\\"LCMVersion\\\":\\\"2.0\\\",\\\"NumberOfResources\\\":\\\"1\\\",\\\"Type\\\":\\\"Consistency\\\",\\\"HostName\\\":\\\"DSCCOMP\\\",\\\"ResourcesInDesiredState\\\":[{\\\"SourceInfo\\\":\\\"::4::32::WindowsFeature\\\",\\\"ModuleName\\\":\\\"PsDesiredStateConfiguration\\\",\\\"DurationInSeconds\\\":\\\"0.25\\\",\\\"InstanceName\\\":\\\"IIS\\\",\\\"StartDate\\\":\\\"2017-03-28T23:16:28.1810000+00:00\\\",\\\"ResourceName\\\":\\\"WindowsFeature\\\",\\\"ModuleVersion\\\":\\\"1.1\\\",\\\"RebootRequested\\\":\\\"False\\\",\\\"ResourceId\\\":\\\"[WindowsFeature]IIS\\\",\\\"ConfigurationName\\\":\\\"SetupServer\\\",\\\"InDesiredState\\\":\\\"True\\\"}],\\\"MACAddresses\\\":[\\\"00-0D-3A-61-40-C9\\\",\\\"00-00-00-00-00-00-00-E0\\\",\\\"00-00-00-00-00-00-00-E0\\\"],\\\"MetaConfiguration\\\":{\\\"AgentId\\\":\\\"CE4DA358-F216-11E6-A942-000D3A6140C9\\\",\\\"SignatureValidations\\\":[],\\\"ConfigurationDownloadManagers\\\":[{\\\"RegistrationKey\\\":\\\"\\\",\\\"ServerURL\\\":\\\"https:\/\/eus2-agentservice-prod-1.azure-automation.net\/accounts\/0e44bf26-7f40-490b-bd6d-2ea0d422ace0\\\",\\\"ResourceId\\\":\\\"[ConfigurationRepositoryWeb]AzureAutomationDSC\\\",\\\"ConfigurationNames\\\":[],\\\"SourceInfo\\\":\\\"C:\\\\\\\\Packages\\\\\\\\Plugins\\\\\\\\Microsoft.Powershell.DSC\\\\\\\\2.22.0.0\\\\\\\\DSCWork\\\\\\\\RegistrationMetaConfigV2.1\\\\\\\\RegistrationMetaConfigV2.ps1::69::9::ConfigurationRepositoryWeb\\\"}],\\\"ActionAfterReboot\\\":\\\"ContinueConfiguration\\\",\\\"LCMCompatibleVersions\\\":[\\\"1.0\\\",\\\"2.0\\\"],\\\"LCMState\\\":\\\"Idle\\\",\\\"ResourceModuleManagers\\\":[{\\\"RegistrationKey\\\":\\\"\\\",\\\"ServerURL\\\":\\\"https:\/\/eus2-agentservice-prod-1.azure-automation.net\/accounts\/0e44bf26-7f40-490b-bd6d-2ea0d422ace0\\\",\\\"ResourceId\\\":\\\"[ResourceRepositoryWeb]AzureAutomationDSC\\\",\\\"SourceInfo\\\":\\\"C:\\\\\\\\Packages\\\\\\\\Plugins\\\\\\\\Microsoft.Powershell.DSC\\\\\\\\2.22.0.0\\\\\\\\DSCWork\\\\\\\\RegistrationMetaConfigV2.1\\\\\\\\RegistrationMetaConfigV2.ps1::76::9::ResourceRepositoryWeb\\\"}],\\\"ReportManagers\\\":[{\\\"RegistrationKey\\\":\\\"\\\",\\\"ServerURL\\\":\\\"https:\/\/eus2-agentservice-prod-1.azure-automation.net\/accounts\/0e44bf26-7f40-490b-bd6d-2ea0d422ace0\\\",\\\"ResourceId\\\":\\\"[ReportServerWeb]AzureAutomationDSC\\\",\\\"SourceInfo\\\":\\\"C:\\\\\\\\Packages\\\\\\\\Plugins\\\\\\\\Microsoft.Powershell.DSC\\\\\\\\2.22.0.0\\\\\\\\DSCWork\\\\\\\\RegistrationMetaConfigV2.1\\\\\\\\RegistrationMetaConfigV2.ps1::82::9::ReportServerWeb\\\"}],\\\"StatusRetentionTimeInDays\\\":\\\"10\\\",\\\"LCMVersion\\\":\\\"2.0\\\",\\\"MaximumDownloadSizeMB\\\":\\\"500\\\",\\\"ConfigurationMode\\\":\\\"ApplyAndMonitor\\\",\\\"RefreshFrequencyMins\\\":\\\"30\\\",\\\"RebootNodeIfNeeded\\\":\\\"False\\\",\\\"SignatureValidationPolicy\\\":\\\"NONE\\\",\\\"RefreshMode\\\":\\\"Pull\\\",\\\"DebugMode\\\":[\\\"NONE\\\"],\\\"CertificateID\\\":\\\"89D09942A682169E05ED0FB5B4BD9A4EA1F169F0\\\",\\\"AllowModuleOverwrite\\\":\\\"False\\\",\\\"ConfigurationModeFrequencyMins\\\":\\\"15\\\",\\\"LCMStateDetail\\\":\\\"\\\"},\\\"Locale\\\":\\\"en-US\\\",\\\"Mode\\\":\\\"Pull\\\"}\"],\"AdditionalData\":[{\"Key\":\"OSVersion\",\"Value\":\"{\\\"VersionString\\\":\\\"Microsoft Windows NT 10.0.14393.0\\\",\\\"ServicePack\\\":\\\"\\\",\\\"Platform\\\":\\\"Win32NT\\\"}\"},{\"Key\":\"PSVersion\",\"Value\":\"{\\\"CLRVersion\\\":\\\"4.0.30319.42000\\\",\\\"PSVersion\\\":\\\"5.1.14393.693\\\",\\\"BuildVersion\\\":\\\"10.0.14393.693\\\"}\"}]}\r\n\r\n"
"body": "{\"JobId\":\"903a5ead-140c-11e7-a943-000d3a6140c9\",\"OperationType\":\"Consistency\",\"NodeName\":\"DSCCOMP\",\"IpAddress\":\"172.16.2.5;127.0.0.1;fe80::4c51:9518:aa3c:256a%5;::2000:0:0:0;::1;::2000:0:0:0;2001:0:9d38:78cf:106b:130a:53ef:fdfa;fe80::106b:130a:53ef:fdfa%7\",\"LCMVersion\":\"2.0\",\"ReportFormatVersion\":\"2.0\",\"StartTime\":\"2017-03-28T23:16:27.5870000+00:00\",\"Errors\":[],\"StatusData\":[\"{\\\"IPV4Addresses\\\":[\\\"172.16.2.5\\\",\\\"127.0.0.1\\\"],\\\"CurrentChecksum\\\":\\\"7ABB723643164D83E81032A9607FF164CE685487E5C2A8827284479582853DA4\\\",\\\"MACAddresses\\\":[\\\"00-0D-3A-61-40-C9\\\",\\\"00-00-00-00-00-00-00-E0\\\",\\\"00-00-00-00-00-00-00-E0\\\"],\\\"Type\\\":\\\"Consistency\\\",\\\"HostName\\\":\\\"DSCCOMP\\\",\\\"Locale\\\":\\\"en-US\\\",\\\"StartDate\\\":\\\"2017-03-28T23:16:27.5870000+00:00\\\",\\\"JobID\\\":\\\"{903A5EAD-140C-11E7-A943-000D3A6140C9}\\\",\\\"LCMVersion\\\":\\\"2.0\\\",\\\"IPV6Addresses\\\":[\\\"fe80::4c51:9518:aa3c:256a%5\\\",\\\"::2000:0:0:0\\\",\\\"::1\\\",\\\"::2000:0:0:0\\\",\\\"2001:0:9d38:78cf:106b:130a:53ef:fdfa\\\",\\\"fe80::106b:130a:53ef:fdfa%7\\\"]}\"],\"AdditionalData\":[{\"Key\":\"OSVersion\",\"Value\":\"{\\\"VersionString\\\":\\\"Microsoft Windows NT 10.0.14393.0\\\",\\\"ServicePack\\\":\\\"\\\",\\\"Platform\\\":\\\"Win32NT\\\"}\"},{\"Key\":\"PSVersion\",\"Value\":\"{\\\"CLRVersion\\\":\\\"4.0.30319.42000\\\",\\\"PSVersion\\\":\\\"5.1.14393.693\\\",\\\"BuildVersion\\\":\\\"10.0.14393.693\\\"}\"}]}\r\n\r\n{\"JobId\":\"903a5ead-140c-11e7-a943-000d3a6140c9\",\"OperationType\":\"Consistency\",\"RefreshMode\":\"Pull\",\"Status\":\"Success\",\"ReportFormatVersion\":\"2.0\",\"ConfigurationVersion\":\"2.0.0\",\"StartTime\":\"2017-03-28T23:16:27.5870000+00:00\",\"EndTime\":\"2017-03-28T23:16:27.5870000+00:00\",\"RebootRequested\":\"False\",\"Errors\":[],\"StatusData\":[\"{\\\"StartDate\\\":\\\"2017-03-28T23:16:27.5870000+00:00\\\",\\\"IPV6Addresses\\\":[\\\"fe80::4c51:9518:aa3c:256a%5\\\",\\\"::2000:0:0:0\\\",\\\"::1\\\",\\\"::2000:0:0:0\\\",\\\"2001:0:9d38:78cf:106b:130a:53ef:fdfa\\\",\\\"fe80::106b:130a:53ef:fdfa%7\\\"],\\\"DurationInSeconds\\\":\\\"0\\\",\\\"JobID\\\":\\\"{903A5EAD-140C-11E7-A943-000D3A6140C9}\\\",\\\"CurrentChecksum\\\":\\\"7ABB723643164D83E81032A9607FF164CE685487E5C2A8827284479582853DA4\\\",\\\"MetaData\\\":\\\"Author: Administrator; Name: SetupServer; Version: 2.0.0; GenerationDate: 03/28/2017 22:27:31; GenerationHost: CLIENT;\\\",\\\"RebootRequested\\\":\\\"False\\\",\\\"Status\\\":\\\"Success\\\",\\\"IPV4Addresses\\\":[\\\"172.16.2.5\\\",\\\"127.0.0.1\\\"],\\\"LCMVersion\\\":\\\"2.0\\\",\\\"NumberOfResources\\\":\\\"1\\\",\\\"Type\\\":\\\"Consistency\\\",\\\"HostName\\\":\\\"DSCCOMP\\\",\\\"ResourcesInDesiredState\\\":[{\\\"SourceInfo\\\":\\\"::4::32::WindowsFeature\\\",\\\"ModuleName\\\":\\\"PsDesiredStateConfiguration\\\",\\\"DurationInSeconds\\\":\\\"0.25\\\",\\\"InstanceName\\\":\\\"IIS\\\",\\\"StartDate\\\":\\\"2017-03-28T23:16:28.1810000+00:00\\\",\\\"ResourceName\\\":\\\"WindowsFeature\\\",\\\"ModuleVersion\\\":\\\"1.1\\\",\\\"RebootRequested\\\":\\\"False\\\",\\\"ResourceId\\\":\\\"[WindowsFeature]IIS\\\",\\\"ConfigurationName\\\":\\\"SetupServer\\\",\\\"InDesiredState\\\":\\\"True\\\"}],\\\"MACAddresses\\\":[\\\"00-0D-3A-61-40-C9\\\",\\\"00-00-00-00-00-00-00-E0\\\",\\\"00-00-00-00-00-00-00-E0\\\"],\\\"MetaConfiguration\\\":{\\\"AgentId\\\":\\\"CE4DA358-F216-11E6-A942-000D3A6140C9\\\",\\\"SignatureValidations\\\":[],\\\"ConfigurationDownloadManagers\\\":[{\\\"RegistrationKey\\\":\\\"\\\",\\\"ServerURL\\\":\\\"https://eus2-agentservice-prod-1.azure-automation.net/accounts/0e44bf26-7f40-490b-bd6d-2ea0d422ace0\\\",\\\"ResourceId\\\":\\\"[ConfigurationRepositoryWeb]AzureAutomationDSC\\\",\\\"ConfigurationNames\\\":[],\\\"SourceInfo\\\":\\\"C:\\\\\\\\Packages\\\\\\\\Plugins\\\\\\\\Microsoft.Powershell.DSC\\\\\\\\2.22.0.0\\\\\\\\DSCWork\\\\\\\\RegistrationMetaConfigV2.1\\\\\\\\RegistrationMetaConfigV2.ps1::69::9::ConfigurationRepositoryWeb\\\"}],\\\"ActionAfterReboot\\\":\\\"ContinueConfiguration\\\",\\\"LCMCompatibleVersions\\\":[\\\"1.0\\\",\\\"2.0\\\"],\\\"LCMState\\\":\\\"Idle\\\",\\\"ResourceModuleManagers\\\":[{\\\"RegistrationKey\\\":\\\"\\\",\\\"ServerURL\\\":\\\"https://eus2-agentservice-prod-1.azure-automation.net/accounts/0e44bf26-7f40-490b-bd6d-2ea0d422ace0\\\",\\\"ResourceId\\\":\\\"[ResourceRepositoryWeb]AzureAutomationDSC\\\",\\\"SourceInfo\\\":\\\"C:\\\\\\\\Packages\\\\\\\\Plugins\\\\\\\\Microsoft.Powershell.DSC\\\\\\\\2.22.0.0\\\\\\\\DSCWork\\\\\\\\RegistrationMetaConfigV2.1\\\\\\\\RegistrationMetaConfigV2.ps1::76::9::ResourceRepositoryWeb\\\"}],\\\"ReportManagers\\\":[{\\\"RegistrationKey\\\":\\\"\\\",\\\"ServerURL\\\":\\\"https://eus2-agentservice-prod-1.azure-automation.net/accounts/0e44bf26-7f40-490b-bd6d-2ea0d422ace0\\\",\\\"ResourceId\\\":\\\"[ReportServerWeb]AzureAutomationDSC\\\",\\\"SourceInfo\\\":\\\"C:\\\\\\\\Packages\\\\\\\\Plugins\\\\\\\\Microsoft.Powershell.DSC\\\\\\\\2.22.0.0\\\\\\\\DSCWork\\\\\\\\RegistrationMetaConfigV2.1\\\\\\\\RegistrationMetaConfigV2.ps1::82::9::ReportServerWeb\\\"}],\\\"StatusRetentionTimeInDays\\\":\\\"10\\\",\\\"LCMVersion\\\":\\\"2.0\\\",\\\"MaximumDownloadSizeMB\\\":\\\"500\\\",\\\"ConfigurationMode\\\":\\\"ApplyAndMonitor\\\",\\\"RefreshFrequencyMins\\\":\\\"30\\\",\\\"RebootNodeIfNeeded\\\":\\\"False\\\",\\\"SignatureValidationPolicy\\\":\\\"NONE\\\",\\\"RefreshMode\\\":\\\"Pull\\\",\\\"DebugMode\\\":[\\\"NONE\\\"],\\\"CertificateID\\\":\\\"89D09942A682169E05ED0FB5B4BD9A4EA1F169F0\\\",\\\"AllowModuleOverwrite\\\":\\\"False\\\",\\\"ConfigurationModeFrequencyMins\\\":\\\"15\\\",\\\"LCMStateDetail\\\":\\\"\\\"},\\\"Locale\\\":\\\"en-US\\\",\\\"Mode\\\":\\\"Pull\\\"}\"],\"AdditionalData\":[{\"Key\":\"OSVersion\",\"Value\":\"{\\\"VersionString\\\":\\\"Microsoft Windows NT 10.0.14393.0\\\",\\\"ServicePack\\\":\\\"\\\",\\\"Platform\\\":\\\"Win32NT\\\"}\"},{\"Key\":\"PSVersion\",\"Value\":\"{\\\"CLRVersion\\\":\\\"4.0.30319.42000\\\",\\\"PSVersion\\\":\\\"5.1.14393.693\\\",\\\"BuildVersion\\\":\\\"10.0.14393.693\\\"}\"}]}\r\n\r\n"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"headers": {
"Content-Type": "text/powershell"
},
"body": "<#\r\n .DESCRIPTION\r\n An example runbook which prints out the first10 Azure VMs in your subscription (ordered alphabetically).\r\n For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http: \/\/aka.ms\/fxu3mn\r\n\r\n .NOTES\r\n AUTHOR: Azure Automation Team\r\n LASTEDIT: Mar27,\r\n 2015\r\n#>\r\nworkflow Get-AzureVMTutorial{\r\n #The name of the Automation Credential Asset this runbook will use to authenticate to Azure.\r\n $CredentialAssetName = 'DefaultAzureCredential'\r\n\r\n #Get the credential with the above name from the Automation Asset store\r\n $Cred = Get-AutomationPSCredential -Name $CredentialAssetName\r\n if(!$Cred){\r\n Throw\"Could not find an Automation Credential Asset named '${CredentialAssetName}'. Make sure you have created one in this Automation Account.\"\r\n }\r\n\r\n #Connect to your Azure Account\r\n $Account = Add-AzureAccount -Credential $Cred\r\n if(!$Account){\r\n Throw\"Could not authenticate to Azure using the credential asset '${CredentialAssetName}'. Make sure the user name and password are correct.\"\r\n }\r\n\r\n #TODO (optional): pick the right subscription to use. Without this line, the default subscription for your Azure Account will be used.\r\n #Select-AzureSubscription -SubscriptionName\"TODO: your Azure subscription name here\"\r\n \r\n #Get all the VMs you have in your Azure subscription\r\n $VMs = Get-AzureVM\r\n\r\n #Print out up to10 of those VMs\r\n if(!$VMs){\r\n Write-Output\"No VMs were found in your subscription.\"\r\n } else{\r\n Write-Output $VMs[0..9\r\n ]\r\n }\r\n }"
"body": "<#\r\n .DESCRIPTION\r\n An example runbook which prints out the first10 Azure VMs in your subscription (ordered alphabetically).\r\n For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http: //aka.ms/fxu3mn\r\n\r\n .NOTES\r\n AUTHOR: Azure Automation Team\r\n LASTEDIT: Mar27,\r\n 2015\r\n#>\r\nworkflow Get-AzureVMTutorial{\r\n #The name of the Automation Credential Asset this runbook will use to authenticate to Azure.\r\n $CredentialAssetName = 'DefaultAzureCredential'\r\n\r\n #Get the credential with the above name from the Automation Asset store\r\n $Cred = Get-AutomationPSCredential -Name $CredentialAssetName\r\n if(!$Cred){\r\n Throw\"Could not find an Automation Credential Asset named '${CredentialAssetName}'. Make sure you have created one in this Automation Account.\"\r\n }\r\n\r\n #Connect to your Azure Account\r\n $Account = Add-AzureAccount -Credential $Cred\r\n if(!$Account){\r\n Throw\"Could not authenticate to Azure using the credential asset '${CredentialAssetName}'. Make sure the user name and password are correct.\"\r\n }\r\n\r\n #TODO (optional): pick the right subscription to use. Without this line, the default subscription for your Azure Account will be used.\r\n #Select-AzureSubscription -SubscriptionName\"TODO: your Azure subscription name here\"\r\n \r\n #Get all the VMs you have in your Azure subscription\r\n $VMs = Get-AzureVM\r\n\r\n #Print out up to10 of those VMs\r\n if(!$VMs){\r\n Write-Output\"No VMs were found in your subscription.\"\r\n } else{\r\n Write-Output $VMs[0..9\r\n ]\r\n }\r\n }"
}
}
}
Loading