Windows Vista Forums

WSUS List Computers that Need to Reboot

  1. #1


    rnitro1 Guest

    WSUS List Computers that Need to Reboot

    I receive an Error invalid character, Line 1 Char: 87 Code 800A0408 when
    running the following Vbscript from microsoft. Does anyone know which
    character is invalad?


    [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);

    $computers | foreach-object {
    $_.FullDomainName | write-host;

    # Show which updates are causing the reboot required for the
    computer. Remove the next 5 lines to only generate a list of computers.
    $updatesForReboot =
    $_.GetUpdateInstallationInfoPerUpdate($updateScope);
    $updatesForReboot | foreach-object {
    $neededUpdate = $wsus.GetUpdate($_.UpdateId);
    " "+$neededUpdate.Title | write-host;
    # Remove previous lines to only show computers that need
    updates
    }
    }


      My System SpecsSystem Spec

  2. #2


    Al Dunbar Guest

    Re: WSUS List Computers that Need to Reboot

    "rnitro1" <rnitro1@xxxxxx> wrote in message
    news:2AA6F98E-0DAA-4AFA-95D4-A0BA274BB02D@xxxxxx

    >I receive an Error invalid character, Line 1 Char: 87 Code 800A0408 when
    > running the following Vbscript from microsoft. Does anyone know which
    > character is invalad?
    The "|" is the invalid character in your vbscript, but more troubling is the
    fact that this code is not vbscript at all, but appears to be powershell.
    Try renaming the script file from *.vbs to *.ps1 and see if it works then.

    /Al

    >
    >
    > [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);
    >
    > $computers | foreach-object {
    > $_.FullDomainName | write-host;
    >
    > # Show which updates are causing the reboot required for
    > the
    > computer. Remove the next 5 lines to only generate a list of computers.
    > $updatesForReboot =
    > $_.GetUpdateInstallationInfoPerUpdate($updateScope);
    > $updatesForReboot | foreach-object {
    > $neededUpdate = $wsus.GetUpdate($_.UpdateId);
    > " "+$neededUpdate.Title | write-host;
    > # Remove previous lines to only show computers that need
    > updates
    > }
    > }
    >


      My System SpecsSystem Spec

WSUS List Computers that Need to Reboot

Similar Threads
Thread Forum
Where is the script to convert domain computers to sbs computers?
I have a client that had a pre-existing domain that they added a SBS server to. The previous tech guy totally messed up the SBS box so I wiped it...
SBS Server
Finding members of RDP groups of a list of computers
Title pretty much says it all I'm trying to find a script which will find the members of the rdp group from a list of PC's on a domain from a txt...
VB Script
Search text file and list computers which belong under same headin
Hi, I have a text file as below which contains headings (starts with Group:) with computer information below them. The file contains computers at...
VB Script
retrieve all workgroup computers list
I'm still here with another question of mine. :) Is it possible to retrieve the list of all computers within my workgroup?
PowerShell
List Computers on the domain and the last user that is logged on this.
Hi to all. i need a script to generate on a csv or txt a list of the computers on the domian and the last user that is logged on it. Thanks a...
VB Script
Networking XP computers w Vista Computers
I have just switched to a brand new Vista computer as the primary computer on my network. I even got Ultimate to have the best. Now I can't see...
Vista General
Can 2 xp computers and 2 vista computers exist in a family network
Hi. We have had 4 computers on a family network forever. 2 are connected to the router via cable - 1 xp and 1 vista. 2 are connected to the...
Vista networking & sharing