State Tool installation on Windows Server 2016

What is the fix for the following error message? Attempted to install state tool on Windows Server 2016 with Macfee and firewall turn off and internate accessible from the server.

C:\Windows\system32>powershell -Command “& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(‘’)))”
Exception calling “DownloadString” with “1” argument(s): “The underlying connection was closed: An unexpected error occurred on a
At line:1 char:5

  • & $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(’ …
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:slight_smile: , MethodInvocationException
    • FullyQualifiedErrorId : WebException

The expression after ‘&’ in a pipeline element produced an object that was not valid. It must result in a command name, a script block,
or a CommandInfo object.
At line:1 char:3

  • & $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(’ …
  • + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

This is an old problem, and has been asked several times in the forums.

The fix is to use Windows 10 or 11. You can’t install the State Tool on old versions of Windows, and any version of Windows Server will likely be too locked down to work.

If you must run on Server 2016, you’re going to need something Legacy. Ask Sales about getting Enterprise Tier, or Team Tier with the offline Legacy installers add on, and Perl 5.28 or older.