Powershell Engine

Efficient Use of Powershell across Domain Controllers: LastLogon Part 2

Our previous script was simple but not quick. Our second attempt will try to reduce the time it takes to gather all the pieces. First of all we may imagine that our use of the hashtable in Powershell may be inefficient as we start from 0 object and are continuously […]

Efficient Use of Powershell across Domain Controllers: LastLogon Part 1

One of the frequent reports you’re asked to do when you’re administering an Active DIrectory is to know when a user has connected for the last time or how long has a computer account been inactive. In the infancy of the Active Directory, Microsoft faced these requirements too. In Windows […]

Jobs in Powershell

This post serves more as a reference that an introduction to Powershell Jobs. Cmdlets are: Get-Job, Receive-Job, Remove-Job, Resume-Job, Start-Job, Stop-Job , Suspend-Job and Wait-Job but other commands have -AsJob parameters (Get-WMIObject, Invoke-Command, CDXML snippets) Help can be found in the following topics: about_Jobs about_Job_Details about_Remote_Jobs about_Scheduled_Jobs about_Scheduled_Jobs_Advanced about_Scheduled_Jobs_Basics about_Scheduled_Jobs_Troubleshooting Suspend-Job and Resume-Job […]

Quickly apply a XSLT Transform to a XML file

Continuing the series of Powershell snippets, here’s how to apply a xslt file to a xml file:


ASCII Table in Powershell (or how get around keyboard layout mapping issues)

Imagine you have to connect to a Citrix server using the java client and the keyboqrd layout of the machine you’re using is not properly sert up there? Imagine that the CItrix administrator doesn’t have the character map tool enabled. Just use this snippet of powerhell to get a nice […]

Quickly moving FSMO around Domain Controllers with Powershell AD Cmdlets

Of course, Microsoft provides us with a cmdlet to move FSMO roles between Domain Controllers… But as often, this doesn’t seem to be designed by people who use it. First, the name of the cmdlet is lengthy: Move-ADDirectoryServerOperationMasterRole Second, you must indicate every FSMO role you want to move amongst […]

Getting all domain controllers in a forest 2

Using something like Get-ADDomainController -Forest would be something too easy for module designers at Microsoft. Or does Microsoft no longer have multi-domain forests in its internal IT? Never mind, here is a nice snippet to retrieve that you may want to adapt to the fields you need to retrieve