Monthly Archives: September 2012

Jobs, WMI, CIM and more jobs

Background jobs were one of the most undervalued aspects of PowerShell v2. With the introduction of PowerShell v3 we get ways to schedule those jobs. In this post though I want to look at the new CIM cmdlets and jobs. … Continue reading

Posted in PowerShell and WMI, PowerShell V3 | Leave a comment

WMI over WSMAN

Every time I look at PowerShell v3 I seem to find a new way to access WMI! I’ve covered the –ComputerName and –CimSession parameters before but to recap We duplicate the way Get-WmiObject works: $computer = $env:COMPUTERNAME Get-CimInstance -ClassName Win32_OperatingSystem … Continue reading

Posted in PowerShell and WMI, PowerShell V3 | Leave a comment

PowerShell remoting and upgrading to Windows 2012

I have a number of  virtual machines running Windows 2008 R2 and I upgraded one of them to Windows 2012 – an over the top upgrade rather than a format and clean install I found that Get-PSSession –Computername didn’t work … Continue reading

Posted in PowerShell V3, Windows Server 2008 R2, Windows Server 2012 | 1 Comment

Scripting Games 2013

Advanced notice that there will be a Games next year – its changing a bit though.  See http://powershell.org/games/

Posted in Powershell, Scripting Games | Leave a comment

Using –showwindow

The new –showwindow parameter in Get-Help pops up a little window containing the FULL help file.  Much better than having to rememebr to use –full.  PowerShell immediately returns the prompt so you can continue working – means you can have … Continue reading

Posted in PowerShell V3 | Leave a comment

Change user attribute based on group membership

Want to change an attribute on all members of an Active Directory group.  Then try this Get-ADGroupMember -Identity Legal | where {$_.objectclass -eq “user”} | foreach { Set-ADUser -Identity $($_.distinguishedName) -Department “Student” } Get the group members – filter out … Continue reading

Posted in PowerShell and Active Directory | Leave a comment

Decoding the mounted device information

In the previous post we looked at how to read the mounted device information. The data is in binary though – if you want it readable and not all of it is readable – try this $data = @() Get-Item … Continue reading

Posted in Powershell, Registry | Leave a comment