Check Exchange Queues
Get-Queue cmdlet allows to check mail queues on the Exchange server.
Get-Queue cmdlet allows to check mail queues on the Exchange server.
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.
Some time ago, a user named VB6Boy posted a handy little VBScript that dumps out records from a database table to a series of text files. The method works fine, but takes an exorbitant amount of time for large datasets. Can we do better? Another user commented on the post mentioned above, stating that he (or she) was using the script as… Read More »
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 »