Bobby Batts
asked on
PowerCLI Script used to Collect Host Logs
I am attempting to run the following simple PowerCLI script to collect host logs.
code…
Connect-VIServer myviserver
$esx = Get-VMHost myhost
$log = Get-Log -Key “vmkernel” -VMhost $esx
$log.entries > c:\logs.txt
When I run the script an error message is generated.
It reports that the Connect-VIServer command is not recognized as the name of a cmdlet.
Any ideas why this error message in being presented.
Thanks,
Lipotech
code…
Connect-VIServer myviserver
$esx = Get-VMHost myhost
$log = Get-Log -Key “vmkernel” -VMhost $esx
$log.entries > c:\logs.txt
When I run the script an error message is generated.
It reports that the Connect-VIServer command is not recognized as the name of a cmdlet.
Any ideas why this error message in being presented.
Thanks,
Lipotech
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.