trying to use this script http://communities.vmware.com/docs/DOC-7070
param( string $VIServer )
if ($VIServer -eq "powershell.exe Report.ps1 vc1"){
Write-Host
Write-Host "Please specify a VI Server name eg...."
Write-Host " powershell.exe Report.ps1 MYVISERVER"
Write-Host
Write-Host
exit
-
vc1 is my virtual center
-
debug message:
Microsoft Word Detected
Office Web Components Detected
Connecting to VI Server
The argument cannot be null or empty.
where is my mistake?
Max,
This script was made for you to run passing it your VI Server as an input to the script, you should not need to ammend the code at all.
As LucD says just run the script like so:
PS> .\report.ps1 vc1
Or if you are loading it into something like powergui script editor type your VI server name in the text box next to the play button.
Sorry for the confusion.
Alan Renouf
How did you start the script ?
Did you do
powershell .\report.ps1 vc1
from a CMD prompt while positioned in the folder where the report.ps1 file is stored ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Max,
This script was made for you to run passing it your VI Server as an input to the script, you should not need to ammend the code at all.
As LucD says just run the script like so:
PS> .\report.ps1 vc1
Or if you are loading it into something like powergui script editor type your VI server name in the text box next to the play button.
Sorry for the confusion.
Alan Renouf