Skip to content

Instantly share code, notes, and snippets.

@bobalob
Last active November 4, 2018 15:26
Show Gist options
  • Save bobalob/da7bfd24260083be1588012b8076aaf2 to your computer and use it in GitHub Desktop.
Save bobalob/da7bfd24260083be1588012b8076aaf2 to your computer and use it in GitHub Desktop.
Start-Transcript "$($ENV:Temp)\VMStart.Log"
$AzureUser = "[email protected]"
$EncodedPassword = "PASTE ENCODED PASSWORD HERE"
$SecureStringPwd = ConvertTo-SecureString $EncodedPassword
$AzureCredential = New-Object System.Management.Automation.PSCredential (
$AzureUser,
$SecureStringPwd
)
Login-AzureRmAccount -Credential $AzureCredential
Get-AzureRmVm -VMName 'Kali' -ResourceGroupName 'hackthebox' | Start-AzureRmVM
Stop-Transcript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment