Yesterday after I posted PowerShell, Has my Dell a dangerous battery ? , I did meet James Thruher
on IRC (irc.freenode.net channel #Powershell ), and while discussing the script he came to the idea to get the serials direct from the Dell site.
b.t.w. if you want to join us on IRC pleasy check it out, on that IRC channel you can also meet amongs others :
Some other regulars on : irc.freenode.net channel #Powershell are :
DbmwS Don't Bother me with Spam (aka D2D, Dance to die ) from monadblog and http://del.icio.us/powershell and very active on the PowerShell Newsgroup : Windows Powershell
Karl Prosser, the guy behind PowerShell Analyzer : Karl Prosser - Klumsy Geek (note that he has a public Alpha release of PowerShell Analyzer (a great PowerShell editor) out now that you can download from his blog)
Arild : from AnkhSVN and also PowerShell fan see his Blog (see also (PowerShell, AnkhSVN and Subversion) on Scott Hanselman's blog)
So, as I did see the new Item on Jim's blog this morning I did think he posted it as my last remark was :
<jtruher> it's still doesn't seem to be quite right - it seems to miss a couple of numbers
* mow001 needs some sleep, see it on your blog ;-)
, but better yet, he posted an other real cool script Background "jobs" and PowerShell.
but as I did see also some differences between his (scraped from the Dell site) and my list, see the compare below, and I think it is a very cool addition I will post it here also.
MSH>compare-object ($AffectedSerials | sort) ($dell | sort)
InputObject SideIndicator
----------- -------------
1K055 =>
5P474 =>
J1524 =>
OR331 =>
59474 <=
Jim did post the solution as a comment 2 comments on last post, but I will post that example here also . and try to keep the &nbsp
<jtruher> blast - the HTML renderer changed my &nbsp; to a real space
<mow001> I will add it to my new post thanks
I will post a complete script again to check this I made 2 options, use the current list ( I made a fresh one with the latest list with the trick below for if yyou have no internet), or it can download it from the Dell site.
MSH>[string]::join("','",$AffectedSerials)
3K590','59474','6P922','C2603','C5339','C5340','C5446','C6269','C6270','D2961','D5555','D6024','D6025
','F2100','F5132','GD785','H3191','JD616','JD617','KD494','M3006','RD857','TD349','U5867','U5882','W5
915','X5308','X5329','X5332','X5333','X5875','X5877','Y1333','Y4500','Y5466# changed in notepad to :
$affectedSerials = '3K590','59474','6P922','C2603',
'C5339','C5340','C5446','C6269','C6270','D2961','D5555',
'D6024','D6025','F2100','F5132','GD785','H3191','JD616',
'JD617','KD494','M3006','RD857','TD349','U5867','U5882',
'W5915','X5308','X5329','X5332','X5333','X5875','X5877',
'Y1333','Y4500','Y5466'
So now it works like this :
MSH>.\CheckBattery.msh
retrieved affected serials 1K055 C5446 F2100 KD494 W5915 Y1333 3K590 C6269 F5132 OR331 X5308 Y4500 5
P474 C6270 GD785 M3006 X5329 Y5466 6P922 D2961 H3191 RD857 X5332 C2603 D5555 J1524 TD349 X5333 C5339
D6024 JD616 U5867 X5875 C5340 D6025 JD617 U5882 X5877
Battery Model : DELL 4M0105
MSH>.\CheckBattery.msh -internal
Battery Model : DELL 4M0105
and the script looks like this :
Note as in the other post (I forgot to mention it but )you can give also a computername to connect to a remote system.
And this time I made it as a script that you can run .
Enjoy,
Greetings, /\/\o\/\/
Tags : Monad msh PowerShell
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