Hello,
Does anyone know where I can find information about who and when someone has deleted a VM from disk from VC2 ?
thank you
Dominic
...and you uncommented the lines below to get the file?
#Uncomment the following lines to save the htm file in a central location #$Date = Get-Date #$Filename = "C:\Temp\" + $VIServer + "DailyReport" + "_" + $Date.Day + "-" + $Date.Month + "-" + $Date.Year + ".htm" #$MyReport | out-file -encoding ASCII -filepath $Filename #Invoke-Item $Filename
you may be able to check the tasks and events tab at the datacenter level
the administration button and system logs has all the vpxd logs as well
......also if you like powershell you may want to look at this script
Hello,
I am looking informations about 2 weeks ago
Dominic
Check also on ESX log files (/var/log/vmware/)
Andre
check here as well
>c:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs
like i said, the script i pointed out will do what you are looking to do as well.
It works with VC 2.0.4 ?
I installed Powershell and vSphere PowerCli but I have troubles with double quote when executing this : C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ " & "C:\Scripts\DailyReport.ps1 cprexpvmwvcc2″
So I tried into a powershell window and I received the following error :
The term 'Connect-VIServer' is not recognized as a cmdlet, function, operable program, or script file. Verify the term
and try again.
At C:\Scripts\DailyReport.ps1:385 char:29
+ $VIServer = Connect-VIServer <<<< $VISRV
The term 'Connect-VIServer' is not recognized as a cmdlet, function, operable program, or script file. Verify the term
and try again.
At C:\Scripts\DailyReport.ps1:396 char:30
+ $VIServer = Connect-VIServer <<<< $VISRV
Exception calling "Send" with "1" argument(s): "Échec d'envoi du courrier."
At C:\Scripts\DailyReport.ps1:60 char:14
+ $mailer.send( <<<< $msg)
Dominic
my vcenter server is lets say vc1234.domain.com
I launch VMware vSphere PowerCLI and cd to the directory where the script rsides then
./DailyReport.ps1 vc1234.domain.com
I use PowerGui to edit the script.
I have vCenter 2.5, but i'm unsure if it works on 2.0.x
I tried with VC 2.5 and I received the same error message.
The steps I followed :
- I installed PowerShell
- I installed vSphere PowerCli
- Launched PowerCli
- cd c:\scripts
- and run ./DailyReport.ps1 vcname
Do you something I forgot ?
Dominic
Hello,
Now it connect the VC but I received the following :
Exception calling "Send" with "1" argument(s): "failed to send mail."
At C:\Scripts\DailyReport.ps1:60 char:14
+ $mailer.send( <<<< $msg)
???
Thank you
Dominic
Did you set up you mail options? lines 17 - 23
# $SMTPSRV = "myexchangeserver.mydomain.comk" # # # # Set the Email address to recieve from # $EmailFrom = "reports@mydomain.com" # # # # Set the Email address to send the email to # $EmailTo = "myemail@mydomain.com"
yes. When I put a remark before the send mail command, the program runs well.
...and you uncommented the lines below to get the file?
#Uncomment the following lines to save the htm file in a central location #$Date = Get-Date #$Filename = "C:\Temp\" + $VIServer + "DailyReport" + "_" + $Date.Day + "-" + $Date.Month + "-" + $Date.Year + ".htm" #$MyReport | out-file -encoding ASCII -filepath $Filename #Invoke-Item $Filename
It works
Thank you for your help
Dominc