I am looking for a script that I could run to scan my Virtual Center server (database) that would generate the following information:
Host and IP
Guest and IP
Which guest are on which Host
sorry, yes you are missing a number of closing }
this portion was taken from a larger script responsible for creating SCCM computer instances for each ESX host and producing hw inventory for them through idmifs
you will need to define $strVIServer
you will want to put in write-host etc for debugging info later
Here is what I now get:
[vSphere PowerCLI] C:\> .\scripts\tryThis.ps1
Missing closing '}' in statement block.
At C:\scripts\tryThis.ps1:40 char:7
+ <<<<
+ CategoryInfo : ParserError: (CloseBraceToken:TokenId) [], ParseException
+ FullyQualifiedErrorId : MissingEndCurlyBrace
sorry, i didnt post the code as a working example, it was more a change of you to get a look at the get-vmhost, the need to use the get-view $vmhost.Id and the Get-VMHostNetworkAdapter -VMHost $vmhostview.Name -Physical
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.