Solved

Convert PowerShell 2.0 script to run on PS 1.0 server

Posted on 2012-04-06
5
579 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 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
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
Comment Utility
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 68

Expert Comment

by:Qlemo
Comment Utility
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
Comment Utility
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 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found listed in my profile here: http:…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…

762 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

6 Experts available now in Live!

Get 1:1 Help Now