Ok, this one is perhaps a little silly, but have you ever struggled with writing output involving an integer with an unknown value together with some text? Don’t know what I’m talking about? I don’t blame you!
(more…)
Invoke-CreateModuleHelpFile
Are you a PowerShell toolmaker, and create your own modules? Have you ever wanted to create a help document to distribute together with it? Look no further.
(more…)
List-vmPortGroups
This script takes the name of one or more VMWare host as input and lists all configured port groups.
(more…)
Get-ADObject
This is the first version of a script that uses .NET to query Active Directory. Some limitations apply at the moment, such as a proper filtering system, but that will hopefully be added in future updates.
(more…)
Export-Excel
Here is a script to export object data to an Excel document.
(more…)
Get-DiskInfo
This rather simple script will take one or more, local or remote, computer(s) as input and return an object with disk volume information. Should be easy enough to understand, but I’ll try to add some get-help stuff to it later.
(more…)
VMWare: Get basic datastore information
This script will take a name of a specific datastore, a list of datastores, or if none is specified query vSphere for ALL datastores, and will return an object with some basic information.
(more…)
Microsoft Cluster – Get group ownership information
Ok, there are probably several different ways you can get information about cluster group ownership, and I’ll try to post a “proper” script for doing this some other time. For now I just wanted to share with you the mother of all one-liners:
(more…)
Get-Uptime
This is a script that I use alot. It uses WMI to query a remote computer and return an object showing how long the computer have been running since last reboot.
(more…)
Ping x 3
Often when running WMI queries against a set of computers, the total script execution time can be quite long. Especially if there are computers that are unreachable, as the default WMI timeout is quite long. Therefore it’s always smart to do a ping check first, so that you only run the WMI query against a computer you have verified is reachable.
I’m going to show you three different ways of doing ping check using PowerShell. For this test I’m pinging google.com and I’m only after a true/false response whether the target is reachable or not.
(more…)