WSUS script for pending reboot possible addition - How

Hi, I am found script for pending reboot and script work perfectly. My problem is that script generate only pending computers reboot for master wsus server not for replica servers. Can I modify this script to generate pending reboot for all replica servers on
one place(wsus master server) or I must run this script on every replica server. This is script:
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
if (!$wsus) {
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$computerScope = new-object Microsoft.UpdateServices.Administration.ComputerTargetScope;
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$computers = $wsus.GetComputerTargets($computerScope);
$report = @()
$computers | foreach-object {
$computer = $_.FullDomainName
$updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
$updatesForReboot | foreach-object {
$temp = "" | Select Computer,Update
$temp.Computer = $computer
$temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
$report += $temp
$report | Select "Computer","Update" | Export-Csv -Path c:\..PendingReboot.csv -Delimiter 1 -NoTypeInformation

Modified script
work great. I have report from all replica server and master server after new updates
from today. I am add mail option and finaly this is what I am modify:
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null
if (!$wsus) {
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$computerScope = new-object Microsoft.UpdateServices.Administration.computerTargetScope;
$computerScope.IncludeDownstreamComputerTargets = $true
$computerScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$updateScope = new-object Microsoft.UpdateServices.Administration.UpdateScope;
$updateScope.IncludedInstallationStates = [Microsoft.UpdateServices.Administration.UpdateInstallationStates]::InstalledPendingReboot;
$computers = $wsus.GetComputerTargets($computerScope);
$report = @()
$computers | foreach-object {
$computer = $_.FullDomainName
$updatesForReboot = $_.GetUpdateInstallationInfoPerUpdate($updateScope)
$updatesForReboot | foreach-object {
$temp = "" | Select Computer,Update
$temp.Computer = $computer
$temp.Update = ($wsus.GetUpdate($_.UpdateId)).Title
$report += $temp
$report | Select "Computer","Update" | Export-Csv -Path c:\yourpath...PendingReboot.csv -Delimiter 1 -NoTypeInformation
$smtpServer = "your mail server"
$att = "c:\yourpath...PendingReboot.csv"
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "[email protected]"
$msg.To.Add("[email protected]")
$msg.Subject = "Pending Reboot"
$msg.Body = "Your msg"
$msg.Attachments.Add($att)
$smtp.Send($msg)

Similar Messages

  • Applet invoke a java script function...possible ? how ?

    Hi,
    Is it possible for an applet to call a (client side) javascript function, present in its own html page?
    I know that within an Applet, I can get the context() and then do something like change the string on the browser status bar.
    What I wish is too invoke a javascript function within the page on which the applet resides.
    Is this possible ?
    If yes will appreciate a sample code.
    rgds
    G1

    I think you should post your question in another forum. We're talking about web services here
    Hope this helps :)

  • Offset Path Script for PS CS5 Possible?

    Hey all, my needy self is back to ask if anyone has heard of or attempted a script that will offset a path in the same way Illustrator does. ?
    I have a group of images with clipping paths penned too much to the outside of the image edge, which will result in the "halo" effect when pasting into InDesign. Currently, I'm copying the path into Illustrator, using Offset Path with a negative value, then pasting back into PS, deleting old clipping path, and saving.
    Thanks in advance for any help!

    Apparently people doing CNC milling have need for such things too:
    e.g. http://www.cnczone.com/forums/coding/73975-offset_algorithm.html https://github.com/Heeks/libarea/blob/master/kurve/offset.cpp
    These might be a clearer place to start:
    http://cagd.cs.byu.edu/~557/text/ch8.pdf
    http://www.cis.usouthal.edu/~hain/general/Publications/Bezier/Bezier%20Offset%20Curves.pdf
    http://www.cis.usouthal.edu/~hain/general/Publications/Bezier/BezierFlattening.pdf
    http://stackoverflow.com/questions/408457/outline-of-cubic-bezier-curve-stroke

  • How to make a Countdown timer Script for Live Streaming

    I have flash media server...
    Here's a Scenario:
    User wants to do a Live broadcast.. But.. they don't want to
    just press record and have it starting Streaming Right that second.
    They need a Delay to prepare for their Live Broadcasts.
    Whats the best way for a script for a user to decide how much
    time delay they need before Recording Starts?
    Ideally it would look like this:
    There is a separate window that allows the user to set the
    Self-Timer which will give them time to get ready for their live
    broadcasts.
    User sets length of Time Delay: 30 seconds, 1 minute, 2
    minutes, or even up to 5 minutes.
    User presses Start Broadcast or Record Button to start
    streaming Live Video.
    Then.. the Countdown Timer starts... and it displays in Big
    Digits... the countdown on their screen... "3...2...1...
    Broadcasting Live Now!"
    How would I do this?
    Hope someone can help

    Open the widget library panel and follow the link to Adobe Muse Exchange.
    There you find a fine little widget collection, named Andrews Prototypes.
    Load it, double-click the file, and in your library you will find a countdown widget.

  • How to make an insert script for CLOB data types?

    I need to have an insert script for Oracle 11g where I insert large texts into a CLOB field
    I exported data from a source table using TOAD's export dataset and the insert statements option, so it generates a script of just simple insert into statements with the clob strings in the values clause within single quotes.
    While most of the inserts succeed, several fail with the error: string literal too long
    How can I insert long texts into clobs?
    One workaround I was considering, is maybe breaking up those inserts which are too big, so that it inserts a chunk, and then does an update to append additional chunks? not sure if that would work either
    first wanted to get any ideas from the oracle experts here in case there is a much easier, non-manual labor intensive way.

    Thank you for that informative link, Raj
    I wouldn't be able to use SQL Loader for this though, this is something that gets submitted to a DBA in a request and it must be in a script that can be run in Sql Plus, and it cannot pull it from a table or file.

  • I have a 4 gen Time Caps. and a 2nd Gen Airport Extreme I would like to extend my TC network to use the Extreme for the purpose of having internet available to my TV box wired.  Is this possible and how to I get them to work together?

    I have a 4 gen Time Caps. and a 2nd Gen Airport Extreme I would like to extend my TC network to use the Extreme for the purpose of having internet available to my TV box wired.  Is this possible and how to I get them to work together?
    How can I get my Time Cap (TC 4 gen) to recognise my 2gen Airport Extreem (AE)
    Frank

    Thanks for the info, this really helps.
    Power up the AirPort Extreme for a few minutes, then hold in the reset button on the back of the Extreme for 10 seconds and release. Allow a full minute for the Extreme to restart to a slow, blinking amber light.
    It might be possible to use wireless to configure the Extreme, but I recommend using a wired connection. Temporarily, connect an Ethernet cable from your Mac to one of the LAN <-> ports on the Extreme.
    Click the AirPort icon at the top of the Mac's screen and wait a few seconds for a listing of New AirPort Base Station to appear. Just below that, click on  AirPort Extreme.
    The illustration below shows an AirPort Express. You will see AirPort Extreme on your screen.
    AirPort Setup will open up automatically and take a minute to analyze the network, then announce that the Extreme will be configured to extend the Time Capsule network.
    Enter a device name that you want to use for the Extreme and click Next
    Wait a minute while AirPort Setup configures things for you. When you see the message of Setup Complete, click Done.
    You can disconnect the Ethernet cable that you used for the set up now. Things should be working. The Extreme is providing additional wireless coverage the the Ethernet ports are enabled. You can connect to any port that you want since they all operate the same in this type of setup.

  • Handling of pending reboot, exclusive updates for patch management with SCCM 2012

    Hello,
    Planning to use SCCM 2012, I would like to understand how smart is SCCM 2012 when dealing with specific patch management situation.
    Assuming I have the following:
    - A given server to be patched is missing a lot of updates, several being mutually exclusive. This typical case will require several reboot / patching to properly obtain a server fully up to date.
    - A given server to be patched is in pending reboot state because the local admin installed new software and has not restarted the server yet as requested
    - Those servers have configured maintenance windows of 2 hours during each night. I scheduled a deployment of missing patches authorizing restart.
    --> when the maintenance window will be reached:
    - will the server first be restarted to clean the pending reboot ?
    - will the the server be patched / restarted several times as required to fully meet the updates to be deployed.
    Another scenario on workstation side:
    - can I enforce deployment of updates at a given time, do not automatically restart the workstation during patch deployment, but after deployment schedule a mandatory restart with a countdown if there is a pending reboot... From end-user perspective, it
    would have the following behavior. For instance:
    - patches are automatically installed on Monday at 10 AM
    - as soon as deployment is done, warning message is displayed to ask users to reboot
    - then user has up to 48h to restart his computer by himself. If he does not do it, it will be automatically done after countdown expires.
    --> Can such a scenario be managed by SCCM 2012 ?
    Regards.

    Hi,
    I have a related question about deploying Microsoft Security Updates to workstations via SCCM 2012.  Is there a way to deploy the MS updates to workstations and only suppress reboots for machines with users logged on or locked?  There seems to
    be only 2 different options for reboots, Suppress them all or don't suppress them at all.  We would like SCCM to reboot the machines that are logged off, but suppress the reboot for those that are logged on, while at the same time, provide the user with
    a notification that their machine needs to be rebooted (at their convenience). 
    We've tried applying the Domain GPO "No auto-restart with logged on users for scheduled automatic updates installations" (Enabled) and "Configure Automatic Updates" (Disabled), but the logged on/locked machines still receive the restart countdown with no
    option to postpone or delay.
    This is a show stopper for us since we have an environment where we are absolutely not allowed to reboot a logged on machine.
    For a little background, we are coming from SMS 2003 and the Distribute Software Updates (ITMU) way of deploying MS Updates, where we could always set the program to run "Only when no user is logged on".
    Please tell me there is a way to achieve our desired result.
    Thanks,
    Dan 

  • How do you either set "Show More Tiles" or Start Screen rows via command line or script for Windows 8.1?

    Is there a method to change the Start Screens number of rows (similar to Windows 8.0's use of the Explorer\Scaling\MonitorSize in registry). Possibly by forcing the switch for "Show More Tiles" via script etc? This is to enable the device with
    Windows 8.1 to be built using a deployment methodology like SCCM and have the Tiles correctly configured as required for a standard look and feel across devices. I do not know why all these switches are not represented in either WMI or the registry to enable
    the customization of look and feel out of the box for enterprise deployments.
    Thanks for any assistance possible.

    Hi,
    You can try steps in this article.
    How to Change Number of Apps Tile Rows on "Start" Screen in Windows 8 and Windows 8.1
    http://www.eightforums.com/tutorials/2690-start-screen-metro-apps-change-number-rows-windows-8-a.html
    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,
    Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you
    completely understand the risk before retrieving any software from the Internet.
    Hope this could be helpful.
    Kate Li
    TechNet Community Support

  • How do I change the script for a voice iChat Alerts for when a friend becomes unavailable?

    How do I change the script for a voice iChat Alert for when a friend becomes unavailable?
    Before I upgraded my system from Mac OS 10.4.11 to Mac OS 10.6.8 - I a had personalized the script for a voice iChat Alert when my husband logged off from work. I had the ichat voice warn me "OH, Crap! he's coming home now! Hurry clean house!" This personalized voice alert did not survive the upgrade. Now, I need step by step instructions to walk me through the process. Please help! I mis my machine shouting funny profane alerts.

    Hi,
    In iChat 3 (OS 10.4.x) there was  Line at the Bottom of iChat > Preferences > Alerts that you could enter text to and it would speak that Text.
    (you could set something against Individual Buddies as well).
    This Setting is not there in iChat 4 or 5  (I presume iChat 6 as well).
    Now it is possible to write AppleScripts that can Speak.
    It is alos possible in iChat 4 upwards to link an AppleScript to an Action/Alert
    At this point my lack of AppleScript knowledge lets me down on what to tell you to do next.
    An Alternative would be to Record a sound with said alert.
    Place this sound in your Home Folder/Library/Sounds
    Then in the Alert opton for youe husband select the Log off option and link that Sound
    <
    10:25 PM      Wednesday; August 3, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Is it possible to use same sap script for different comp code with difflogo

    I have 3 company codes. I need to use same sap script to all  but each company code has different logo. I dnt want to go for 3 different sap script. Is it possible to change in coding
    like this
    If comp code = '100'
    print ' logo1'
    If comp code = '200'
    print ' logo2'
    If comp code = '300'
    print ' logo3'
    in same sapscript.If yes how ?

    Hi,
    Yes you can do it.
    In Sap Script use:-
    /: If Comp code='100'
       INCLUDE ZHEX-LOGO100 OBJECT TEXT ID ST LANGUAGE EN
    /:Elseif comp code = '200'
    INCLUDE ZHEX-LOGO200 OBJECT TEXT ID ST LANGUAGE EN
    /:Else
    INCLUDE ZHEX-LOGO300 OBJECT TEXT ID ST
    LANGUAGE EN
    /:Endif
    I hope this helps,
    Regards
    Raju Chitale

  • Bought upgrade on appstore. now it says its not available for download in indian store. how is it possible to buy it using indian currency!!!!????

    Bought upgrade on appstore. now it says its not available for download in indian store. how is it possible to buy it using indian currency!!!!????
    Any solution

    HI,
    No  SOLUTION FROM HERE, but I have an unresolved issue with similar overtones.
    As a new member, having had a birthday gift from a family member in another country, I am dismayed to find out that there is an unresolved business logic issue, which will allow me to own a MacBook Air, but because I live in a different country to the place of purchase there is a big No No. Additionally, my pension provideds me with a credit card from that first origin, but I am forbidden from buying any software elswhere? Apple seem reluctant to discuss this with me, but  some solutions have been offered to get me the free downloads?
    Does this come under 'unfit for purpose' and/or 'dodgy trading'? Apple unspoken message, buying from abroad. Dont go there!
    Any help or views?
    (Limbo) Cyfrommayo

  • Have a Droid Razr M that is stuck in the reboot screen. I tried a hard reboot and a factory reset, and it still gets stuck in the reboot screen. How long should I wait for the reboot to occur until it starts back up?

    Have a Droid Razr M that is stuck in the reboot screen. I tried a hard reboot and a factory reset, and it still gets stuck in the reboot screen. How long should I wait for the reboot to occur until it starts back up? I tried the steps for a factory reset given on this site, but it still does not want to work. Any help would be greatly appreciated.

        Hello otter314!
    Let's take a look into this to see if we can figure out what happened. When did this begin? What's the software version of the device? Do you remember what was happening with the device right before this started? Please supply me with some additional information, I'm happy to help with a resolution!
    ChristinaB_VZW
    VZW Support
    Follow us on Twitter @VZWSupport

  • How to created a Report to calculate On-Hand inventory for pending sales

    hi,
        how to  created a Report to calculate On-Hand inventory for pending sales orders.for this report what are the tables and fields we have to use give me sample report.
    thank you
    radhakrishna.

    Hi!
    Tables:
    VBAK - sales order header data
    VBAP - sales order position data
    VBUK - sales order status header data
    VBUP - sales order status position data
    VBELN field is the key between the tables.
    Statuses in tables VBUK, VBUP: A-uncompleted, B-partially completed, C-fully completed
    Regards
    Tamá

  • I cracked my screen. I want to use other monitor which I had one. I bought Apple Mini-DP to VGA adapter. It worked. It means I can see ADDITIONAL screen. However I want to use this monitor for the main screen. How can I do?? Please help.

    I cracked my screen. I want to use other monitor which I had one. I bought an Apple Mini-DP to VGA adapter. It worked. It means I can see ADDITIONAL screen. However I want to use this monitor for the main screen. How can I do?? Please help.

    You have the display set in Extended Desktop mode. The Menu Bar and Dock will be on the MacBook display and your background screen on the monitor. In System Preferences>Display on the MacBook screen there should be an Arrangement tab when you have the MacBook hooked up to the monitor and both screens working. When you click the Arrangement tab do you see two monitors side by side? One of them will have a Menu Bar at the top. Just click on the Menu Bar and drag it to the second monitor. That will make the second monitor your main screen. You can now use your MacBook in Clamshell Mode with a wired or Bluetooth keyboard and mouse.  http://support.apple.com/kb/HT3131 When you disconnect from the monitor your Menu Bar will automatically change back to the MacBook.

  • I want to use my IPOD Classic 160gb for notepad entries in addition to the music and books I listen to. It is set to "Open ITunes when connected to computer" and "manually manage music and videos". How can I do that without losing some of the features

    I want to use my IPOD Classic 160gb for notepad entries in addition to the music and books I listen to. It is set to "Open ITunes when connected to computer" and "manually manage music and videos".  How can I do that without losing some of the features of those two?   I just want to add a feature.  Thanks

    Settings>Store (or iTunes & App Stores if you are running iOS6)>Apple ID. Tap your son's ID and sign out. Sign in with your ID and password.
    You shouldn't lose the music, but if you try to update any apps that you bought with the family ID, you will have to use that password that is linked with that ID in order to update.
    Avoid downloading past purchased content with the old ID if you can since you will associate the iPad with the old ID for 90 days and you will lock yourself out of your own, new ID for that period of time. Read more about associated devices in iTunes here.
    iTunes Store: Associating a device or computer to your Apple ID

Maybe you are looking for

  • I would like know some general questions on ABAP

    Dear sirs, Can anyone explain me about Audit trail........(What is audit trail?) 2.What is the std.prog to change the status from 03 to 12? 3.How to debug idoc? 4.What are the idoc monitoring tools? 5.Idoc enhancement:     - what are the segments you

  • How to use loop inside table in smart form

    Hi All i have to use page break at the end of each pernr. i got table in smart form and print cells on event on sort begin. it is working ok . i have an other itab in  as well .which i want to the same page with respect to the pernr no. but the probl

  • Installing Acrobat without Reader plugin

    Hi, I'd like to ask if it's possible to install Acrobat or Reader without the Reader plugin for browsers. I prefer to open Acrobat files in their own windows, and while I can simply tell my browser not to open PDF files in the browser window, it'd be

  • Photos coming out too light. switching from easyphotoprint/winxp to EX/win7x64

    I have a customer that switched from a Windows XP system with i9900 using EasyPhotoPrint  to a Win7x64 system with easy photo print EX. as far as i can tell all settings are default on each piece of software. same paper etc. Way too many photos will

  • Upgrading my existing RAID to higher capacity drives

    Hi all, I currently have two 500GB drives as a RAID 1 (through Disk Utility) in my mid-2007 Mac Pro 8-core, and I'm starting to get a little tight on space. I'd like to up the capacity by replacing the existing 500GB drives with at least 1TB drives,