Azure Virtual Machines (VMS) Powershell Remote (WinRM), function that skips the CA validation.
Function Enter-AZSession ($VMRM){
if ($VMRM.status -ne "ReadyRole") {Write-Error "VM Status is not ReadyRole";break}
else {
Write-Host “Connecting to hostname: " -ForeGroundColor Yellow -NoNewLine; $($VMRM.VM.RoleName)
Enter-PSSession -ConnectionUri ($VMRM|Get-AzureWinRMUri) -Credential (Get-Credential) -SessionOption (New-PSSessionOption -SkipCACheck:$true)}
}
#powershell
#azure
#iaas
#virtual machines
#remote
#powershell
#winrm
#CA
#PSSession
#VM
No comments:
Post a Comment