PowerShell

A collection of powershell what I have done

PowerShell, Active Directory : Uncheck password does not expire

#PowerShell

If you have lots of accounts that have passwords set to never expire this script will hunt them out and correct that for you Import-Module ActiveDirectory…

Mat Grumpy Tech

PowerShell: Get last AD user login

#PowerShell

This is a little more tricky than it looks. Last  login is only stored on the DC that last authenticated the user, hence you need to…

Mat Grumpy Tech

PowerShell : System Audit (How to correctly use Invoke-Command for batch jobs)

#PowerShell

I rececently revisted an old script that i had build to audit flash versions. In this 200+ line script, I pulled the machine list from AD…

Mat Grumpy Tech

PowerShell + Confluence: Update an Atlassian Confluence page from PowerShell

#PowerShell

Something a with a little more meat on it for those of you that have used Atlassian Confluence. I imagine this would usually be done in…

Mat Grumpy Tech

PoweShell: Send email from script

#PowerShell

This is pretty simple and well documented. I even use some version of it in several of my other scripts listed on this site but I…

Mat Grumpy Tech

Powershell: WSUS maintenance Script

#PowerShell

I have written this a few times for various companies I have consulted for and each time it gets a little more efficient.  This is the…

Mat Grumpy Tech

PowerShell: Get Windows licensing status for domain machines

#PowerShell

I cant really claim credit for this as I have  just used this function https://social.technet.microsoft.com/wiki/contents/articles/5675.powershell-determine-windows-license-activation-status.aspx However…

Mat Grumpy Tech

PowerShell : Why can't my user log on?

#PowerShell

If you want to know the reason why a users log on attempt failed, the information is there but its burried in a pile of events…

Mat Grumpy Tech

PowerShell : Identify unused GPO with ZZZ_

#PowerShell

A nice and quick one for you. This will find any group policy objects that you have in your domain that are not in use and…

Mat Grumpy Tech