Tags
2008R2 Access List ACL activate by phone active directory ActiveSync ACU Address list alarms Anonymous relay array backup cacls catch cd-key cisco Citrix CUSD DAG dismount iso dns Exchange Fortigate Fortinet function get-eventlog get-snapshot get-vm HPE 3PAR Linux Lync microsoft Permissions powercli Powershell Powershell agent PSA PuTTY registry script UCS Director vmware Windows 7 Windows Server Zenoss-
Recent Posts
Recent Comments
- Mark Cloney on PowerCLI: Getting vmhost uptime
- Pierre Wong on Powershell: Listing activated clients on KMS server
- Ian on “The given Key was not present in the dictionary” error when running Group Policy Modeling
- Ian on “The given Key was not present in the dictionary” error when running Group Policy Modeling
- Wasim on Resetting the Discretionary Access Control List (DACL) in a Windows Service security descriptor
Categories
- Ad
Tag Archives: Powershell
PowerCLI: Getting datastore alarms
Next in the series on getting alarms is getting datastore alarms. Again, the code is pretty similar: $Datastores = Get-View -ViewType Datastore -Property Name,OverallStatus,TriggeredAlarmstate $FaultyDatastores = $Datastores | Where-Object {$_.TriggeredAlarmState -ne “{}”} $progress = 1 $report = @() if ($FaultyDatastores … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged alarms, function, get-datastorealarms, powercli, Powershell, vmware
PowerCLI: Getting cluster alarms
The next step in my short series on getting vCenter alarms using PowerCLI is to get cluster alarms. Here’s the code: $Clusters = Get-View -ViewType ComputeResource -Property Name,OverallStatus,TriggeredAlarmstate $FaultyClusters = $Clusters | Where-Object {$_.TriggeredAlarmState -ne “{}”} $report = @() $progress … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged alarms, function, get-clusteralarms, powercli, Powershell, vmware
PowerCLI: Getting host alarms
Yesterday I wrote a post about getting vm alarms through PowerCLI. Today it’s time for getting host alarms The code is very similar to the one for getting vm alarms, since they both use get-view to grab all info: $VMHosts … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged alarms, function, get-vmhostalarms, powercli, Powershell, vmware
PowerCLI: Getting vm alarms
A few weeks ago I started to put together a health check script for our vmware environments and the first thing I wanted to have in that report is a list of triggered alarms. To my surprise there was no … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged alarms, function, get-vmalarms, powercli, Powershell, vmware
PowerCLI: Mount NFS stores on multiple hosts
Ever had a bunch of vmware hosts that you want to add a NFS datastore on? It can be quite time consuming to say the least. In our environment we have a couple of NFS stores that should be available … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged mount nfs, Mount-NFSstores, powercli, Powershell
Powershell: Listing activated clients on KMS server
If you are using a KMS server for activating servers and clients in your environment, you may have noticed that there’s really no obvious way to get a list of all the clients that have been activated by the KMS … Continue reading
Posted in Microsoft, Powershell
Tagged get-eventlog, KMS, Powershell
Powershell: Measuring latency on DNS queries
A little while ago we have some issues with one of our Exchange environments. The symptoms was that basically everything was slow, opening address books, owa, sending mails and so on. After some digging it occurred to me that this … Continue reading
Posted in Microsoft, Powershell
Tagged dns, dns latency, function, Measure-DNSLatency, Powershell
Powershell: Write-Progress, a step-by-step guide
For whatever reason, I had a really difficult time wrapping my head around the usage of Write-Progress. The basic usage is off-course quite easy: Write-Progress -Activity “Something” -Status “Something else” -CurrentOperation “thinking” -PercentComplete 30 This will show a quick progress … Continue reading
Posted in Microsoft, Powershell
Tagged guide, Powershell, write-progress
PowerCLI: Locate a MAC-address in vCenter
To find out to which vm a MAC address belongs, you can use a simple one-liner: Get-vm | Select Name, @{N=“Network“;E={$_ | Get-networkAdapter | ? {$_.macaddress -eq“00:50:56:A4:22:F4“}}} |Where {$_.Network-ne “”} (Courtesy of this page: http://www.virtu-al.net/2009/07/07/powercli-more-one-liner-power/ ) Thats really great, and you … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged function, get-macaddress, get-vm, powercli, Powershell, vmware
PowerCLI: List all vm’s with ISO mounted and dismount them
Easy-peasy and a pretty short post… To get all vm’s with iso mounted: Get-VM | Get-CDDrive | select @{N=”VM”;E=”Parent”},IsoPath | where {$_.IsoPath -ne $null} Then, to dismount those: Get-VM | Get-CDDrive | where {$_.IsoPath -ne $null} | Set-CDDrive -NoMedia -Confirm:$False
Posted in PowerCLI, Powershell, VMware
Tagged dismount iso, get-vm, powercli, Powershell, set-cddrive, vmware