Back to Blog
Sysinternals suite command prompt5/30/2023 You can also use the script to download all Sysinternals tools from scratch without going to their website. ![]() powershell.exe -executionpolicy bypass -command "c:\Users\kent\Desktop\Update-Sysinternals.ps1" You can manually run it either from PowerShell console, like the screenshot above, or Command Prompt window, running the following command, assuming the Update-Sysinternals.ps1 is saved on my desktop. Replace “ Z:\Desktop\C-20130201\PSTools” with the actual folder path in your case and you are good to go. Update-Sysinternalshttp -ToolsLocalDir "Z:\Desktop\C-20130201\PSTools" $wc.DownloadFile("$ToolsUrl/$_","$ToolsLocalDir$_" )Ĭatch $needupdate=(($tools).touniversaltime() -lt $LocalFileDate.touniversaltime()) $LocalFileDate= ( (dir $_).lastWriteTime ).Subtract( $SubtractSeconds ) $SubtractSeconds = New-Object System.TimeSpan 0, 0, 0, ((dir $_).lastWriteTime).second, 0 $line=$lines|select-string -NotMatch -Pattern "To Parent|^$|
"
$matches= $ToolsPage |select-string -pattern "$ToolsBlock" -AllMatches $wc.Headers.Add("user-agent", $userAgent) $userAgent = "Mozilla/4.0 (compatible MSIE 6.0 Windows NT 5.2 )" ![]() Here is the original code in the script: function Update-SysinternalsHTTP ($ToolsLocalDir = "c:\temp\sys") ![]() Download the script from the link above and update the folder path at the bottom to specify where the Sysinternals are saved on your computer.
0 Comments
Read More
Leave a Reply. |