/\/\o\/\/ PowerShelled

This blog has moved to http://ThePowerShellGuy.com Greetings /\/\o\/\/
$AtomFeed = ("Atom.xml")
$PreviousItems = (" Monad Remoting "," How MSH Works "," Hosting an MSH runspace from Monad "," MSH get-WmiMethodHelp function Update 3 "," out-dataGrid function for Monad "," Windows "Monad" Shell (MSH) Beta 3.1 "," Windows "Monad" Shell (MSH) Beta 3.1 "," scripting games Last Day MSH answers for event 7 a... "," Scripting Games almost over "," The Scripting Games Event 6 in MSH "," ")

Thursday, March 23, 2006

 


It's busy at the Monad front



It's busy at the Monad front lately, so again I have a buch of links :

Keith got Scott Hanselman on Monad and how ;-)

Loving Mush - I mean Monad

( also check the podcast )

Also Keith has a Range Code Camp Presentation on Monad soon, read more on his blog Keith Hill's Blog

PS if you came from his blog looking for WMI examples, the script in my latest post about it generates scripttemplates for calling WMI Methods MSH get-WmiMethodHelp function Update 3
Also try a search on WMI on my blog, you will find some more examples I did in the past (as showing the WMI items in a GUI )

Monad source features some Monad downloads, scripts, forums and more to come.
Monad source

Karl Prosser is very busy on his MSH anallyzer
$MSHHOME in MSH ANALYZER

on The lazy admin also more and more monad stuff
Using MSH With Exchange 2003
TheLazyadmin.com MSH Category

also a nice example if you use I-tumes on opinionatedgeek
Using Monad/MSH to parse iTunes playlists [.NET]

Tony did some updates on his remote host
Monad Remoting - Now Can Read SecureString From Remote Client


also on IRC (irc.freenode.net channel #monad), there is MSH activity.

also the Monad Beta program moved to Connect for the bug reporting, you can read more about it on Lee Holmes blog Precision Computing

you also can find an item about an issue I posted about in the NG
Monad (Monad Technology Blog)
Finding out what determines which properties are displayed

I changed it to this, I think would be better (showing the main item CurrentUsage)

root\cimv2\Win32_PageFileUsage

Caption
Name
CurrentUsage
PeakUsage

I generated some lists to check the other properties defined like this :

# list of all defined types :

([xml](gc $MSHHOME\types.mshxml)).types.type foreach {$_.name}

# list of WMI default properties

([xml](gc $MSHHOME\types.mshxml)).types.type foreach {"`n$($_.name.split('#')[1])`n";$_.members.memberset.members.PropertySet.ReferencedProperties foreach {$_.name}}

(Little bit of garbage at begin and end)

and this one also gets all properties of an instance for each WMI class in the list (to compare)

Take care !!! as cim_datafile is one of them this takes a long time, its better to get the names fro m the list and get the ones needed , I did this 2 times (second time to text file) just as I was lazy but it took 20 minutes !! (at will show only the first but gets all) it was just a quick oneliner to greate the 35 page list to compare)

if MSH seems to hang , (its not but scanning all your disks) and you want to stop it crtl-C does not work , you can break with ctrl-break this will stop the script but also closes the MSH session so use at own risk ;-)

the one-liner looks like this :

([xml](gc $MSHHOME\types.mshxml)).types.type foreach {"`n$($_.name.split('#')[1])";get-wmiobject ($_.name.split('#')[1].split('\')[2]) select -first 1 fl [a-z]*;$_.members.memberset.members.PropertySet.ReferencedProperties foreach {$_.name}}

Append this to output it to file -> out-file c:\wmiformat.txt

that's it for now

enjoy,

greetings /\/\o\/\/
Tags :


Comments:
Blogger /\/\o\/\/
My post of this morning seems to be lost so a bit could be double

>I just question about why Win32_PageFileUsage doesn't show MshStatus propertyset But win32_process do it?

the MshStatus propertyset is also defined in the types.mshxml

PropertySet
MshStatus ReferencedProperties Status
Name
CurrentUsage
ReferencedProperties

PropertySet

(had to remove XML tags)

> And show something else I don't konw why ( These aren't defined in the mshxml)
__GENUS : 2

this is the standard output if nothing is defined in the types.mshxml, the properties you see beginning with the underscores are "internal" properties used by WMI.

that's why I put Format-list [a-z]* behind it to get rid of those.

get-wmi-object win32_process | FL [a-z]*

>But the "get-wmiobject win32_processor -computer ." will don't only show these

strange, with win32_process I found XXX behind it.

can not find why win32_processor does not work, altough it is defined.

gr /\/\o\/\/
 
Post a Comment



<< Home

Archives

October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006  

$Links = ("PowerShell RC1 Docs"," PowerShell RC1 X86"," PowerShell RC1 X64"," Monad GettingStarted guide"," Monad Progamming Guide"," Monad SDK"," Monad videos on Channel 9"," MSH Community Workspace"," scripts.readify.net "," MonadSource"," www.reskit.net"," PowerShell Blog"," Under The Stairs"," computerperformance powershell Home"," proudlyserving"," MSH on wikipedia"," MSHWiki Channel 9"," Keith Hill's Blog"," Precision Computing"," PowerShell for fun"," MSH Memo (Japanese)"," monadblog")

find-blog -about "PowerShell","Monad" | out-Technorati.
find-blog -contains "","" | out-Technorati.
Google
 
Web mow001.blogspot.com

This page is powered by Blogger. Isn't yours?