Using Powershell v4.0 in your Orchestrator environment

Hey there!

I knew about this quite some time already, but never had time and apettite to do this change. Finally today I decided to use Powershell v4.0 in my Orchestrator dev environment in order to use all its wonderful features.

We need to configure system registry, so the change is applied to all applications (using .NET). Let’s do it…

Within the registry editor, navigate to:

For 64-bit apps:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework

For 32-bit apps:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework

 

And add a new DWORD named OnlyUseLatestCLR and it’s value 1. If you want to do it for both 32/64bit, you need to add this key on both places.

 

If you want to configure only Powershell (this will not apply to Orchestrator)

Within the $pshome directory (there are 2, one for 32bit and another one for 64bit), create a new file named powershell.exe.config and insert following content:

<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
<runtime>
<loadfromremotesources enabled="true"/>
</runtime>
</configuration>

Default paths for $pshome:

32-bit: C:\Windows\SysWOW64\WindowsPowerShell\v1.0
64-bit: C:\Windows\System32\WindowsPowerShell\v1.0

 

Cool, isn’t it? Let me know whether this worked in your environment.

 

Cheers,

Robot(ICT) guy

  • Was this Helpful ?
  • yes   no

Published by

Lukas Vu

I started in IT with my own business since high school providing automated and centralized hosting solutions to end customers. Nowadays I'm focusing on corporate area, analyzing, managing and improving customer's IT environments. My main focus nowadays is automation and architectural improvements.

Leave a Reply

Your email address will not be published. Required fields are marked *