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
Category Archives: Powershell
Powershell: Getting monitor info
Today I got a request from a colleague of mine that was doing inventory: What are the make, model, serial number and purchase date of your monitors? Seeing as this wasn’t something I had readily in my head I had … Continue reading
Posted in Microsoft, Powershell
Tagged Get-WmiObject, Powershell
Powershell and the HPE 3PAR REST API
Lately, I’ve had the pleasure of using Powershell to automate some of the basic tasks we do on our HPE 3PAR systems: creating volumes, adding them to volume sets, exporting them and so on. Since my experience with REST APIs … Continue reading
Posted in HPE 3PAR, Powershell
Tagged 3PAR, boot lun, HPE 3PAR, Invoke-RestMethod, Powershell, REST
Powershell: Creating strong passwords
A tweet from @JanEgilRing caught my eye this morning, it was showing how you can use powershell to create passwords. The link in the tweet pointed here: http://powershell.com/cs/blogs/tips/archive/2016/05/23/one-liner-random-password-generator.aspx Seeing that line and realizing how simple it was, it got me thinking on how I … Continue reading
Posted in Microsoft, Powershell
Tagged password, Powershell, regex
PowerCLI: Function for listing snapshots
My very first PowerCLI related post was about this same topic: listing snapshot info using PowerCLI. In my original post (which you can see here) I only wrote a pretty simple one-liner. Which was kind of okay, but it was … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged function, get-snapshot, get-snapshots, get-vievent, powercli, Powershell, snapshots, vmware
PowerCLI: Evacuating a datastore
In case you ever need to empty out a datastore in you vmware environment, there is a nice little one-liner in PowerCLI for that: Get-VM -Datastore “datastore1” | Move-VM -Datastore (Get-VMHost -Location ‘cluster1’ | Select-Object -First 1 | Get-Datastore | … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged one-liner, powercli, Powershell, storage vmotion, vmware
PowerCLI: Listing VMs with ISOs mounted
For almost a year ago, I posted a simple one-liner to list all VMs who has ISOs mounted. You can view that post here: http://cloud.kemta.net/2013/10/powershell-vmware-list-all-vms-with-iso-mounted-and-dismount-them/ That post was written before I truly discovered the major advantages of using Get-View instead of … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged dismount iso, function, get-isomounts, iso mount, powercl, powersh, vmware
PowerCLI: Getting vmhost uptime
I love a powershell challenge, and last week a colleague of mine asked me for assistance in getting the uptime of vmware hosts. My initial response did the trick: Get-View -ViewType hostsystem -Property name,runtime.boottime | Select-Object Name, @{N=”UptimeDays”; E={((((get-date) – … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged function, get-vmhostuptime, powercli, Powershell, uptime, vmhost, vmware
PowerCLI: Getting the status of vmware tools on all VMs
I’m sure I don’t need to explain to you guys why VMware tools is a good idea to have installed on your VMs, and probably not why it’s a good idea to keep VMware tools updated. However, I haven’t found … Continue reading
Posted in PowerCLI, Powershell, VMware
Tagged function, get-vmtoolsstatus, powercli, Powershell, vmware, vmware tools
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