Check Exchange Service Status
This command is helpful in quickly seeing which services are running particularly after a reboot.
This command is helpful in quickly seeing which services are running particularly after a reboot.
On web servers, and Exchange OWA servers especially, there are a lot of OWA logs which can be found in C:\inetpub\logs\LogFiles\W3SVC1.
Generating a password with PowerShell is relatively easy if you leverage a particular method of .Net, System.Web.Security.Membership. Add-Type -AssemblyName System.Web[System.Web.Security.Membership]::GeneratePassword(8,2) Simple and to the point. But below is a pretty good function to do something similar, if you are curious about string operations with PowerShell. function Get-RandomPassword($length){ $length-=1 $lower = ‘abcdefghijklmnopqrstuvwxyz’ $upper = $lower.ToUpper() $number = 0..9 $special=’~!@#$%^&*()_+|}{[]\’ $chars = “$lower$special$upper”.ToCharArray() $pass = Get-Random -InputObject… Read More »
Just a quick PowerShell one-liner to display all the shutdown events on a computer.
In my current position, I use PowerShell quite a bit, but not just for automation of repetitive tasks. I thought I would take a few minutes to jot down a few one-offs that might be of use to other folks. Some of these might even be useful in larger scripts.
This is a simple but useful command line utility for determining the uptime of the local computer.
Programmatically creating an new Windows Event Viewer log can be quite useful during automated processes. While some folks know how this is done, others might needs some guidance. Here’s how to do it with PowerShell.
Sometimes, you need to tattle on a user to their manager. But how to find out who their manager is, and their email address? Here is how I did it with PowerShell. At my job, stale user accounts are not tolerated. Inactive accounts are disabled after a period of time, with no warning. However, I wanted to at… Read More »
You can use this handy little script to find remote desktop sessions on all servers running in your Active Directory domain.
Getting the hostname from an IP address (or vice versa) is no great magic, and can be done easily with PowerShell, by simply leveraging .Net to do the work. We’ve all done something like this to get resolve an IP address: [System.Net.Dns]::GetHostEntry(“69.69.95.133”).HostName Or this to get an IP address from a hostname: [System.Net.DNS]::GetHostAddresses(“www.fortypoundhead.com”).IPAddressToString But did you ever notice… Read More »