Archive

Posts Tagged ‘Windows Management Instrumentation (WMI)’

Send eMail and SMS Text Messages with PowerShell

August 23rd, 2009 No comments

Thanks to the .NET library sending emails with PowerShell is surprisingly very simple! One thing to remember is line breaks, when you need a new line, make sure to use the escape characters `n . In the first example, I’ll send just a regular email, in the second I’ll send a SMS text message. Read more…

Pass Credentials via PowerShell

August 23rd, 2009 No comments

I’ve often found it necessary to pass my Administrator domain or Domain Admin (DomAdmin) credentials to run a PowerShell WMI command. Fortunately PowerShell provides 3 different ways of doing just that, not counting using Windows built in runas command. The three methods I’m going to go over are

  1. Entering your own unique credentials
  2. Entering a service account password, ie: the same username (or hard coding a username)
  3. Hard coding a user name and password

Read more…

Accessing WMI Information From PowerShell

July 25th, 2009 No comments

I’m starting to learn how powerful the Windows Management Instrumentation aka Windows WMI is. One of the simpliest ways I found of accessing the information is via Windows PowerShell. Here is a simple PowerShell command that will return the Win32_OperatingSystem information. Read more…