Comment

Iam getting following error while executing the script. please help me on this.

Connect-VIServer : Cannot validate argument on parameter 'Server'. The argument is null or empty. Supply an argument that is not null or

empty and then try the command again.

At line:14 char:18

+ Connect-VIServer $server -NotDefault -WarningAction SilentlyContinue | Out-Null

+                  ~~~~~~~

          + CategoryInfo : InvalidData: (:) [Connect-VIServer], ParameterBindingValidationException

         + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer