?
Solved

Convert PowerShell 2.0 script to run on PS 1.0 server

Posted on 2012-04-06
5
Medium Priority
?
609 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 82

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 70

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 82

Accepted Solution

by:
David Johnson, CD, MVP earned 1500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Suggested Courses

770 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