If only I were

Building Great Software

PowerShell and \\live.sysinternals.com\tools

with one comment

This is still a bit rough, but it works. The point of this script is to get updated versions of the sysinternals tools by running a single script.

cls

$targetdir = "c:\Utils\"

$tools = @{autoruns="autoruns.exe"; procexp="procexp.exe";
zoomit="zoomit.exe"; whois="whois.exe"; adexplorer="ADExplorer.exe"}

foreach($tool in $tools.Keys)
{    Stop-Process -Name $tool -ErrorAction SilentlyContinue    }

foreach($tool in $tools.Values)
{    copy -Path "\\live.sysinternals.com\tools\$tool"  -Destination $targetdir -Force    }

procexp /t

if ($error.count -gt 0)
{
    foreach($e in $error)
    {    Write-Host "error: " + $e }
}
else
{    Write-Host "completed successfully"    }

If you know ways to make it better, please post them in the contents.

Advertisements

Written by Chris Sutton

July 1, 2008 at 10:43 pm

Posted in Learning, Technology

One Response

Subscribe to comments with RSS.

  1. […] – bookmarked by 6 members originally found by soshidarkandkyo911 on 2008-08-24 PowerShell and live.sysinternals.com ools https://subjunctive.wordpress.com/2008/07/01/powershell-and-livesysinternalscomtools/ – bookmarked […]

    Bookmarks about Powershell

    September 8, 2008 at 11:45 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: