Category Archives: Windows Server 2008 R2

Don’t reinvent the wheel

Way back when I used to take Microsoft certification exams there were often questions of the form “Perform task X with the minimum of administrative effort” Most, if nor all, of the possible answers would be correct but the correct … Continue reading

Posted in Powershell, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016 | 1 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

Using Windows 2012 Active Directory module in a Windows 2008 R2 domain

A question came up on Tuesdays UK PowerShell Group session about using the Windows 2012 Active Directory module. The recording links are here http://msmvps.com/blogs/richardsiddaway/archive/2012/05/30/may-2012-powershell-group-recording-and-slides.aspx The question asked if the new Site, Subnet and Site link cmdlets would work in a … Continue reading

Posted in PowerShell and Active Directory, PowerShell V3, Windows 8 Server, Windows Server 2008 R2 | Leave a comment

BITS posts

BITS is the Background Intelligent Transfer Service.  I’ve started a series of posts on using the PowerShell BITS cmdlets on my IT Knowledge Exchange blog 1  http://itknowledgeexchange.techtarget.com/powershell/bits/ 2 http://itknowledgeexchange.techtarget.com/powershell/download-multiple-files-by-bits/ 3 http://itknowledgeexchange.techtarget.com/powershell/upload-through-bits/ More to follow

Posted in BITS, PowerShell V2, Windows Server 2008 R2 | Leave a comment

Remoting between PowerShell v3 CTP 2 and PowerShell v2

One of the questions on tonight’s Live Meeting concerned the compatibility between remoting on PowerShell v2 and PowerShell v3 CTP 2 The difference is that v3 uses a WSMAN 3.0 stack but v2 uses 2.0 I used two machines: Windows … Continue reading

Posted in PowerShell V2, PowerShell V3, Windows 7, Windows Server 2008 R2 | 6 Comments

AD account Expiry date

In many organisations AD accounts for temporary works are set to expiry when their contract ends.  Its also a good practice to put an expiry date on any one who is leaving – that way you know their account won’t … Continue reading

Posted in PowerShell and Active Directory, Windows Server 2008 R2 | Leave a comment

Using AccountManagement classes to set local accounts expiry

This is a little more verbose than the WinNT example function set-expirydate { [CmdletBinding(SupportsShouldProcess=$true)] param ( [parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string]$computer, [parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string]$id ) BEGIN {Add-Type -AssemblyName System.DirectoryServices.AccountManagement} PROCESS { switch ($computer){ “.” {$computer = $env:computername} “localhost” {$computer = $env:computername} } … Continue reading

Posted in IT Security, PowerShell and Active Directory, Windows 7, Windows Server 2008, Windows Server 2008 R2 | Leave a comment