When I try to run the CLI script I get the following error:
Microsoft Windows [Version 10.0.19041.1237]
(c) Microsoft Corporation. All rights reserved.
C:\windows\system32>powershell -Command “& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(‘https://platform.activestate.com/dl/cli/pdli01/install-latest.ps1’))) -c’state activate --default bvernham/ActivePython-3.8-2’”
New-Object : Cannot create type. Only core types are supported in this language mode.
At line:1 char:28
Don’t run this as Administrator. It does not install the way you’re thinking it will. This install command will give you a virtual runtime, suitable for doing Python coding.
You might want a different installation command, or your use case might require an older version of Python for older versions of Windows.
If you’re on Windows Server 2016, see the forum posts for configuring your version of Powershell to support TLS 1.2, which it will not do out of the box. You may also need to set variable that allow the command line to get out past your firewall or proxy server.
FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
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
That at least isolates the problem a bit more. It looks like you have GPO set which is forcing Powershell into Constrained Language Mode. Can you find that and turn it off? Or find a way to start it in full language mode?