Category Archives: PowerShell V2

PowerShell 2.0 Engine removed from Server 2016

I hadn’t realised that the PowerShell 2.0 engine had been removed from Windows Server 2016 TP5 PS C:\Windows\system32> Get-WindowsFeature  PowerShell-V2 | ft -a Display Name                          Name          Install State ————                          —-          ————- [ ] Windows PowerShell 2.0 Engine PowerShell-V2       Removed Probably … Continue reading

Posted in PowerShell V2, PowerShell v5, Windows Server 2016 | Leave a comment

Getting mailbox data and stats per database

Way back in the day – – I showed how to list mailboxes by the database in which they were stored.  I had a comment left asking if its possible to list only a specific mailbox and to give … Continue reading

Posted in Exchange, PowerShell V2 | Leave a comment

End of PowerShell Jobs week

My series on PowerShell Jobs for the Scripting Guy blog has finished.  The set of articles is: Jobs week 1 : Introduction to PowerShell jobs Jobs week 2 : WMi and CIM jobs  Jobs week 3 : Remote Jobs  Jobs … Continue reading

Posted in Powershell Basics, PowerShell V2, PowerShell V3, PowerShell v4 | Leave a comment

It’s the little things

I’ve been spending some quality time with PowerShell 2.0 recently. When it was all we had it was great but there’s a bunch of things I miss from PowerShell 3.0 including: CIM cmdlets CIM sessions Workflows Module auto loading Improved … Continue reading

Posted in PowerShell V2, PowerShell V3 | Leave a comment

Creating DNS PTR records

When I was writing the DNS chapter of PowerShell in Practice I couldn’t get the CreateInstanceFromPropertyData  method on the MicrosoftDNS_PTRType  class to work. Revisiting DNS for AD management in a Month of lunches this time round I have access to … Continue reading

Posted in DNS, PowerShell and WMI, PowerShell V2, PowerShell V3 | 4 Comments

Displaying data from multiple servers as HTML

A forum question regarding retrieving WMI based data from multiple servers and displaying it as HTML was interesting.  I would approach it like this $servers = Get-Content -Path C:\scripts\servers.txt $data = @() foreach ($server in $servers){ $compdata = New-Object -TypeName … Continue reading

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

Ensuring that parameter values are passed to your function

A question on the forum about a function had me thinking. The user had defined two parameters for the function and then used Read-Host to get the values. NO Much better way is to use an advanced function and make … Continue reading

Posted in Learning Powershell, PowerShell and Active Directory, PowerShell V2, PowerShell V3 | 1 Comment