Use PowerShell’s Invoke-WebRequest to report if a website is up or down

If Internet Control Message Protocol (ICMP) — a protocol used to communicate problems with data transmission — is disabled, PowerShell’s Invoke-WebRequest can be a helpful alternative to use to monitor of a website is up or down. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 …

PowerShell Functions to Get Logged On User and Logoff Logged On User

Two helpful PowerShell functions to help you check who is logged on remotely and to remotely log them off. Remotely Get a Logged On User This Get-LoggedOnUser will use Get-WmiObject to tell you who is logged on to a remote computer. You may use a comma-delimited list of computer names. Function: 1 2 3 4 …

Use IPdeny to create Mail flow rules (transport rules) in Exchange Online

This PowerShell script will help an Office 365 administrator or Exchange Online administrator block incoming email messages originating from specific countries using data from IPdeny. About IPdeny country block downloads IPdeny compiles raw data from regional internet registries and offers free of charge country IP address block downloads. Their country IP zone files can be …

PowerShell Set-ADAccountPassword -WhatIf bug

Today (2017 March) I unfortunately learned of the -WhatIf bug for the PowerShell Active Directory cmdlet Set-ADAccountPassword. About -WhatIf “-WhatIf” is a common PowerShell System State parameter that is supposed to “Explain what will happen if the command is executed, without actually executing the command.(Boolean ) -whatif:$false or -whatif:$true.” I use it all of the …

Use PowerShell to log logon and logoff activity on domain computers

There are many ways to log user activity on a domain. One of the ways that I prefer is to write user logon and logoff activity to plain text files on a network share. I used to do this via a .bat file, but recently rewrote the process using PowerShell. Create a Shared Folder for …