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

PowerShell : Adding records to the hosts file

#PowerShell

This is always a pain. Its much easier to just open a PowerShell windows as an administrator and issue the following Add-Content C:\Windows\System32\drivers\…

Mat Grumpy Tech

Hyper-v, Powershell : Get the hostname of the server hosting your VM

#PowerShell #Hyper-V

I always forget this so: (get-item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").GetValue("HostName")…

Mat Grumpy Tech

PowerShell + Windows Firewall: RDP Brute Force Protection - UPDATE

#PowerShell

If you have a server on the internet you will probably already be aware that there are scumbags out there running apps that just scan every…

Mat Grumpy Tech