Deploying Windows 7 to a domain
Been a while but thought i would add this to my blog.
Preparing Windows 7 to be imaged out the our vanilla domain. For imaging we are currently using Free Open Ghost which is proving to be a very nice imaging suit, but the AD integration has never worked for us so we have always relied on sysprep which under XP was very simple, and would present us with a nice easy setup screen to change workstation name and then add the machine to the domain. With Win 7 sysprep can do the same process but only seems to be able to add the workstation to the domain with a nearly random machine name which is not very helpful so we have come up with a more creative way which seems to work.
Step 1:
Install Windows 7, install drivers, updates and all packages that are required in the image.
Packages we put in as default: Flash, Shockwave, reader, java, realplayer, office, quicktime, photoshop(site licence), openoffice, and VLC.
Disable the UAC in the user control panel.
Step 2:
Create our setup folder structure.
On a networkshare or memory stick create a folder called "c_drive".
Under "c_dirve" create folders "ProgramData" and "Windows".
Under "c_drive\ProgramData" create "Microsoft".
Under "c_drive\ProgramData\Microsoft" create "Windows".
Under "c_drive\ProgramData\Microsoft\Windows" create "Start Menu".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu" create "Programs".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs" create "Startup".
Under "C_drive\Windows" create "System32".
Under "C_drive\Windows\System32" create "Sysprep".
Now we have our folder structure we start to populate it with the files required.
Step 3:
Prepare a unattend.xml.
This file is used by sysprep to minimize the amount of information that needs to be setup after imaging, such as region, timezone, agrement.
To create this file we have used a free microsoft product called "Microsoft Windows AIK" installed on our Win 7 machine.
Insert a windows 7 DVD then run "Windows System Image Manager".
In the "Windows Image" right click and select new image, browse to DVD:\sources and select "install_Windows7 PROFESSIONAL.clg".
In the "Answer File" section right click and create a new answer file.
In the "Windows Image" section under the components find x86_Microsoft-Windows-Inernational-Core(version)_neutral and right click add to oobeSystem.
Under the components find x86_Microsoft-Windows-Shell-Setup_(version)_neutral and right click add to oobeSystem.
Back into the "Answer File" location expand components - oobeSystem, and select x86_Microsoft-Windows-International-Core.
Set everything under the settings on the right to "en-UK".
Select x86_Microsoft-Windows-Shell-Setup in the Answer file. expand to AutoLogon and set Enabled to true, LogonCount to 1, and username to administrator.
expand password and set value to the local administrators password.
Below AutoLogon select OOBE and set HideEULAPage to true, HideWirelessSetup to true, NetworkLocation to Work, and ProtectYourPC to 1.
Below OOBE select UserAccounts and Set the AdministratorsPassword to the same as above.
We now need to create a local user to stop the menu showing during setup, this user will not be required for any other purpose so the password can be set to a long complicated password which we will never need to use.
Right click on LocalAccounts and insert new local account, give the new account a description, display name, group = administrators, any name you like that does not already exists on the machine. Expand the local account and select password and set it to a long random string of chars/numbers/upper and lower-case characters.
Click File - Save Answer File as.... and save it in the previously created folder structure as: C_drive\Windows\System32\Sysprep\unattend.xml
Step 4:
Crate a new file in our file structure C_drive\Windows\System32\Sysprep\addtdom.ps1
Edit the file and add the following on one line changing the domain name to your domain name, and add2dom to the account you use to add machines to the domain, and password to the password of that account.
$credential = New-Object System.Management.Automation.PsCredential("DomainName\add2dom", (ConvertTo-SecureString "password" -AsPlainText -Force))
Then add the line replacing DomainName.local to your domain name:
Add-Computer -DomainName "DomainName.local" -Credential $credential
Save and exit.
Step 5:
Crate a new file in our file structure C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat
Edit the file and add the following lines:
powershell Set-ExecutionPolicy unrestricted
powershell c:\windows\system32\sysprep\addtdom.ps1
shutdown -r -t 30
del "c:\setup.bat"
del "c:\Windows\System32\sysprep\unattend.xml"
del "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat"
Save and exit the file.
Step 6:
Create a new file in our file structure c_drive\setup.bat
and add the line:
c:\windows\system32\sysprep\sysprep.exe /oobe /shutdown /unattend:c:\windows\system32\sysprep\unattend.xml
Save and exit.
Step 7:
You now have all the necessary files in place and are ready for gathering the image.
Copy the contents of you created file structure onto the root of c:\ then run c:\setup.bat
Your machine will now sysprep then shutdown, Now is the time to gather the image.
When your workstation next boots all it will prompt you for is a machine name then it will add itself to the domain reset a few times then be ready to use.
End
Just to remind you I mainly only write this for my own memory but welcome any use and comments.
Preparing Windows 7 to be imaged out the our vanilla domain. For imaging we are currently using Free Open Ghost which is proving to be a very nice imaging suit, but the AD integration has never worked for us so we have always relied on sysprep which under XP was very simple, and would present us with a nice easy setup screen to change workstation name and then add the machine to the domain. With Win 7 sysprep can do the same process but only seems to be able to add the workstation to the domain with a nearly random machine name which is not very helpful so we have come up with a more creative way which seems to work.
Step 1:
Install Windows 7, install drivers, updates and all packages that are required in the image.
Packages we put in as default: Flash, Shockwave, reader, java, realplayer, office, quicktime, photoshop(site licence), openoffice, and VLC.
Disable the UAC in the user control panel.
Step 2:
Create our setup folder structure.
On a networkshare or memory stick create a folder called "c_drive".
Under "c_dirve" create folders "ProgramData" and "Windows".
Under "c_drive\ProgramData" create "Microsoft".
Under "c_drive\ProgramData\Microsoft" create "Windows".
Under "c_drive\ProgramData\Microsoft\Windows" create "Start Menu".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu" create "Programs".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs" create "Startup".
Under "C_drive\Windows" create "System32".
Under "C_drive\Windows\System32" create "Sysprep".
Now we have our folder structure we start to populate it with the files required.
Step 3:
Prepare a unattend.xml.
This file is used by sysprep to minimize the amount of information that needs to be setup after imaging, such as region, timezone, agrement.
To create this file we have used a free microsoft product called "Microsoft Windows AIK" installed on our Win 7 machine.
Insert a windows 7 DVD then run "Windows System Image Manager".
In the "Windows Image" right click and select new image, browse to DVD:\sources and select "install_Windows7 PROFESSIONAL.clg".
In the "Answer File" section right click and create a new answer file.
In the "Windows Image" section under the components find x86_Microsoft-Windows-Inernational-Core(version)_neutral and right click add to oobeSystem.
Under the components find x86_Microsoft-Windows-Shell-Setup_(version)_neutral and right click add to oobeSystem.
Back into the "Answer File" location expand components - oobeSystem, and select x86_Microsoft-Windows-International-Core.
Set everything under the settings on the right to "en-UK".
Select x86_Microsoft-Windows-Shell-Setup in the Answer file. expand to AutoLogon and set Enabled to true, LogonCount to 1, and username to administrator.
expand password and set value to the local administrators password.
Below AutoLogon select OOBE and set HideEULAPage to true, HideWirelessSetup to true, NetworkLocation to Work, and ProtectYourPC to 1.
Below OOBE select UserAccounts and Set the AdministratorsPassword to the same as above.
We now need to create a local user to stop the menu showing during setup, this user will not be required for any other purpose so the password can be set to a long complicated password which we will never need to use.
Right click on LocalAccounts and insert new local account, give the new account a description, display name, group = administrators, any name you like that does not already exists on the machine. Expand the local account and select password and set it to a long random string of chars/numbers/upper and lower-case characters.
Click File - Save Answer File as.... and save it in the previously created folder structure as: C_drive\Windows\System32\Sysprep\unattend.xml
Step 4:
Crate a new file in our file structure C_drive\Windows\System32\Sysprep\addtdom.ps1
Edit the file and add the following on one line changing the domain name to your domain name, and add2dom to the account you use to add machines to the domain, and password to the password of that account.
$credential = New-Object System.Management.Automation.PsCredential("DomainName\add2dom", (ConvertTo-SecureString "password" -AsPlainText -Force))
Then add the line replacing DomainName.local to your domain name:
Add-Computer -DomainName "DomainName.local" -Credential $credential
Save and exit.
Step 5:
Crate a new file in our file structure C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat
Edit the file and add the following lines:
powershell Set-ExecutionPolicy unrestricted
powershell c:\windows\system32\sysprep\addtdom.ps1
shutdown -r -t 30
del "c:\setup.bat"
del "c:\Windows\System32\sysprep\unattend.xml"
del "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat"
Save and exit the file.
Step 6:
Create a new file in our file structure c_drive\setup.bat
and add the line:
c:\windows\system32\sysprep\sysprep.exe /oobe /shutdown /unattend:c:\windows\system32\sysprep\unattend.xml
Save and exit.
Step 7:
You now have all the necessary files in place and are ready for gathering the image.
Copy the contents of you created file structure onto the root of c:\ then run c:\setup.bat
Your machine will now sysprep then shutdown, Now is the time to gather the image.
When your workstation next boots all it will prompt you for is a machine name then it will add itself to the domain reset a few times then be ready to use.
End
Just to remind you I mainly only write this for my own memory but welcome any use and comments.

