PCT job

Pikoshi's picture

So I am trying to setup a generalized set of jobs that will do the following:

1. Capture PCT settings
2. Rename machine 1 to machine 1-old
3. Rename machine 2 to machine 1
4. Deploy PCT settings.

Steps 1 and 4 are easy to setup. What I am trying to figure out is how to get the DS to pass the machine name from machine 1 to machine two. Any ideas?

tbonsal1's picture

This is what I use to acheive a similar funtion

I hope that this all makes sense...

I created a custom DB named "express_custom" on the same SQL server that the "express" DB lives. Then I created two custom tables named "pct_distribution_map" and "pct_username_map". The "pct_distribution_map" table contains two columns named "Destination_Computer" and "Source_Computer". The "pct_username_map" contains two columns named "OLD" and "NEW". To get DS to see the custom DB, just add it into Custom Data Sources in the DS program options.

We use the follwing sripts to rename a computer during a migration using PCT and to deploy the PCT capture to the new computer.

1. PCT Capture

2. Rename Computer (Uses "netdome.exe from the windows server resource kit)

netdom.exe renamecomputer %COMPUTERNAME% /NewName:%#Custom*"select Destination_Computer_Name from PCT_Distribution_Map where Source_Computer_Name = '%COMPNAME%'"% /FORCE

3. Distibute PCT Capture

\\Server\Share\%#Custom*"select Source_Computer_Name from PCT_Distribution_Map where Destination_Computer_Name = '%COMPNAME%'"%.exe