I also ran your Test-InvokeVMScript script and here are the results from a box that my script ran successfully on.
PS C:\> Test-InvokeVMScript -VM 00255_Windows_10_B -Detail
“SilentlyContinue†: The term '“SilentlyContinueâ€' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again.
At C:\Tools\PSscripts\PSscripts\BSSN\Test-Invoke-VMScript.ps1:54 char:26
+ $ErrorActionPreference = “SilentlyContinueâ€
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (“SilentlyContinueâ€:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Exception calling "Connect" with "2" argument(s): "Value cannot be null.
Parameter name: addresses"
At C:\Tools\PSscripts\PSscripts\BSSN\Test-Invoke-VMScript.ps1:56 char:1
+ $socket.Connect($VM.Host.Name,902)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
Exception calling "GetVersionInfo" with "1" argument(s): "C:\Program Files\VMware\VMware VIX\VixCOM.dll"
At C:\Tools\PSscripts\PSscripts\BSSN\Test-Invoke-VMScript.ps1:102 char:1
+ $propertiesVix =[System.Diagnostics.FileVersionInfo]::GetVersionInfo( ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException
OK : False
VM : 00255_Windows_10_B
PoweredOn : False
X86Engine : False
ToolsInstalled : False
Port902Open : False
FolderReadAccess : True
PrivilegeConsoleInteraction : True
SupportedOS : False
PS C:\> Test-InvokeVMScript -VM 00255_Windows_10_B -Detail