Solved

Convert PowerShell 2.0 script to run on PS 1.0 server

Posted on 2012-04-06
5
595 Views
Last Modified: 2012-06-21
Hi

I wrote a script for a client last year based on the 2.0 version syntax
The existing windows 2003 servers were running Powershell 1.0
but they had been scheduled for an upgrade to PS 2.0

Apparently they have decided that the upgrade won't happen anytime
soon i.e. not in the next couple of years.

Is it possible to downgrade/convert my script so that is can run
in a PS 1.0 environment ?
Is it just a case of'debugging the code in order to replace certain
commands, or syntaxes ?

thanks in advance for your insight

yann

commans
0
Comment
Question by:Yann Shukor
  • 2
  • 2
5 Comments
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 37819930
It depends on a lot of variables, the code might just work on 1.0. It may just require a few tweaks, or it might mean a full re-write.  Charge the customer as required. First let them know how much it will cost them for the re-write. Doesn't your contract state powershell 2.0?

I always make sure that all of the details are specified in the contract for services, like programming the devil is always in the details
0
 

Author Comment

by:Yann Shukor
ID: 37821371
Thanks for your reply

I did indeed state PS 2.0, as well as indicate how to upgrade their PS 1.0 servers

I have come to the same conclusion although, I'm no PS expert.
I learnt PS on the go while developping this script.

There are in fact two scripts, one to prepare and transmit, and the other to receive and deploy. This issue concerns the second script.

Regards

yann
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 37827200
I have to agree to what ve3ofa said. And there is absolutely no reason why they are not installing PS2, so they need to learn by paying money for downgrading.
But since there aren't that much fundamental changes between 1.1 and 2.0, checking and converting the scripts should be easy - a "compile and see" kind of work. You do not have Remoting, and some cmdlets are missing, so you need to use more .Net types and methods.
0
 

Author Comment

by:Yann Shukor
ID: 37827278
Thanks Qlemo
Last I heard, well after receiving my quote, they have decided
to attempt an upgrade on one of their 2003 servers to see how
things turn out i.e. in terms of disrupting the other production
apps in place.

cheers
yann
0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 37828011
Good, when it comes to costing them more $$ they tend to listen. this is where a good contract solves problems and disagreements
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sharepoint 2010 Audit Logs 11 148
Trust relationship when doing server upgrades 3 51
Measure time after installing Antivirus 8 60
DNS/WINS in a domain 10 49
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Know what services you can and cannot, should and should not combine on your server.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

730 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