wget for Windows Server core

I’m setting up a new IIS role on a new install of Windows Server 2019 core and I needed to grab a file from a remote webserver.

My go-to for this would be the powershell alias wget. This is just an alias for Invoke-WebRequest. Problem, on Server Core is that it requires the Internet Explorer engine – which isn’t going to be available on Server Core.

One workaround is to use the -UseBasicParsing option.

invoke-webrequest -usebasicparsing https://example.com/download.zip -out download.zip

But I also found another neat trick – and this method is a LOT faster to download during my testing.

Import-Module BitsTransfer
Start-BitsTransfer -source "https://example.com/download.zip"

This will save the file in the working directory.

Use PowerShell to get processes greater than 1000 CPU(s) on remote server

Find out which processes are consuming 1 second CPU time.

Invoke-Command -ComputerName win2k8-01 -ScriptBlock { Get-Process | Where CPU -gt 1000 } -ErrorAction SilentlyContinue | Sort CPU -Descending | Format-Table -AutoSize
PS C:\WINDOWS\system32> Invoke-Command -ComputerName win2k8-01 -ScriptBlock { Get-Process | Where CPU -gt 1000 } -ErrorAction SilentlyContinue | Sort CPU -Descending | Format-Table -AutoSize

Handles NPM(K)  PM(K)  WS(K)    CPU(s)   Id SI ProcessName PSComputerName
------- ------  -----  -----    ------   -- -- ----------- --------------
   3395     35  28688  37512 14,120.66  504    lsass       win2k8-01
   1875      0    124    300 10,514.17    4    System      win2k8-01
   5552     91  94932 111780  3,009.01  828    svchost     win2k8-01
    832     21   8832  16596  1,654.25 1740    vmtoolsd    win2k8-01
    630     39  35396  45676  1,591.18 1096    spoolsv     win2k8-01
   1006     26  11548  18792  1,256.78 1292    svchost     win2k8-01
    748     79  61904  69492  1,019.92  988    svchost     win2k8-01
    724     46 228852 200448  1,006.57 1428    tomcat7     win2k8-01

Make Windows Photo Viewer the default image viewer on Windows 10

Windows 10 Creator update replaced (read: forced users to use) the Microsoft Photos app with Microsoft’s new Paint 3D. I didn’t like Microsoft Photos app, and I really dislike Paint 3D.

I found an article on Howto Geek and it provides a downloadable Registry tweak to actually bring back the older Windows Photo Viewer that most of us are familiar with from Windows 7.

Note: If you do not want the older Windows Photo Viewer and just prefer the Microsoft Photos app, you can install that app from the Microsoft Store.

I have also saved the download and have made it available from this server as well.

Windows Server 2019 Licensing Notes

Windows Server 2019 per-core licensing model requires a minimum of 8 cores per physical socket, with 16 total cores minimum licensed for a server.

Windows Server 2019 user CALs are required for every user accessing directly, or indirectly, the server.

Merry Christmas

Not sure who reads this 12 year old tech blog of mine, but I wish you a merry Christmas and I hope you have a happy, healthy and successful new year.