I know this isn't a direct issue with PowerCLI, as I can successfully connect to server 172.18.3.2 - .9; I have completely reset the configuration on the 172.18.3.11, where I had to set a username/password, IP address configurations, etc. All servers have the same version, hardware, etc. I also have the password correct, as I can login to the host web portal and via iDRAC.
I was getting the error before the reset and now after the reset:
PS C:\Users\adm.robinson> connect-viserver -server 172.18.3.11
connect-viserver : Failed to connect: Object reference not set to an instance of an object.
At line:1 char:1
+ connect-viserver -server 172.18.3.11
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-VIServer], VimException
+ FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.VimException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
Which PowerCLI version are you using?
Get-Module -Name VMware.PowerCLI -ListAvailable
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Directory: C:\Users\adm.robinson\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 13.1.0.... VMware.PowerCLI
Did you already stop/start your PS/PowerCLI session?
Just to make sure, you are trying to connect to an ESXi node, not a VCSA?
Did you already restart that ESXi node?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
While I am not entirely sure what you meant by "stop/start your PS/PowerCLI session" as I've only begun to use PowerCLI this week in an effort to apply STIGs. So, I rebooted the machine that I was operating on and for good measure restarted the ESXI host, even though in the last day I had restarted it a few times. It seems maybe the issue was on the server I was operating from.
So, other than rebooting the machine I was operating from, how would one go about stopping a PS/PowerCLI session?
And thanks. It is working again.
You run your PowerCLI cmdlets from a PS prompt.
I meant to stop/start that prompt.
That could be the PowerShell prompt or an IDE like the PS ISe or in Visual Studio Code editor.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