36 Comments:
The information here is great. I will invite my friends here.
Thanks
This is very interesting, You are an overly skilled blogger.
I have joined your feed and look ahead to in search of more of your great post.
Additionally, I have shared your site in my social networks
Have a look at my homepage; oph crack
Hello, i think that i noticed you visited my weblog so i got
here to go back the favor?.I am attempting to to find things to enhance my site!
I assume its good enough to make use of some of your concepts!
!
Here is my website Crack Passwords like a Boss With GPU-Based Cluster
My brother suggested I might like this website.
He was totally right. This post truly made my day.
You cann't imagine just how much time I had spent for this information! Thanks!
my site ... Miscrits Volcano
An interesting discussion is worth comment. I think that you ought to write more on
this subject, it may not be a taboo subject but typically folks
don't speak about these topics. To the next! Many thanks!!
Here is my webpage Diets That Work For Women
What's up, I check your blog like every week. Your writing style is awesome, keep it up!
Here is my web blog; ptc money
When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get several e-mails with the same comment.
Is there any way you can remove me from that service? Thanks!
Review my webpage: Ptc money
Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your site?
My blog site is in the very same area of interest as yours
and my visitors would truly benefit from some
of the information you provide here. Please let me
know if this alright with you. Thanks a lot!
my website psn code
It's the best time to make a few plans for the longer term and it's time
to be happy. I have learn this submit and if I may just I
wish to recommend you some attention-grabbing issues or tips.
Maybe you can write next articles regarding
this article. I wish to read even more issues approximately it!
Also visit my web-site aimbots
Have you ever thought about including a little bit more than just your articles?
I mean, what you say is fundamental and all. However think
about if you added some great pictures or videos to give your posts more, "pop"!
Your content is excellent but with pics and videos, this site could certainly be one of the
greatest in its field. Awesome blog!
Feel free to surf to my web page - dragonvale hack
I am now not certain the place you're getting your info, however good topic. I needs to spend some time learning more or working out more. Thanks for magnificent info I was in search of this information for my mission.
my weblog - sms bomber
Its good as your other blog posts : D, thanks for
putting up. "If Christ were here now there is one thing he would not be--a christian." by
Mark Twain.
Also visit my website ... sharecash bypass
It is actually a nice and useful piece of info.
I'm satisfied that you just shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.
My web site sharecash auto
This is very interesting, You're an excessively professional blogger. I have joined your rss feed and look ahead to in the hunt for extra of your magnificent post. Also, I've shared your
site in my social networks
my blog: aimbot.net
An outstanding share! I've just forwarded this onto a coworker who has been doing a little research on this. And he actually ordered me breakfast due to the fact that I stumbled upon it for him... lol. So allow me to reword this.... Thank YOU for the meal!! But yeah, thanks for spending the time to discuss this subject here on your website.
Feel free to surf to my web blog - cs 1.6 aimbot
Howdy! I just would like to offer you a huge thumbs up for your great information you have got right here
on this post. I'll be coming back to your site for more soon.
Feel free to surf to my web site: youtube auto
Hi to all, how is the whole thing, I think every
one is getting more from this web page, and your views are fastidious for new viewers.
Here is my website :: online ways to make money for free
You have brought up a very superb points , thankyou for the post.
My web site ... how to get free minecraft
Thank you for helping out, wonderful info. "Nobody can be exactly like me. Sometimes even I have trouble doing it." by
Tallulah Bankhead.
Here is my page minecraft hack
Excellent web site. Plenty of useful info here. I am sending it to
several buddies ans additionally sharing in delicious. And obviously, thanks for your effort!
Here is my blog ... best ptc sites
Do you have a spam issue on this blog; I also am
a blogger, and I was curious about your situation; we have developed some nice methods and we are looking to exchange methods with other folks,
please shoot me an email if interested.
Here is my page ... 1.6 hack
Howdy I am so delighted I found your website, I really found you by mistake,
while I was looking on Digg for something else, Regardless I am here now and would just like to say thank you
for a remarkable post and a all round thrilling blog (I also love the theme/design), I don’t have time to browse it all
at the minute but I have saved it and also added your RSS feeds, so when I have
time I will be back to read a great deal more, Please do keep up the
superb work.
Review my webpage; post wife videos
I'm truly enjoying the design and layout of your site. It's a
very easy on the eyes which makes it much more pleasant for me to come here and visit more often.
Did you hire out a designer to create your theme?
Excellent work!
Visit my homepage; free email sender
Its not my first time to pay a visit this website, i am browsing
this web page dailly and take good information from here everyday.
Here is my web site ... forgot password
Hi it's me, I am also visiting this website daily, this web site is actually pleasant and the viewers are actually sharing good thoughts.
Feel free to surf to my web site ... Free TV Series Online
I pay a visit day-to-day a few web sites and information sites to read content, except this weblog
gives feature based content.
Also visit my web-site; complete offers for cash
Paragraph writing is also a excitement, if you know afterward
you can write otherwise it is complex to write.
Also visit my blog post; Minecraft Hacks
I have been exploring for a bit for any high quality articles or blog posts in this sort of house .
Exploring in Yahoo I at last stumbled upon this website.
Reading this info So i'm happy to show that I've an
incredibly excellent uncanny feeling I found out just what I needed.
I so much without a doubt will make certain to don?
t forget this site and give it a glance on a constant
basis.
My webpage: bypass Sharecash surveys
Peculiar article, exactly what I was looking for.
My homepage: password crack
I know this web site offers quality dependent posts and
extra information, is there any other web site which presents these
stuff in quality?
Stop by my blog post: full tv Series download
Awesome issues here. I am very satisfied to
look your post. Thank you a lot and I'm having a look forward to contact you. Will you please drop me a e-mail?
Look into my web blog; twitter hack
Hey there this is kind of of off topic but I was wondering if
blogs use WYSIWYG editors or if you have to manually
code with HTML. I'm starting a blog soon but have no coding know-how so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
My web blog - castle ville bot
Why users still use to read news papers when in this technological globe all is presented on net?
Feel free to surf to my homepage - my sex games
constantly i used to read smaller articles or reviews which as well clear their motive, and that is also happening with this post which I am reading at this
time.
Feel free to surf to my site virtapay currency
Very good article! We are linking to this particularly great article on our website.
Keep up the good writing.
Also visit my site: minecraft beta
It is perfect time to make some plans for the future and it is time to be happy.
I've read this post and if I could I want to suggest you few interesting things or suggestions. Maybe you could write next articles referring to this article. I desire to read more things about it!
My site dragonvale hack without jailbreak download
Post a Comment
<< Home