Friday, 18 September 2009

Using FIND as a GREP alternative for Windows

You can use the Windows 'find' command in a similar manner to how 'grep' would work in a UNIX-based system.

Find can search through files for strings but also can have output piped to it. So for example, to list all the services containing the word 'Sophos' on a remote computer, you can use the syntax:

sc \\computername query |find "Sophos"

Tuesday, 15 September 2009

Use Powershell to display a list of mailboxes and their SMTP addresses

Use the Powershell command:
get-mailbox * | select displayname, primarysmtpaddress
This will list all the mailboxes on the server and the primary email address next to it.