Skip to content

Commit 6a2a9cc

Browse files
committed
Add simple validation test
1 parent 26c1ffe commit 6a2a9cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
$clientSecret = ConvertTo-SecureString ([Guid]::NewGuid().ToString().Substring(1,10)) -AsPlainText -Force
3+
$pscredentials = New-Object System.Management.Automation.PSCredential("vmadmin", $clientSecret)
4+
New-AzVm -Name MyVM -Credential $pscredentials -WhatIf
5+
$vm = New-AzVm -Name myVm1234 -Credential $pscredentials
6+
$vm
7+
8+
#Cleanup
9+
Remove-AzureRmResourceGroup -ResourceId $vm.ResourceGroupId

0 commit comments

Comments
 (0)