Notes from a two hours class with Ed Wilsen aka ‘Scripting Guy’ (

If you can use/learn something from it, good 🙂 If not, read Ed’s blog!

-PowerShell, learn it now before it is an emergency!

Enable PowerShell remoting

Notice how it tells you exactly what it’s going to do!

This can be done through GPO as well.

Run Get-ADComputer -Filter * to list all your computers in Active Directory.

Add –Properties OperatingSystemVersion to list this value too.


If you add this to a variable you can auto foreach through it

Cool, eh? 🙂


How to easily store your credentials?

$cred = Get-Credential -Credential domain\username

You can also put this in your profile and just type it in once each time you open a new session.



What Is CIM?

The Common Information Model (CIM) is an object-oriented model that represents and organizes the information in a “managed environment.” CIM objects include computer systems, devices (like printers and batteries), controllers (for example, PCI and USB controllers), files, software, physical elements (like chassis and connectors), people, organizations, networks, protocol endpoints, policy, and more. CIM also is evolving its eventing object hierarchy and mechanisms.

CIM is a lot faster than WMI queries.

How can you use it?

WMI> gwmi win32_bios

CIM> gcim win32_bios

What does that give us?

Is that all the properties of that class? No

How can you examine those?

You can also type this to examine all the methods and properties you can use/ask this class


If you need to gather much data, store it in a variable so you can continue to work with it.

Just swallow the elephant once! 🙂


How can you run a PS session on a remote computer?

Enter-PSSession –Computername <computername>

Notice the [Computername] tag in front of the prompt telling you which computer you are running PS on 🙂


There was a lot more stuff he showed us, but I couldn’t write fast enough…


Leave a Reply