Solved

Looks like System Center Orchestrator uses an old and different version of powershell

Posted on 2014-02-21
4
849 Views
Last Modified: 2014-02-24
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:

$PSVersionTable.PSVersion > C:\temp\test1.txt
get-host > C:\temp\test2.txt
echo $PsHome > C:\temp\test3.txt

Open in new window


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.Internal.Host.InternalHostUserIn
                   terface
CurrentCulture   : nb-NO
CurrentUICulture : en-US
PrivateData      :
IsRunspacePushed :
Runspace         :

test3.txt:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0


When I start powershell.exe under C:\Windows\SysWOW64\WindowsPowerShell\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?
0
Comment
Question by:itnifl
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Leon Taljaard earned 500 total points
ID: 39877099
Hi

What you could do is call the command like this within the Orchestrator activity, see link below with example of how it is done.

http://www.purgar.net/using-exchange-2010-cmdlets-in-system-center-orchestrator/

You could also install the PowerShell Integration Pack from the following site and use it this way instead.

http://orchestrator.codeplex.com/releases/view/76101

Hope this helps
0
 
LVL 2

Author Comment

by:itnifl
ID: 39878963
Actually they have version 1.2 now of Integration Pack for PowerShell Script Execution. i was leaning towards these suggestions you came with, found them on Google. However, it would be great to just know how to upgrade the Powershell version that Orchestrator uses.
0
 
LVL 8

Expert Comment

by:Leon Taljaard
ID: 39879036
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
0
 
LVL 2

Author Closing Comment

by:itnifl
ID: 39882284
The Powershell Integration Pack did the trick.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now