Hi LucD, As you suggested, i upgraded and its running without any error but alerts are not resetting green. PS C:\Users\RachappaChalmi\Documents\Scripts> .\AlarmTestvCenter.ps1 PS C:\Users\Rachapp...
See more...
Hi LucD, As you suggested, i upgraded and its running without any error but alerts are not resetting green. PS C:\Users\RachappaChalmi\Documents\Scripts> .\AlarmTestvCenter.ps1 PS C:\Users\RachappaChalmi\Documents\Scripts> .\AlarmTestvCenter.ps1 PS C:\Users\RachappaChalmi\Documents\Scripts> .\AlarmTestvCenter.ps1 PS C:\Users\RachappaChalmi\Documents\Scripts> Below is the script you shared, i just put this in notepad and made it .ps1 and ran it. but alerts are not resetting $alarmMgr = Get-View AlarmManager $filter = New-Object VMware.Vim.AlarmFilterSpec $filter.Status += [VMware.Vim.ManagedEntityStatus]::red $filter.TypeEntity = [VMware.Vim.AlarmFilterSpecAlarmTypeByEntity]::entityTypeAll $filter.TypeTrigger = [vmware.vim.AlarmFilterSpecAlarmTypeByTrigger]::triggerTypeAll $alarmMgr.ClearTriggeredAlarms($filter)
when I use this , I am getting below error New-Object : Cannot find type [VMware.Vim.AlarmFilterSpec]: verify that the assembly containing this type is loaded. you also discussed solution for this ...
See more...
when I use this , I am getting below error New-Object : Cannot find type [VMware.Vim.AlarmFilterSpec]: verify that the assembly containing this type is loaded. you also discussed solution for this in below tread but am still not able to able to understand, would you be able provide step by step what exactly needs to be done to fix this if possible ? https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/how-to-use-powercli-Data-Objects/m-p/1376175#M43525
Hi LucD, I am looking for PowerCLI script which clears all the vCenter alarms in one shot, I just want to schedule this every week Friday end of business hours, can you pls help me with script to c...
See more...
Hi LucD, I am looking for PowerCLI script which clears all the vCenter alarms in one shot, I just want to schedule this every week Friday end of business hours, can you pls help me with script to clear all the alarms in mulitple vCenters in one shot pls ?
Hi Luc , I have two requests to you. 1 - I am trying to use multiple hosts like below in your above script but its not working $esxName = @("myesxi1","myesxi2") $esx = Get-VMHost -Name $esxName...
See more...
Hi Luc , I have two requests to you. 1 - I am trying to use multiple hosts like below in your above script but its not working $esxName = @("myesxi1","myesxi2") $esx = Get-VMHost -Name $esxName $cmdsub = @' /etc/init.d/slpd stop; /etc/init.d/slpd status; esxcli network firewall ruleset set -r CIMSLP -e 0; chkconfig slpd off; chkconfig --list | grep slpd; '@ $secPswd = ConvertTo-SecureString 'ESXI510U2' -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential ('root', $secPswd) Get-VMHostService -VMHost $esx | where{$_.Key -eq 'TSM-SSH'} | Start-VMHostService -Confirm:$false | Out-Null $session = New-SSHSession -ComputerName $esx.Name -Credential $cred –AcceptKey Invoke-SSHCommand -SSHSession $session -Command $cmdSub | Select -ExpandProperty Output Remove-SSHSession -SSHSession $session | Out-Null Get-VMHostService -VMHost $esx | where{$_.Key -eq 'TSM-SSH'} | Stop-VMHostService -Confirm:$false | Out-Null 2 - We have standalone ESXi hosts around 178 and your original script is not working for them too, can you help on this as well (again password is same for all)
Hi Luc, Oh ok, got it, Actually we have around 2157 ESXi hosts and majority of them have same root passwords, hence I was looking for an option to apply this script once for all of them.
/Hi Luc, Thanks for above script but can we do this same at vCenter level which dont ask for ESXi root password as we have different different root passwords for all the ESXi hosts to perform this C...
See more...
/Hi Luc, Thanks for above script but can we do this same at vCenter level which dont ask for ESXi root password as we have different different root passwords for all the ESXi hosts to perform this CIMSLP actions ?
Hi LucD, I also have the same requirement as this thread but I need to list all the datastore where VMs active files are residing, because SimpliVity restore dont support if the active files of the ...
See more...
Hi LucD, I also have the same requirement as this thread but I need to list all the datastore where VMs active files are residing, because SimpliVity restore dont support if the active files of the VMs are in multiple folders in same datastore or different datastores. can you help me with this pls.
Hi All, I am using below script to send mails with multiple attachments but it sending only first file in the folder, need your help. $runDateTime = Get-Date $smtp = "smtp.server.com" ...
See more...
Hi All, I am using below script to send mails with multiple attachments but it sending only first file in the folder, need your help. $runDateTime = Get-Date $smtp = "smtp.server.com" $to = "mymailid@com" $cc = "mymailid@com" $from = "mymailid@com" $subject = "HangIssueReport_CL04 - $runDateTime" $attachmentLocation = "E:\Report\ovc1.2.3.4" $attachmentLocation = "E:\Report\ovc2.3.4.5" $attachmentLocation = "E:\Report\ovc3.4.5..6" $attachmentLocation = "E:\Report\ovc4.5.6.7" $body = "Hi Team, Good Day, <br><br>" $body += "This is the <b>lsof report </b> you received at <i>$runDateTime.</i><br><br>" $body += "Have a great day!<br><br>" $body += "Thank you <br><br>" $body += "Test<br>" $body += "Test " Send-MailMessage -SmtpServer $smtp -To $to -Cc $cc -From $from -Subject $subject -Body $body -BodyAsHtml -Attachments $attachmentLocation Write-Host "====== Email sent! ======" $attachments = @() foreach($file in $files){ $filename = [system.io.path]::GetFileName($file.FullName) $attachments += $file.fullname $body += "TEST <br /><img src='" + $filename + "'/>TEST <br />"