PowerShell for Windows Admins:

WMI


September 27, 2011  1:49 PM

WMI provider and MOF file



Posted by: Richard Siddaway
PowerShell v2, WMI

WMI is installed as a series of providers. The information on creating the classes comes from MOF files. I was recently asked about a problem with a specific class & could it be restored – in this case it was easier to rebuild WMI as the provider created a large part of the root\cimv2...

September 25, 2011  1:35 PM

Proxy function for Get-WmiObject



Posted by: Richard Siddaway
PowerShell v2, WMI

There are many people who don’t like to see the WMI system properties

PS> Get-WmiObject -Class Win32_OperatingSystem | select __*


__GENUS          : 2


September 14, 2011  1:57 PM

The Experts Conference April 2011–My session



Posted by: Richard Siddaway
PowerShell v2, WMI

Dmitry has just posted the video of the session I did at the PowerShell deep dive @ TEC in April

Bookmark and Share     0 Comments     RSS Feed     Email a friend


September 8, 2011  2:46 PM

Quirks of Get-member and WMI objects



Posted by: Richard Siddaway
PowerShell v2, WMI

I have been asked about discovering the methods available on a WMI object. I’ve mentioned the GetMethodParameters method a few times but it can be difficult to find.  Normally if we want to discover the methods on an object we would do this

 

Get-WmiObject...


September 6, 2011  11:29 AM

Test for domain membership



Posted by: Richard Siddaway
Active Directory, PowerShell v2, WMI

Quick function to determine if a given machine is in a domain or workgroup

function test-domain{             
[
				
								
				 

				Bookmark and Share

				   

				 0 Comments
				   

				  RSS Feed
				   

				  Email a friend

			
			
			


September 6, 2011  11:11 AM

Invoke-WmiMethod–Type mismatch error



Posted by: Richard Siddaway
PowerShell v2, WMI

Sometimes when we try to use Invoke-WmiMethod with an argument list we get an error

PS> Invoke-WmiMethod -Class Win32_Share -Name Create -ArgumentList "c:\test", "Test57", 0
Invoke-WmiMethod : Type mismatch
At line:1 char:17
+...


September 5, 2011  12:45 PM

PowerShell and WMI webcast



Posted by: Richard Siddaway
PowerShell v2, WMI

 

Webcast: Get the most from PowerShell and WMI

I will be presenting the above webcast next week.

Date: Wednesday, September 7, 2011.  Thats tomorrow

Time: 12:00 PM - 1:00 PM CDT

Thats 6pm UK time

Register for the web cast at

...


September 5, 2011  12:33 PM

Find the Time Server



Posted by: Richard Siddaway
Active Directory, PowerShell v2, Registry, WMI

No its not the latest Internet game.

Active Directory synchronises the computer clock times. To know what server is being used

function get-timeserver{             
			


September 4, 2011  12:16 PM

Clearing AD logging



Posted by: Richard Siddaway
Active Directory, PowerShell v2, WMI

Last time we looked at turning on logging – for one or more criteria. The normal state of diagnostic logging is None i.e. the options are set to zero. If we have only a few options set we can use set-logsetting to revert to no logging. Alternatively we can reset all logging to a zero state

...


September 4, 2011  3:32 AM

Setting AD logging



Posted by: Richard Siddaway
Active Directory, PowerShell v2, WMI

Now that we know what the options are we can look at switching them on.

function set-logsetting{             
[
				
								
				 

				Bookmark and Share

				   

				 0 Comments
				   

				  RSS Feed
				   

				  Email a friend

			
			
			


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: