Tech Lab /
Get Started

Take advantage of our commitment to Fanatical Service, enhance your Peace of Mind and get Fully Managed®.

Five Useful Commands for Microsoft Systems Administrators

Scottby Scott @ Fully Managed™
Posted 7 years ago

This is a quick post with five useful commands we use at Fully Managed® maintaining Active Directory, Exchange 2007, and Windows Server and Client environments. I hope that you find these useful, please feel free to provide any other useful commands you might want to see included in my next post.

1. Active Directory - Find Stale Computer Accounts

The following command is extremely useful to locate computer accounts which are stale / inactive. It must be run from a command line on domain controller (DC) running as domain admin:

dsquery computer domainroot -stalepwd 180 -limit 0

2. Exchange 2007 - List Mailboxes by Size

Exchange 2007 provides an easy way to get a list of mailboxes along with their associated size and item count. Here is the magic command:

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},ItemCount

3. Test your Exchange 2007 autodiscovery and Outlook Anywhere

This tool provided by Microsoft provides a simple way to test to ensure that Outlook Anywhere is working properly for Outlook Web Access, Outlook Anywhere and Mobile Devices including iPhones and other ActiveSync-enabled devices.

4. Windows 7 - Expanded Options with Shift+Right-Click

In Windows 7, the Shift plus right-click option provides a number of helpful options:

On a file

  1. Gives Copy as Path which copies the full path and file name of the file to your clipboard
  2. Send To options are greatly expanded

On a folder

  1. Copy as Path - same as above
  2. Open command window here
  3. Open in new process

5. Windows Workstations & Servers - Find an uninstall string for an application

It is often very useful to locate the uninstall string for an application so that it can be automatically removed using a 3rd party scripting tool. Both Kaseya and Zenith InfoTech management consoles provide options to execute commands "en masse". We use this often to remove software from a large number of systems at the same time. We've often used this when taking over management of IT systems from a competitor to ensure that any remnant software is removed, for example.

  1. Open RegEdit and navigate to HKLM\Software\Microsoft\Windows\Currentversion\Uninstall\[name ofapplication]\UninstallString
  2. The application can now be uninstalled using
msiexec /X <uninstall string> /q
msiexec /X{5AECB877-3348-44E4-AD4C-90C39F335288} /q

Alberta's Best Workplace 2013

BBB
Creating Peace of Mind for businesses and non-profits across North America since 2002.
© 2017 Fully Managed Inc. All rights reserved. Contact Us. Privacy.
Help