I delivered my session at the Belgian Techdays, and I promised on my blog and during the session that I would share the scripts with all of you. So here they come. Most of these scripts were used during a side-by-side upgrade transition. The side-by-side upgrade transition process looks like this:
- Install SMS 2003 SP2 on new server
- Attach new SMS 2003 SP2 site as a child site
- Let objects replicate
- Break Parent – Child relationship
- Upgrade new Site to Configmgr 2007
- Install KB945898
- Migrate clients to new site
- Remove boundaries from original site
- Add boundaries to new site
- Decommission original site
- Migrate non-replicating objects (queries/reports)
This method provides a smooth transition without impacting your current sms 2003 infrastructure until your new Sccm 2007 environment is fully up and running and has been tested successfully. This makes it one of the lowest transitioning methods available.
Challenges / manual steps to perform in this method are
- Verify all objects have migrated
- Configure Site Settings
- Migrate Folders and folder membership
- Make Software distribution functional in new site without boundaries
- Optional: Modify package source path
- Migrate hardware inventory customizations (SMS_def.mof)
- Export / Import queries
- Export / Import reports
- Configure security rights
- Non-Replicating Software Metering Rules
In this section I will go over these challenges, and when available introduce a script to tackle these challenges. If a script is available I will first explain what the script does, give an example command line, and add some comments/remarks.
Challenge 1: See Script1 later in this post
Challenge 2: This is left as manual exercise for the reader
Challenge 3: See Script2 & Script3 later in this post
Challenge 4: See Script5 later in this post
Challenge 5: See Script4 later in this post
Challenge 6: See Challenge 2
Challenge 7: Use the export and import wizard, my experience has been that importing the mof file in one pass tends to be error-prone. I usually cut the mof file into 200KB chunks and import the chunks one by one, this has resulted in a much less error-prone import process. Run the script to move the queries into the correct folder, see script 3 later in this post.
Challenge 8: See Challenge 7
Challenge 9: See Challenge 2
Challenge 10: Software metering rules can be configured to apply to this site, or to this site and all child sites. If your software metering rules are configured to only apply to the current site than they will obviously not replicate. This setting is unfortunately not configurable after the rule has been created.
Scripts to Tackle the challenges:
Just for the record these Scripts do not come with any form of support or guarantee, the scripts have served me well but should be tested in your environment as your mileage may vary!!! Furthermore the script aren't always the cleanest code, they don't log a lot of data and do use some hardcoded parameters that would be more appropriate in an argument.
This script counts the number of Queries, Reports, Packages, Advertisement, Software Metering Rules, Collections and folders.
Usage: Cscript Countobjects.vbs
You run this script on both the old and new sms 2003 servers and compare the numbers, once all numbers match up you can perform step 4 and break the parent - child relationship.
This script allows you to export and import the folder structure from one sms 2003 environment to another.
Usage: Cscript SmsContainers.vbs export s01folders.txt or Cscript SmsContainers.vbs import s01folders.txt
Because Sms 2003 does not replicate the folder structure to child sites we need a script that duplicates this folder structure. At import time this script creates a file called conversionarray.txt that allows us to translate old folder id's into new folder id's. We will need this file in later scripts to move the objects back into the correct folders.
There are multiple scripts with this filename where xyz is either adv for adertisements, pkg for packages, rprt for reports, qry for queries and swmtr for software metering rules. These script move the respective objects into the correct folder.
Usage: Cscript.exe xyzfoldermembership.vbs export S01xyzfolders.txt or Cscript.exe xyzfoldermembership.vbs import S01xyzfolders.txt
These scripts need the conversionarray.txt to be available to find the correct folderid to place the objects in.
This script modifies the packagesource of all packages to a new server.
If the sourcefiles for your packages are stored locally on the site server, you'll need to modify the package sourcepath of all packages to a new server. First copy the source package folder structure to the new server and then edit the script to replace the oldserver and newserver strings with the values needed for your environment.
This script configures all advertisements to run from a remote distribution point.
Because you cannot have overlapping boundaries we can only move the boundaries after all of the clients in a boundary have migrated. Because of this, clients in the new sccm infrastructure will not be able to find a local distribution point. So if you want these clients to be able to run advertisements these advertisements have to be configured to allow run from remote distribution point. If you want to change the value back later just change the bit value. Secondly if you already have some advertisements that are configured to run from remote dp, or download from remote dp, this script does not build a text file to store what it has changed, so the script doesn't allow you to revert back to the original situation. If this is something you require you'll have to adapt the script to save the original configuration.
The scripts can be downloaded here:
"Everyone is an expert at something"
Kim Oppalfens - Sms Expert for lack of any other expertise
Windows Server System MVP - SMS
Read the complete post at http://scug.be/blogs/sccm/archive/2008/03/17/how-to-transition-from-sms-2003-to-sccm-2007-notes-from-the-field-tips-amp-tricks.aspx