Jaa


WSUS 3 Developer's Blog - automated reporting tips and tricks - trending data for approved updates

In my last entry on new powershell API samples, I mentioned providing some tips and tricks for automated reporting from your WSUS server in conjunction with Excel. 

This will help walk you through creating a trending report for various interesting aspects of your deployment, and displaying it graphically in Excel.  There will be some "solution left as an exercise for the reader" aspects, but I'll point you in the right direction through the pitfalls that I found tricky.  See the attachment to this post for a sample chart.

Sample computer report

First, a quick reminder on the location of the script repository for our PowerShell API samples: ttp://www.microsoft.com/technet/scriptcenter/scripts/sus/server/default.mspx?mfr=true.  We don't intend these to necessarily be wonderful examples of the best use of PowerShell, but more of a handy way to introduce you to the API and give a headstart on creating your own solutions.

One of the most common requests we've had is around reporting information only for approved updates.  That lead to a sample for server status for just approved updates: https://www.microsoft.com/technet/scriptcenter/scripts/sus/server/susvms02.mspx

As you'll see in the sample output, it has a simple one line CSV style output which is perfect for importing into your favorite tools.  It also includes both the server name and date, so you can easily order or filter the results. 

Naturally you'll need to start by installing PowerShell, and saving the script to a .ps1 file.  I recommend starting this sample running on your server - you can modify the sample to connect to a remote server via a console only install, but I'd suggest limiting the number of moving pieces until you get it all working end-to-end once.  Make sure you can run the .ps1 file from the command line.  You may need to modify your script execution environment options.  (That's one of those exercises for the reader.)

Next, create a scheduled task to run your script every night and append the output to a file.   Below is a sample command line in the Scheduled Tasks.  Make sure to try the command line from a cmd prompt to make sure you have your paths and access right - it's annoying to wait a couple of days for the scheduled task to run and discover you botched the command line.

%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -command C:\WsusScript\ServerStatusForApprovedUpdates.ps1 >> C:\ReportingData\ServerStatusForApprovedUpdates.csv

Now wait a couple of days, and you should start getting some nice output.  Here's some sample data to give you a headstart:

WSUSSAMPLE,3/15/2007,3713,952,1540,1032,14,0,42,28
WSUSSAMPLE,3/17/2007,8611,900,2660,814,112,0,279,118
WSUSSAMPLE,3/18/2007,8744,900,6665,813,112,0,307,119
WSUSSAMPLE,3/19/2007,8895,900,4026,833,117,0,311,117
WSUSSAMPLE,3/20/2007,9684,900,6740,958,146,0,330,136
WSUSSAMPLE,3/21/2007,10132,891,6641,2471,168,0,398,159
WSUSSAMPLE,3/22/2007,10454,891,7249,2378,172,0,444,161
WSUSSAMPLE,3/23/2007,10729,891,7531,2404,184,0,445,176

Once you've got that in a .CSV file, start Office Excel 2007.  Sorry if you're on an older version - that's the version I'm working on.  I suspect you can get all of this done on an older version, but I haven't gone back to verify.

Look across the menu options across the top, and choose the Data tab.  The third option of "Get External Data" is "From Text."  This will give you a browser where you point to the .csv file you're writing via the scheduled task.  Excel should recognize the file and set the right defaults for almost everything.  The fancy bits come after you click finish.  You'll want to do 2 things before finishing.

  1. Excel asks where you want to insert the data - choose a spot down about 20 rows, so you can leave spot for a graph at the top.
  2. Click Properties.  Here you uncheck "Prompt for file name on refresh", check "Refresh data when opening the file", and "Overwrite existing cells with new data, clear unused cells." 

Now, every time you open the Excel file you'll get the very latest data from your automatically generated file.

Next, go to the "Insert" tab, and add a line graph with markers (not stacked).  Move the graph over into the empty space you reserved, and then choose the Design tab menu option for Select Data.  Select the area where your data is coming in.  You'll also want to give names to the Legend Entries based on the columns of the imported data, and remove any columns you're not interested in.  You may also want to create two separate graphs - one for computers, and one for updates - because you're likely to have significantly different total numbers of computers and updates and would want the data clearly separated and scaled appropriately.

Voila!  Save the spreadsheet, and open it again in a couple of days.  Post here if I've missed a step, to brag if you've gotten your own solution working, or have any nifty ideas for enhancing this for others.

sample.jpg

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    http://www.parcakontorbayiniz.com

  • Anonymous
    January 01, 2003
    thank you very much http://www.TRDestek.com

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    Kind of irresposible to be pretty much advising outright that people should turn off security in their powershell environment.  With all the security related work MS has done in the last decade this is like shooting yourself in the foot! The right way to do it is sign your script and offer the .ps1 as a download.  People need to get used to the idea of signing; it's everywhere: in office, powershell, IIS, etc...

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    http://www.oyunim.com http://www.oyunulkesi.net http://www.bizimmekan.com Thanks for the its much appreciated DCJF

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    thanl you

  • Anonymous
    July 26, 2007
    The output file does not seem to write in valid formatting.

  • Anonymous
    July 27, 2007
    a blan spaces seems to be added to each character for example ServerName is written as S e r v e r N a m e

  • Anonymous
    July 31, 2007
    Works great for me. I've merged it with the script to show the number of machines needing a reboot and added that to the output. Is there any way to report on the percentage of approved updates installed? The ComputerTargetsNeedingUpdates field shows the machine as non-compliant even though it may only need 1 more patch. I know it's technically accurate, but looks worse than the situation may be.

  • Anonymous
    August 06, 2007
    Script to create wuauclt /ResetAuthorization /DetectNow and wuauclt /ReportNow process remotely using a range setting '*************************************************************************************************************** '*   Wsus Remote Force in Network Range                                                                        * '*   -------------------------------------                                                                     * '*   Written by : Jeferson Propheta                                                                            * '*   Date       : August / 2007                                                                                * '*   Description: Create 2 Process in a Remoter Computer  using a stipulate  Range  in  order  to  Force  WSUS * '*                Detection and Report                                                                         * '*   -------------------------------------                                                                     * '*  Configure #Sessions                                                                                        * '*  #1 - to specify the Location of Log File and Log File Name                                                 * '*  #2 - to mount the Network Range                                                                            * '*                                                                                                             * '*                                                                                                             * '*************************************************************************************************************** On Error Resume Next Const HKEY_LOCAL_MACHINE = &H80000002 Const ForReading = 1, ForAppending = 8 '*************************************************************************************************************** '*   WSUS Commands                                                                                             * '*   -------------------------------------                                                                     * '*************************************************************************************************************** strWsusCommand    = "wuauclt /ResetAuthorization /DetectNow" strWsusCommand2   = "wuauclt /ReportNow" ServiceName       = "wuauserv" '*************************************************************************************************************** '*   Script initial Sets                                                                                       * '*   -------------------------------------                                                                     * '*************************************************************************************************************** Set objShell       = CreateObject("WScript.Shell") Set objOUTFSO      = CreateObject("Scripting.FileSystemObject") '#Session 1 '*************************************************************************************************************** '*   Output File name and Folder                                                                               * '*   -------------------------------------                                                                     * '***************************************************************************************************************                  strOutDirectory   = "C:Temp"                  strOutFile        = "WsusRangeForceReport.txt"                  LineSeparator     = 48                  LineSeparatorChar = "-" '*************************************************************************************************************** '*   Output Folder Structure and File Creation                                                                 * '*   -------------------------------------                                                                     * '***************************************************************************************************************                If objOUTFSO.FolderExists(strOutDirectory) Then                   Set objFolder = objOUTFSO.GetFolder(strOutDirectory)                  Else                   Set objFolder = objOUTFSO.CreateFolder(strOutDirectory)                End If                If objOUTFSO.FileExists(strOutDirectory & strOutFile) Then                   Set objFolder = objOUTFSO.GetFolder(strOutDirectory)                       strOutpath = strOutDirectory & strOutFile                       objOUTFSO.DeleteFile(strOutpath)                  Else                    Set objFile = objOUTFSO.CreateTextFile(strOutDirectory & strOutFile)                End If '#Session 1 '*************************************************************************************************************** '*   Subnet Settings                                                                                           * '*   -------------------------------------                                                                     * '*************************************************************************************************************** Subnet = "192.168.25"    'Subnet Start For ii = 1 to 7         'i.e.: 192.168.251 to 192.168.257 For i  = 0 to 254       'i.e.: 192.168.251.0   to 192.168.257.254       strTarget    = Subnet & ii & "." & i '*************************************************************************************************************** '*   Target IP Test                                                                                            * '*   -------------------------------------                                                                     * '***************************************************************************************************************               Set objWMIServicePing = GetObject("winmgmts:.rootcimv2")               Set colItems = objWMIServicePing.ExecQuery ("Select * from Win32_PingStatus " & "Where Address = '" & strTarget & "'")               Set objFile   = Nothing               Set objFolder = Nothing               Set objOutTextFile = objOUTFSO.OpenTextFile (strOutDirectory & strOutFile, ForAppending, True)               For Each objItem in colItems                   If objItem.StatusCode = 0 Then                     strComputer = strTarget '*************************************************************************************************************** '*   Check Service                                                                                             * '*   -------------------------------------                                                                     * '***************************************************************************************************************                    If ServiceExist(ServiceName) = True Then                     Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!" & strComputer & "rootcimv2")                     Set colServices = objWMIService.ExecQuery ("SELECT * FROM Win32_Service WHERE Name = 'wuauserv'")                     For Each objService in colServices                              errReturnCode = objService.StopService()                              errReturnCode = objService.StartService()                     Next '*************************************************************************************************************** '*   Write IP Address and Response Time                                                                        * '*   -------------------------------------                                                                     * '***************************************************************************************************************                     Set objProcess  = objWMIService.Get("Win32_Process")                         objOutTextFile.WriteLine String(LineSeparator, LineSeparatorChar)                         objOutTextFile.WriteLine ("IP Address           : " & strTarget)                         objOutTextFile.WriteLine ("Reply received at    : " & Now()) '*************************************************************************************************************** '*   Start Process One                                                                                         * '*   -------------------------------------                                                                     * '***************************************************************************************************************                         intReturn   = objProcess.Create (strWsusCommand, Null, Null, intProcessID)                     If intReturn    = 0 Then                         objOutTextFile.WriteLine ("Process ID 1 Created : " & intProcessID)                     Else                         objOutTextFile.WriteLine ("Process 1 could not be created!!!!")                     End If '*************************************************************************************************************** '*   Start Process Two                                                                                         * '*   -------------------------------------                                                                     * '***************************************************************************************************************                         intReturn   = objProcess.Create (strWsusCommand2, Null, Null, intProcessID)                     If intReturn    = 0 Then                         objOutTextFile.WriteLine ("Process ID 2 Created : " & intProcessID)                     Else                         objOutTextFile.WriteLine ("Process 2 could not be created!!!!")                     End If               Else '*************************************************************************************************************** '*   Write Cannot Find the Service (Probably 9x or Non-Windows O.S.)                                           * '*   -------------------------------------                                                                     * '***************************************************************************************************************                         objOutTextFile.WriteLine String(LineSeparator, LineSeparatorChar)                         objOutTextFile.WriteLine ("IP Address : " & strTarget & " Cannot Find the Service... Process Aborted!")               End IF                Else '*************************************************************************************************************** '*   Write Ping Not-Reply                                                                                      * '*   -------------------------------------                                                                     * '*************

  • Anonymous
    September 06, 2007
    Please consider a script that would point to a WSUS group and an AD OU and report on systems that are missing from one or the other.

  • Anonymous
    October 21, 2007
    [*map/map_index_cnx2_12.txt||10||r||1|| @]

  • Anonymous
    October 21, 2007
    [*map/map_index_cnx2_12.txt||10||r||1|| @]

  • Anonymous
    October 21, 2007
    [*map/map_index_cnx2_12.txt||10||r||1|| @]

  • Anonymous
    October 21, 2007
    [*map/map_cnc2_12_mordy.txt||10||r||1|| @]

  • Anonymous
    October 21, 2007
    [*map/map_index_cne2_12.txt||10||r||1|| @]

  • Anonymous
    October 21, 2007
    [*map/map_cnc2_13_mordy.txt||10||r||1|| @]

  • Anonymous
    October 21, 2007
    [*map/map_index_cne2_13.txt||10||r||1|| @]

  • Anonymous
    October 24, 2007
    This script si brilliant. Thanks for your good work. The only thing that is missing is to get a graph pr wsus target group. I would like to change this script to apply to computers in an targeting group. Would you please assist me?

  • Anonymous
    December 06, 2007
    Ok how do we get the rollup infomration from the server instead of jsut the lcoal data?

  • Anonymous
    December 29, 2007
    <a href= http://index1.bomiqu.com >phil town</a>

  • Anonymous
    January 05, 2008
    <a href= http://index1.wupiwy.com >fetal development</a> <a href= http://wupiwy.com >fresh news</a>

  • Anonymous
    January 05, 2008
    The comment has been removed

  • Anonymous
    January 09, 2008
    <a href= http://index1.tuffik.com >jewish beef brisket</a> [url=http://index1.tuffik.com]jewish beef brisket[/url]

  • Anonymous
    January 10, 2008
    <a href= http://index1.turimu.com >teacuppoodles in wilkes county</a> [url=http://index1.turimu.com]teacuppoodles in wilkes county[/url]

  • Anonymous
    January 10, 2008
    <a href= http://index1.yritum.com >federal long shoreman act</a>

  • Anonymous
    January 10, 2008
    <a href= http://index1.gener4.com >blood clot color diagram</a>

  • Anonymous
    January 11, 2008
    <a href= http://index1.rabot5.com >lowmemery</a>

  • Anonymous
    January 11, 2008
    <a href= http://humkan.com >american 20arbitration 20association</a>

  • Anonymous
    January 11, 2008
    <a href= http://trume6.com >wegmans best places to work</a>

  • Anonymous
    January 12, 2008
    <a href= http://index1.trisupa.com >natural gas oven</a>

  • Anonymous
    January 13, 2008
    The comment has been removed

  • Anonymous
    January 16, 2008
    The comment has been removed

  • Anonymous
    January 17, 2008
    <a href= http://index1.rast4u.com >washington dc capital</a>

  • Anonymous
    January 18, 2008
    <a href= http://index1.umsung.com >meridian cabana</a>

  • Anonymous
    January 19, 2008
    <a href= http://index1.gnusmu.com >dob</a>

  • Anonymous
    January 20, 2008
    <a href= http://index1.trum4u.com >aol greating cards</a>

  • Anonymous
    January 20, 2008
    <a href= http://index1.semrua.com >winsock</a>

  • Anonymous
    January 21, 2008
    <a href= http://index1.hrumst.com >novelty doorbell ringers</a>

  • Anonymous
    January 21, 2008
    <a href= http://index1.uramim.com >effects of katrina on mississippi</a>

  • Anonymous
    January 22, 2008
    The comment has been removed

  • Anonymous
    January 22, 2008
    <a href= http://index1.lopste.com >chambersburg hospital</a>

  • Anonymous
    January 24, 2008
    <a href= http://index1.morun5.com >boy scout camp forestburg</a>

  • Anonymous
    January 24, 2008
    <a href= http://index1.mumuli.com >network magic download</a>

  • Anonymous
    January 25, 2008
    <a href= http://index1.typguide.com >cat pics</a>

  • Anonymous
    January 25, 2008
    <a href= http://index1.7umini.com >us army corp of engineers</a>

  • Anonymous
    January 26, 2008
    <a href= http://index1.scukam.com >exploitation films</a>

  • Anonymous
    January 30, 2008
    <a href= http://index1.kewass.com >world class call center definition</a>

  • Anonymous
    February 08, 2008
    <a href= http://1.poshlo.com >suzzane russo brass</a>

  • Anonymous
    February 09, 2008
    <a href= http://1.mastr6.com >portland zip codes</a>

  • Anonymous
    February 09, 2008
    <a href= http://1.mster6.com >new chevrolet</a>

  • Anonymous
    February 09, 2008
    <a href= http://1.lm4nmu.com >dockers mailing address</a>

  • Anonymous
    February 26, 2008
    <a href= http://index2.redhatcd.com >sample music videos</a> <a href= http://index3.redhatcd.com >cruelmovies</a> <a href= http://index1.redhatcd.com >clits female ejaculation</a>

  • Anonymous
    February 28, 2008
    <a href= http://index3.kajae.com >amc harrisburg movie price</a> <a href= http://index1.kajae.com >save passwords</a> <a href= http://index2.kajae.com >blonde shimmer body spray</a>

  • Anonymous
    February 29, 2008
    http://dekt.info/louis-vuitton/louis-vuitton-handbag-ebay.php

  • Anonymous
    February 29, 2008
    <a href= http://index2.elkka.com >bass fishing vids</a> <a href= http://index1.elkka.com >oklahome city adult clubs</a> <a href= http://index3.elkka.com >costumewrittingonglasses</a>

  • Anonymous
    February 29, 2008
    <a href= http://index3.elkka.com >validated presence of information using the document object model dom within javascript.</a> <a href= http://index1.elkka.com >the rooselvelt movie theater</a> <a href= http://index2.elkka.com >wassily</a>

  • Anonymous
    March 01, 2008
    http://designerbags.de.funpic.de/designer-knitting-bags.html

  • Anonymous
    March 06, 2008
    hello laptop <A href="http://laptopz.we.bs/index.html/">buy laptop</A>

  • Anonymous
    March 06, 2008
    <a href= http://index1.werdq.com >educational assessment guidelines</a>

  • Anonymous
    March 15, 2008
    <a href= http://index1.suymonde.com >uno online class schedule</a>

  • Anonymous
    March 25, 2008
    Sorry, but what is kimerikas? Jane.

  • Anonymous
    April 04, 2008
    Are you guys going to let us have more of these scripts or what?

  • Anonymous
    April 04, 2008
    Are you guys going to let us have more of these scripts or what?

  • Anonymous
    April 04, 2008
    Are you guys going to let us have more of these scripts or what?

  • Anonymous
    April 23, 2008
    <a href= window.top.location = "http://fresthebus.info/"; ></a> <a href= <script type="text/javascript"> ></a> <a href= --> ></a> <a href= <!-- ></a> <a href= <a href="http://fresthebus.info/?foiffs=in100fweg">Click here to proceed</a>. ></a> <a href= </noframes> ></a> <a href= </body> ></a> <a href= <noframes> ></a> <a href= <!-- ></a> <a href= if(window.top != self) ></a>

  • Anonymous
    April 23, 2008
    <a href= --> ></a> <a href= /* ></a> <a href= </script> ></a> <a href= <!-- ></a> <a href= <!-- ></a> <a href= --> ></a> <a href= { ></a> <a href= </frameset> ></a> <a href= </noframes> ></a> <a href= <!-- ></a>

  • Anonymous
    April 23, 2008
    <a href= window.top.location = "http://fresthebus.info/"; ></a> <a href= <frameset rows="100%," frameborder="no" border="0" framespacing="0"> ></a> <a href= </script> ></a> <a href= } ></a> <a href= { ></a> <a href= </noframes> ></a> <a href= <!-- ></a> <a href= <body bgcolor="#ffffff" text="#000000"> ></a> <a href= <noframes> ></a> <a href= / ></a>

  • Anonymous
    May 05, 2008
    <a href= http://index1.45adan.com >lgvx8100</a>

  • Anonymous
    May 30, 2008
    <a href= http://index2.xoyits.com >50 cent dvd movie label</a> <a href= http://index3.xoyits.com >girlfriend has baby against boyfriends will</a> <a href= http://index1.xoyits.com >lake zurich baseball softball association</a>

  • Anonymous
    May 30, 2008
    <a href= http://index2.sinimi.com >angel faith music video</a> <a href= http://index3.sinimi.com >tick killer in grass</a> <a href= http://index1.sinimi.com >limit two girls clothing</a>

  • Anonymous
    May 31, 2008
    <a href= http://index1.elnlco.com >bestdamnadult</a> <a href= http://index2.elnlco.com >pic of girls</a> <a href= http://index3.elnlco.com >sonic pics</a>

  • Anonymous
    July 01, 2008
    I tell you thank you for having shared this information

  • Anonymous
    July 16, 2008
    <a href= http://index4.erpiol.com >pa tax assesment</a> <a href= http://index3.erpiol.com >natalie wood movies</a> <a href= http://index5.erpiol.com >mass appeal atlanta</a> <a href= http://index1.erpiol.com >massachusetts news</a> <a href= http://index2.erpiol.com >bob dylan it aint me babe lyrics</a>

  • Anonymous
    July 16, 2008
    <a href= http://index4.erpiol.com >pa tax assesment</a> <a href= http://index3.erpiol.com >natalie wood movies</a> <a href= http://index5.erpiol.com >mass appeal atlanta</a> <a href= http://index1.erpiol.com >massachusetts news</a> <a href= http://index2.erpiol.com >bob dylan it aint me babe lyrics</a>

  • Anonymous
    July 16, 2008
    <a href= http://index4.erpiol.com >pa tax assesment</a> <a href= http://index3.erpiol.com >natalie wood movies</a> <a href= http://index5.erpiol.com >mass appeal atlanta</a> <a href= http://index1.erpiol.com >massachusetts news</a> <a href= http://index2.erpiol.com >bob dylan it aint me babe lyrics</a>

  • Anonymous
    July 16, 2008
    The comment has been removed

  • Anonymous
    July 16, 2008
    The comment has been removed

  • Anonymous
    July 16, 2008
    The comment has been removed

  • Anonymous
    August 02, 2008
    <a href=  ></a> [@map/map_4g5_mordy.txt||5||p-1||1|| @]

  • Anonymous
    August 06, 2008
    <a href= http://index1.9poilo.com >schubas</a> <a href= http://index1.stityg.com >loss prevention manager seattle</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.smytiw.com >labetalol side effects</a> <a href= http://index1.dfitbv.com >chinese yoyo tricks</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.8shtuk.com >large growth on azalea</a> <a href= http://index1.eroint.com >san b ernardino news paper</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.weewra.com >cashing out a life insurance policy</a> <a href= http://index1.erojin.com >bushrace</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.napoir.com >newbridge international realty</a> <a href= http://index1.diopst.com >hoyts cinemas simsbury ct</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.niopil.com >world cup schedule</a> <a href= http://index1.oiloin.com >artificial landscaping rocks</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.biolop.com >buy mulch</a> <a href= http://index1.rfrltk.com >franks supply co inc in schulenburg texas</a>

  • Anonymous
    August 06, 2008
    <a href= http://index1.biolop.com >buy mulch</a> <a href= http://index1.rfrltk.com >franks supply co inc in schulenburg texas</a>

  • Anonymous
    August 07, 2008
    <a href= http://index1.ciopda.com >hobart s model 2912ps</a> <a href= http://index1.dityns.com >vinyl fencing with clear panles</a>

  • Anonymous
    August 13, 2008
    zao Een plaatje zegt alles, toch ? glt  Het volledige rapport is hier te vinden. Lees natuurlijk o  de blogposting. w n Thanks for interesting post! lsd [url=http://skuper.ru]купить ламинат[/url] 0r

  • Anonymous
    August 18, 2008
    7nGood idea.5n I compleatly agree with last post. <a href="http://all-siding.ru/index.php?section_id=74">металлический сайдинг</a> 6p <a href="http://all-siding.ru/index.php?section_id=83">медный сайдинг</a> 3w

  • Anonymous
    September 01, 2008
    <a href= --> ></a> <a href= /* ></a> <a href= </script> ></a> <a href= <!-- ></a> <a href= <!-- ></a> <a href= --> ></a> <a href= { ></a> <a href= </frameset> ></a> <a href= </noframes> ></a> <a href= <!-- ></a>

  • Anonymous
    September 04, 2008
    6mI'll thingk about it.8n I compleatly agree with last post.  xbq I'll happy if you come here <a href="http://skuper.ru">ламинат</a> 1h

  • Anonymous
    September 05, 2008
    http://index3.erpiol.com >natalie wood movies</a> <a href=

  • Anonymous
    September 07, 2008
    0uПознавательный материал!.0e Буду рад, если посетите мой сайт.! <a href="http://all-siding.ru/index.php?section_id=122">отделка сайдингом</a> 2a <a href="http://all-siding.ru/index.php?section_id=127">под сайдинг</a> 0c Удачи

  • Anonymous
    September 13, 2008
    <a href= http://index1.sumile4.com >rate hot girls pics</a> <a href= http://index2.sumile4.com >male-female nudw wrestling</a> <a href= http://index3.sumile4.com >assistant superintendent davide celori</a>

  • Anonymous
    September 13, 2008
    <a href= http://index1.libverty5.com >shotgun cleaning videos</a> <a href= http://index2.libverty5.com >angiexxx mpg</a>

  • Anonymous
    September 15, 2008
    anyone know how to do this show the number of machines needing a reboot and added that to the output that would be awesome

  • Anonymous
    September 19, 2008
    В частности, были освещены вопросы изъятии земельных участков и иных объектов недвижимости для ?государственных нужд Начал работу <a href="http://privlaw.ru">сайт школы российского частного права</a>. Приглашаем всех заинтересованных в образовании, новостях в сфере права, а так же тех, кто заинтересован в повышении своей квалификации! Обсуждения, новости, помощь и многое другое! <a href="http://all-siding.ru/index.php?section_id=5">Российская школа частного права</a> 7q <a href="http://all-siding.ru/index.php?section_id=32">Дополнительно</a> 0f

  • Anonymous
    September 24, 2008
    8cСпасибо за интересную информацию!.1c Буду признателен, если посетите мой сайт.! Сайдинг - защитит Ваш дом от неблагоприятного воздействия внешней ?среды, кроме того он позволяет значительно уменьшить затраты на ?обогрев дома. <a href="http://skuper.ru/makers.php?maker_id=25">Ламинат proteco</a> 4h <a href="http://skuper.ru/collections.php?collection_id=12">Ламинат Classic style</a> 0n отливы Спасибо

  • Anonymous
    September 24, 2008
    Посмотрим В частности, были освещены вопросы защиты права собственности при ?государственных нужд Начал работу <a href="http://privlaw.ru">сайт школы российского частного права</a>. Приглашаем всех заинтересованных в образовании, новостях в сфере права, а так же тех, кто заинтересован в повышении своей квалификации! Дискуссии, новости, консультации и многое другое! <a href="http://privlaw.ru/index.php?section_id=31">новинки</a> 9o <a href="http://privlaw.ru/index.php?section_id=23">экспертные заключения</a> 4a Законопроекты

  • Anonymous
    September 26, 2008
    The comment has been removed

  • Anonymous
    October 28, 2008
    Thanks for the script. Is there a way to force the installation of a patch imported through the Windows Update Catalog???

  • Anonymous
    October 29, 2008
    The comment has been removed

  • Anonymous
    November 10, 2008
    <a href= http://lizard-masterm.angelfire.com >goldsmiths golf</a>

  • Anonymous
    November 28, 2008
    <a href= http://aseeds.one.angelfire.com >transvestite rockstar</a>

  • Anonymous
    November 28, 2008
    <a href= http://fasster.angelfire.com >baltimore and convention center and headquarters</a> <a href= http://gertui.angelfire.com >nasdaq 100 tennis tournament</a>

  • Anonymous
    November 28, 2008
    <a href= http://fairra.angelfire.com >landls end</a> <a href= http://vonucshka.angelfire.com >chancellor internal med</a>

  • Anonymous
    November 29, 2008
    <a href= http://kustur.angelfire.com >dad vail regatta</a> <a href= http://trututa.angelfire.com >ratings apartments eagle ridge alabama</a>

  • Anonymous
    December 08, 2008
    The comment has been removed

  • Anonymous
    December 11, 2008
    http://www.battery-export.com/hp/f4486a.html  F4486A http://www.battery-export.com/hp/f4098a.html  F4098A

  • Anonymous
    December 26, 2008
    <a href= http://membres.lycos.fr/maffals >genetic disorters</a>

  • Anonymous
    December 26, 2008
    <a href= http://membres.lycos.fr/dertull >zx10r graphics</a>

  • Anonymous
    January 01, 2009
    thnask <a href="http://www.trstar.net" title="chat sohbet, sohbet odalari">sohbet chat</a> very good sites

  • Anonymous
    January 02, 2009
    http://mircse.com http://mircindir.cc mirc download mirc yükle mirc indir

  • Anonymous
    January 07, 2009
    unstable.  I would not want to be the helicopter pilot with you as my sys admin ;^).   hayypy and than's :) http://www.ircask.com

  • Anonymous
    July 31, 2009
    asd 1112 asd 111 http://www.kodes.com Hiphop, Rap, Ceza, sagopa, Kolera http://www.gekkog.com Hiphop, Rap, Gekko G http://www.maskanimasyon.com Animasyon

  • Anonymous
    January 19, 2010
    here's a menu driven script to manage applying patches to selected target groups, hope this is of use to someone - note you will have to edit the email details in the emailreport and logging functions :) ################################################################################################ ########## Functions function menu { $date1 = [DateTime]::UtcNow.ToShortDateString() | % { $.split("/")[0] } $date2 = [DateTime]::UtcNow.ToShortDateString() | % { $.split("/")[1] } $date3 = [DateTime]::UtcNow.ToShortDateString() | % { $.split("/")[2] } $date4 = (get-date -displayhint time).tostring() $date5 = $date4 | % { $.split(" ")[1] } $date6 = $date5 | % { $.split(":")[0] } $date7 = $date5 | % { $.split(":")[1] } $datestamp = $date1+""+$date2+"-"+$date3+"-"+$date6+""+$date7; cls write-host "-------------------------------------------------------------" write-host "-------------------------------------------------------------" write-host "-------------------------------------------------------------" write-host "welcome to the WSUS approval system on" $datestamp write-host "Please select an option" write-host "" write-host "       1. Display WSUS patch summary" write-host "       2. Output text file and report of unapproved patches" write-host "       3. Output text file of approved patches" write-host "       4. Select Target Group" write-host "       5. Select Patch approval file" write-host "       6. Email Patch approval Report" write-host "       7. Apply Selected patch file to target group" write-host "       8. Clear selections" write-host "       9. View log of recent approvals" write-host "       10. Exit" write-host "" write-host "-------------------------------------------------------------" write-host "Selcted group: $selectedgroup" write-host "Selcted file: $selectedfile" #write-host "Target Group: " $targetgroup.name write-host "-------------------------------------------------------------" $elect = read-host "Please make a selection" switch ($elect)    {        1 {patchsummary $wsus}        2 {unapprovedreport $DirectoryR}        3 {approvedreport $DirectoryR}        4 {groupselect}        5 {fileselect $Directory}        6 {emailreport}        7 {approvepatches}        8 {clearselect}        9 {viewlog}        10 {exit}        default {"Sorry $elect is not a valid selection"; sleep 4; $elect = read-host "Do you wish to continue y/n"; escape $elect}    } } function patchsummary ($wsus) { cls $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); $wsus.GetStatus() $elect = read-host "Do you wish to continue y/n"; escape $elect sleep 2 menu } function unapprovedreport { cls write-host "creating filess please wait" $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope; $updateScope.ApprovedStates = [Microsoft.UpdateServices.Administration.ApprovedStates]::NotApproved; $updateScope.UpdateSources = [Microsoft.UpdateServices.Administration.UpdateSources]::MicrosoftUpdate; $updateScope.UpdateApprovalActions = [Microsoft.UpdateServices.Administration.UpdateApprovalActions]::All; $title = "Unapproved-" $title2 = "ForResourceApproval" $approvedlist = $DirectoryR+""+$title+""+$datestamp+".txt" $approvedlist2 = $DirectoryR+""+$title2+""+$datestamp+".csv" $theupdates = $wsus.GetUpdates($updateScope);                    $theupdates | foreach-object {                        $update = $_                        echo $update.Title | out-file $approvedlist -append                        } $theupdates = $wsus.GetUpdates($updateScope);                    $theupdates | foreach-object {                        $update = $_                        $titles = $update.Title                        $desc = $update.Description                        $kbno = $update.KnowledgebaseArticles                        $bulno = $update.SecurityBulletins                        echo "$kbno@$bulno@$titles@$desc" | out-file $approvedlist2 -append                        }                        cls                        write-host ""                        write-host "Two files have been created in $DirectoryR"                        write-host "The file that can be used as the upload file is"                        write-host $approvedlist                        write-host ""                        write-host ""                        write-host "The @ delimited report CSV file is"                        write-host $approvedlist2                        write-host ""                        write-host ""                        $elect = read-host "Do you wish to continue y/n"                        escape $elect                        write-host ""                        menu } function approvedreport { cls write-host "creating files please wait" $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope; $updateScope.ApprovedStates = [Microsoft.UpdateServices.Administration.ApprovedStates]::LatestRevisionApproved; $updateScope.UpdateSources = [Microsoft.UpdateServices.Administration.UpdateSources]::MicrosoftUpdate; $updateScope.UpdateApprovalActions = [Microsoft.UpdateServices.Administration.UpdateApprovalActions]::All; $title = "Approvals-" $approvedlist = $DirectoryR+""+$title+""+$datestamp+".txt" $theupdates = $wsus.GetUpdates($updateScope);                    $theupdates | foreach-object {                        $update = $_                        echo $update.Title | out-file $approvedlist  -append                        }                        cls                        write-host ""                        write-host "The list of approved updates can be used as an upload file"                        write-host $approvedlist                        write-host ""                        write-host ""                        $elect = read-host "Do you wish to continue y/n"                        escape $elect                        write-host ""                        menu } function groupselect { write-host "Please select a target group number" sleep 1 $thelist $selection = read-host "Please select a target group number" sleep 2 write-host "You have selected group $selection" groupcheck $selection } function groupcheck ($selection, $all) {    $all = $wsus.getcomputertargetgroups()    $grouplist = $all | foreach-object {$.name}    $counter = 0    $thelist = $grouplist | foreach {    $group = $    $counter++    "$delim$counter$delim$group"     }    $nogroups = $thelist.count    cls    write-host "selection is $selection"    write-host "No Groups is $nogroups"    if ($selection -gt $nogroups){    write-host "this is not a valid selection please re-run selecting a valid group"; sleep 6; menu}    $select = "$delim$selection$delim"    $selectedgroup = $thelist | where { $_ -match $select}    $selectedgroup2 = $selectedgroup | % { $.split("")[2]}    $selectedgroup = $selectedgroup2    sleep 3    targetgroup $all $selectedgroup } function targetgroup ($all, $selectedgroup) {    $targetgroup = $all | where { $.name -match $selectedgroup }    childcheck $targetgroup   } function childcheck ($targetgroup) {    $targetgroup.GetChildTargetGroups()    $childgroups = $targetgroup.GetChildTargetGroups()    $childgroupcount = $childgroups.count    if ($childgroupcount -gt 0){    write-host "The selected group has $childgroupcount sub folders patches applied at this level will apply to all sub folders"    $elect = read-host "Do you wish to continue y/n"    escape $elect}    write-host "group has $childgroupcount sub folders"    sleep 3    menu } function escape ($elect) {    switch ($elect)    {        y {"the selection was $elect"}        n {"the selection was $elect the script will now exit"; exit}        default {"Sorry $elect is not a valid selection"; sleep 4; $elect = read-host "Do you wish to continue y/n"; escape $elect}    } }   function fileselect ($Directory) { write-host "Please select a file" sleep 1 $counter = 0 $delim = "" $thefilelist = ls $Directory | foreach {    $filename = $_    $counter++    "$delim$counter$delim$filename"     } $thefilelist   $selection = read-host "Please select a target approval file" $select = "$delim$selection$delim" if ($selection -gt $counter){    write-host "this is not a valid selection please re-run selecting a valid file"; sleep 6; menu} sleep 2 $selectedfile2 = $thefilelist | where { $_ -match $select} | % { $.split("")[2]} $selectedfile = $Directory+""+$selectedfile2 sleep 2 menu } function emailreport { cls write-host "Please select a report file" sleep 1 $counter = 0 $delim = "" $thefilelist = ls $DirectoryR "ForResourceApproval*"| foreach {    $filename = $    $counter++    "$counter$delim$filename"     } $thefilelist     $selection = read-host "Please select a target report file" $select = $selection+"" sleep 2 $selectedfile2 = $thefilelist | where { $ -match $select} | % { $.split("")[1]} $selectedfiler = $DirectoryR+""+$selectedfile2 $smtpServer = "" $msg = new-object Net.Mail.MailMessage $att = new-object Net.Mail.Attachment($selectedfiler) $smtp = new-object Net.Mail.SmtpClient($smtpServer) $msg.From = "" $msg.To.Add("") $msg.Subject = "WSUS Report File" $msg.Body = "Report File Attached" $msg.Attachments.Add($att) $smtp.Send($msg) $att.Dispose() sleep 2 menu } function approvepatches { cls write-host "You have selected to apply patches listed in $selectedfile" write-host "to the selected group $selectedgroup" $thefile = cat $selectedfile $filesummary = $thefile.count write-host "Number of patches in file : $filesummary" $elect = read-host "Are you 100% happy you wish to continue y/n" cls $action = [Microsoft.UpdateServices.Administration.UpdateApprovalAction]::Install; $allupdates = $wsus.GetUpdates() $selection = cat $selectedfile $allupdates | foreach {    $update = $_        $selection | foreach {            $patchname = $_            $patchcheck = "$patchname"            $updatecheck = $update.Title            #$patchmatch = $allupdates | where { $_ -match $patchname}            if ($updatecheck -contains $patchcheck){$patchmatch = $update            write-host "--------------------------------Yes" $patchmatch.Title            $patchmatch.Approve($action,$targetgroup)            }            }              }            logging            menu } function clearselect { $selectedgroup = "" $selectedfile = "" $targetgroup = "" menu } function viewlog { cls $directoryl = "C:Program Fileswsus-operationsLog" write-host "Please select a file" sleep 1 $counter = 0 $delim = "" $thefilelist = ls $Directoryl | foreach {    $filename = $    $counter++    "$counter$delim$filename"     } $thefilelist     $selection = read-host "Please select a target file" $select = $selection+"" sleep 2 $selectedfile2 = $thefilelist | where { $ -match $select} | % { $.split("")[1]} $selectedfilel = $directoryl+""+$selectedfile2 write-host "Log file" cat $selectedfilel $elect = read-host "Do you wish to continue y/n"; escape $elect sleep 2 menu } function logging { $who = [System.Security.Principal.WindowsIdentity]::GetCurrent() $whoisit = $who.Name $groupis = $targetgroup.name $emailFrom = "" $emailTo = "" $subject = "WSUS Install log" $body = "$whoisit has applied $filesummary patches to $groupis" $body2 = $datestamp+"-"+$body echo $body2 | out-file "C:Program Fileswsus-operationsLogactivitylog.txt" -append $smtpServer = "" $smtp = new-object Net.Mail.SmtpClient($smtpServer) $smtp.Send($emailFrom, $emailTo, $subject, $body) } ################################################################################################################################### ######### Main Script for WSUS patch approval ##################################################################################### [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); $updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope; $updateScope.UpdateSources = [Microsoft.UpdateServices.Administration.UpdateSources]::MicrosoftUpdate; $updateScope.UpdateApprovalActions = [Microsoft.UpdateServices.Administration.UpdateApprovalActions]::All; $all = $wsus.getcomputertargetgroups() $grouplist = $all | foreach-object {$.name} $date1 = [DateTime]::UtcNow.ToShortDateString() | % { $.split("/")[0] } $date2 = [DateTime]::UtcNow.ToShortDateString() | % { $.split("/")[1] } $date3 = [DateTime]::UtcNow.ToShortDateString() | % { $.split("/")[2] } $date4 = (get-date -displayhint time).tostring() $date5 = $date4 | % { $.split(" ")[1] } $date6 = $date5 | % { $.split(":")[0] } $date7 = $date5 | % { $.split(":")[1] } $datestamp = $date1+""+$date2+"-"+$date3+"-"+$date6+""+$date7; $counter = 0 $delim = "" $thelist = $grouplist | foreach {            $group = $_            $counter++             "$delim$counter$delim$group"            } $Directory = "C:Program Fileswsus-operationsUpload" $DirectoryR = "C:Program Fileswsus-operationsReport" $selectedgroup = "" $selectedfile = "" write-host "-------------------------------------------------------------" write-host "-------------------------------------------------------------" write-host "----------------WSUS PATCH OPERATIONS------------------------" menu $selectedgroup

  • Anonymous
    December 19, 2010
    The comment has been removed