- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That code disables the SSH service at the end.
But does New-SshSession actually work?
What is returned when you do
New-SSHSession -ComputerName MyEsx -Credential $cred -AcceptKey -Verbose
Does the ESXi firewall allow SSH traffic?
Check with
Get-VMHostFireWallException -VMhost MyEsx -Name 'SSH *'
Is the SSH session timeout set too short?
Check with
Get-AdvancedSetting -Entity MyEsx -Name 'UserVars.ESXiShellTimeOut'
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference