itnifl
asked on
Looks like System Center Orchestrator uses an old and different version of powershell
I have upgraded Powershell on our System Center Orchestrator 2012 server to 4.0. I still see there are cmdlets missing that should be in the 4.0 version when I run powershell scripts with Orchestrator. I than created a runbok to run a powershell script containing this:
And this is what I get:
When I start powershell.exe under C:\Windows\SysWOW64\Window sPowerShel l\v1.0 and run the same commands,it says it is 4.0.
So how do I get Orchestrator to use Powershell 4.0, and not 2.0?
$PSVersionTable.PSVersion > C:\temp\test1.txt
get-host > C:\temp\test2.txt
echo $PsHome > C:\temp\test3.txt
And this is what I get:
test1.txt
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
test2.txt:
Name : Default Host
Version : 2.0
InstanceId : 3abe31d9-42ac-4025-bd4a-d5be8a342e89
UI : System.Management.Automation.Interna l.Host.Int ernalHostU serIn
terface
CurrentCulture : nb-NO
CurrentUICulture : en-US
PrivateData :
IsRunspacePushed :
Runspace :
test3.txt:
C:\Windows\SysWOW64\WindowsPowerShel l\v1.0
When I start powershell.exe under C:\Windows\SysWOW64\Window
So how do I get Orchestrator to use Powershell 4.0, and not 2.0?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
HI
Yes they do, just upgraded the other day to use this.
I am not sure you can upgrade the one Orchestrator uses unless you maybe create your own Activity with the details of the new version of PowerShell in it then it should be able to use the version 4.0, so then you always use your newly created Integration Pack and custom activity rather all the time.
But as I said, I would just call the path within the existing one, that would be a quicker solution and should then call the version you want.
Thanks
Yes they do, just upgraded the other day to use this.
I am not sure you can upgrade the one Orchestrator uses unless you maybe create your own Activity with the details of the new version of PowerShell in it then it should be able to use the version 4.0, so then you always use your newly created Integration Pack and custom activity rather all the time.
But as I said, I would just call the path within the existing one, that would be a quicker solution and should then call the version you want.
Thanks
ASKER
The Powershell Integration Pack did the trick.
ASKER