PowerShell Script to download latest SysInternals tools

The SysInternals tools are pretty much a must-have for any IT Pro, but they get updated randomly and I always like to have the latest versions. You can run them from the live site, but I like to have them stored within my network as not everything has internet access.

This script will copy all the tools to the specified folder. Run it as a scheduled task.

$DestinationFolder = "C:\sysint"

Write-Host "Connecting"
New-PSDrive -Name SysInt -PSProvider FileSystem -Root \\live.sysinternals.com\Tools
$Files = Get-ChildItem -Path SysInt:\ -Recurse

Write-Host "Copying"
$Copied = 0
foreach($File in $Files){
    Write-Progress -Activity "Update SysInt" -Status $File.Name -PercentComplete ($Copied / $Files.Count * 100)
    Copy-Item -Path $File.FullName -Destination $DestinationFolder -Force
    $Copied++
}
Write-Progress -Activity "Update SysInt" -Completed

Write-Host "Tidying up"
Remove-PSDrive -Name SysInt -PSProvider FileSystem

Enjoy!

Note that if you want to run this on Windows Server you need to enable Desktop Experience and then start the WebClient service, this is to enable the Windows WebDAV client functionality. If you don’t want to set the service to autostart you could modify the script to start the service at the beginning and stop it at the end.

This entry was posted in PowerShell, Windows and tagged , , , , , , , , . Bookmark the permalink.

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