I guess I wasn’t paying attention. It’s now November 2012, and I’m just now realizing that Group Policy Loopback, with Merge selected, no longer works as I’d expect with Windows 7 and Server 2008(R2)
It used to work like this:
Replace mode would ignore all GPOs applied to the user up until it got to the OU with the loopback policy, and then apply ONLY the GPOs with user settings in the OU with the loopback policy. This still works as expected in 2008/win7.
Merge mode would ADD the additional GPOs to what was already applied to the user, overriding any existing settings as needed, effectively merging them. This is what no longer works as expected.
Here is what I’ve found:
Microsoft published this KB, 953786, which says that the PCs now need to have a entry in the ACL of the GPO allowing them to read the settings of said GPO. What I’ve done to make this easier for myself is added the “Domain Computers” Active Directory group to any GPO which contains the user settings that I wish to apply via loopback merge.
In my testing, this added ACL entry has solved the issue, and allowed it to work as I expected, which is the way that 2003/xp behaved.
I Figured I’d toss this information up here because every time I get a new computer I end up spending an hour of my life figuring this out again, it’s not overly complicated, but why spend any more time than I have to right?
- Okay, well first things first, we need to download and obtain the Windows 7 SDK from here.
- Start an installation, and when prompted, choose custom.
- Install only the Debugging Tools for Windows components
- Launch the Windbg.exe tool and enter the following command to set your symbol locations:
- Go to the File Menu, click “Save Workspace”
- Create a new System Environment Variable to remember that location for the future:
_NT_SYMBOL_PATH = symsrv*symsrv.dll*c:\symbols*http://msdl.microsoft.com/download/symbols
- Now you can start to analyze Crash dump files by clicking on File and then Open Crash Dump.
I just had a super headache of a problem, I had Windows 7 laptops that would not, for the life of me, keep sync center enabled. I’d enable it, and then after a reboot it would be disabled again, nothing in the logs, just disabled. I got creative and forced it to be enabled via a GPO, but still! After a reboot it would be disabled.
I read a bunch of KB articles, and the final result was a combination of Oplocks and re-initalizing the offline files cache. Here is what I did, and I’m happy to report that it’s worked on more than one computer having the same issue:
Enable Opportunistic Locking
- Open Regedit
- Navigate to
- Create a new REG_DWORD titled “EnableOplocks” and set it to “1”
- Navigate to
- NOTE: Create a new key “Parameters” if it does not exist under MRXsmb
- Create a new REG_DWORD titled “OplocksDisabled” and set it to “0”
- Reboot the computer
Reinitialize the Offline Files Cache
- Open Regedit
- Navigate to
- Create a new REG_DWORD titled “FormatDatabase” and set it to “1”
You should now be able to enable offline files (If not already being enforced by a GPO) and it will ask you to reboot, afterwards it should remain enabled.
Let’s say you want to roll out some default settings to IE, but you don’t want to prevent users from making additional changes. In the past I’ve seen this done through the Site to Zone Assignment List GPO but you end up with users who can’t modify those settings once they are set at the GPO level. The problem is this: say you’ve got a partial list of websites that should be placed in Trusted sites, but you don’t have the full list and you know users are going to need to add additional sites ad hoc.
Here is the better way to configure these settings:
- Open Group Policy Management Console, and Create a new GPO
- Expand User Configuration, Policies, Windows Settings, and Internet Explorer Maintenance, and finally Security
- Double click on “Security Zones and Content Rating”
- If and when the “Internet Explorer Enhanced Security Configuration” warning appears click on “Continue”
- Change the “Security and Privacy Settings” section to “Import the current security zones and privacy settings” and then click the “Modify Settings” button
- Make all of the appropriate changes for your environment and then press OK. These will now be the default settings for any users whom this GPO effects.
To be clear, I’ve not tested to see if these settings will re-apply if they are removed by the users, but my hunch is that if the users tries to remove any of these settings, they will be reapplied the next time the GPO is processed.
I recently went to turn on Bit Locker on a Windows 7 Enterprise laptop that was joined to a Small Business Server 2011 Domain. I had turned on the Group Policy setting to force the backup of the TPM/Bitlocker information to Active Directory before allowing the drive to start encryption.
When I tried to run the wizard to enable Bit Locker and received the error:
Also when you open the TPM Settings window you get a different error message:
Error code: 0x80070005
It turns out these are both related to a missing Active Directory security Permission. To resolve it follow these instructions:
- Open Active Directory Users and Computers
- Right Click on your “SBS Computers” OU and select “Delegate Control”
- Click “Next” to start the wizard, click “Add…” and then enter “SELF” in Select Users box, and then click “Check Names…”
- Click “OK”, and then click “Next”
- Select “Create a custom task to Delegate”, and then click “Next”
- Select “Only the following objects in the folder” and then select “Computer Objects”
- Click “Next”, Locate the setting “Write msTPMOwnerInformation” and select it
- Click “Next” to complete the wizard
Attempt to run the Bit Locker Wizard again, you should be able to Initialize the TPM now, and the wizard should move past that step.
We’re going to need a few things before we can get started. Here is what we’ll need to gather:
- 2 Windows 7 workstations (1 if you really want to punish yourself)
- Windows 7 Open License media (DVD)
- Windows 7 WAIK (Windows Automated Install Kit)
- 1 Server 2008 R2 Server
- Drivers for all workstations you plan on imaging(if different models)
- Installation media for all Applications that you wish to put on the Image
- A Windows Active Directory Domain
- A USB External Hard Drive large enough to hold the Image of the PC
Install WDS on Server 2008 R2
First Start by installing WDS on your Server 2008 R2 server. If this server is not already on a Windows Active Directory Domain, also install AD DS and create a domain.
- Open Server Manager
- Click on Roles for the Left hand pane
- Click “Add Roles”
- Check the box for “Windows Deployment Services”, click Next
- Install Both the “Deployment Server, and Transport Server” Role Services
- Finish the Installation of the Role and reboot if necessary
- Click on START > Administrative Tools > Windows Deployment Services
- Expand Servers, Right click on your server and select “Configure Server”, Click Next to start the wizard
- Choose a location for the RemoteInstall Directory, Click Next
- If this Server (The WDS Server) is running DHCP make sure both “Do not listen on port 67” and “Configure DHCP option 60 to ‘PXEClient’” are both CHECKED. If this server does not run DHSP leave both of these un-checked. Click Next.
- Select the Option for “Respond to all client computers (known and unknown)” we’ll lock this down to “Respond only to known client computers” in a later section. Click Next.
- Uncheck the box for “Add images to the server now”. We’ll take care of this in a little bit. Click Finish.
- If the Add Image Wizard appears, close it.
- Right Click on the Server in the console and select Properties, Click on the “Boot” Tab.
- If you are like me, and you want this to be as idiot proof as possible for your users, Change both Radio buttons to “Always continue the PXE boot” After we’ve loaded the “Install” and “Capture” images later, come back and assign them as the default choices as well, to future reduce user error possibilities.
- Click the “Client” tab, Check the box for “Enable Client logging”, Hopefully we won’t need these, but you’ll thank me if you do.
- Close the Server Properties and then Right Click on “Install Images”. Create a new Image Group.
Create Boot and Capture files
- Take one of your windows 7 workstations and Install the Windows 7 WAIK on it. After installation place the Server 2008 R2 media in the drive.
- Create a new folder for all of the files you’ll be creating/editing
- Copy the boot.wim from the
[DVD Drive]\sources\boot.wim to
- Copy the NIC drivers for your workstation to
C:\WDSStuff\NIC_Drivers. Make sure that the files are uncompressed, unzipped, extracted, etc. Basically make sure the .inf files are in this folder or subfolders. Also make sure these drivers are for Server 2008 R2 (x64 Windows 7 drivers if the vendor does not have 2008 R2 Drivers available). If you are unsure which drivers you need put everything except the kitchen sink in here (as far as different version of NIC drivers go)
- Click on START > All Programs > Microsoft Windows AIK > Deployment Tools Command Prompt
- Navigate to
C:\WDSStuff\Windows_2008_R2\ and type:
imagex /mountrw boot.wim 2 c:\WDSStuff\wim
- Change directory to
C:\WDSStuff\NIC_Drivers and type:
dism /image:c:\WDSStuff\wim /add-driver /driver:. /recurse
imagex /commit /unmount c:\WDSStuff\wim
C:\WDStuff\Windows_2008_R2\boot.wim to the WDS Server
- From the WDS Server: Open Windows Deployment Services, Right Click on Boot Images folder and select Add Boot Image…
- Add this boot.wim file that you just copied, and when Prompted name it “Install”
- Once the image is in the console, expand the “Boot Images” folder and right click on “Install” and then select “Create Capture Image…” Save this image in the same location as the Install image, and name it “Capture”
Create Custom Image on Windows 7 Computer
- Grab your Windows 7 installation media, and install a fresh copy of Windows 7 on one of your Windows 7 workstations. Format the drive in such a way that there is only 1 Partition. When you get the prompts to create users and name the PC: STOP.
- Press CTRL + shift + F3 all at the same time. This will put you into Audit mode. Each time your PC restarts from here on forward it will remain on Audit mode. When it logs you into the desktop CLOSE the sysprep window that appears, don’t click anything on that little bastard.
- Install all of your drivers, Applications, Windows updates, etc, Join the domain, apply group policies, go hog wild, just do whatever you would normally do when creating an imaged PC.
- When you are all done make the core system the way you want it, we’ll create the default profile.
Setup Default Profile (the non stupid way)
Creating the Default Profile. What can I say? I can say this: Microsoft, are you paying attention? Okay here is what I can say about Default User Profiles on Windows 7: Microsoft, Go Fuck Yourselves. You dumb bastards. 10 years of being able to create default profiles by very easily moving customized profile over the “Default User” profile and you now want me to put the default profile where now? ON A DOMAIN CONTROLER? IN THE NETLOGON SHARE? What are you fucking serious? Name it .v2?!? That’s fucking stupid. I can’t wait until 70% of your product line is replaced with web apps and someone else’s browser. And for those of you saying that you can just use the copyprofile=true flag in the unattend.xml file? Technically you are right, except for it then discards pretty much every user customization you just spent 2 hours changing and then double checking. But alas, I digress…
- On your Domain Controller create a new Domain Admin called “DefaultUser”
- Log into your workstation as the user you just created: DefaultUser
- Customize your profile, IE, etc to the exact way you want it
- When you are all satisfied log out as that user and log back in as the Local Admin(note: while logged in as DefaultUser, re-enable the local admin and set it’s password)
- Now browser to
c:\users\ and Right Click on DefaultUser (Not Default User). Take Ownership of this folder. Now grant “everyone” full control to this folder. Make sure NTFS permissions propagate to all sub folders.
- Open the Registry and navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList Edit the Reg String for “Default” Change the value from
This is the best work around I’ve found to date to get the Non-Stupid methods of the old Copy To functionality to work. Let me know if you’ve found a better solution.
Create unattend files
This is a very long complicated process that’s prone to errors, if you run into problems, it’s probably here that you are having problems.
- Log into the Windows 7 Workstation that has WAIK installed
- Copy the Windows 7 Install.wim and Install.cfg file from the
[DVD Drive]\sources\ folder to
C:\WDSSTuff\Windows_7 folder NOTE: Make sure it’s the same as the machine ready to be syspreped (x86 versus x64)
- Click START > All Programs > Microsoft Windows AIK > Windows System Image Manager
- In the bottom left hang box titled “Windows Image” right click and point this to the Install.wim or .cfg file that we’ve copied to
- In the top box titled “Answer File” right click and select “New Answer File…”
- We’re going to need to Add sections from the catalog file in the bottom left Box Titled “Windows Image” to the answer file, if you are making an Answer file from a different version Windows or for a different hardware type (x86) these names are going to be different than the ones that I mention here, BUT they will be close, find the one that most closely resembles what I’m telling you to select.
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-International-Core-WinPE_neutral” to the “1 windows PE” section of the answer file.
- Click on “amd64_Microsoft-Windows-International-Core-WinPE_neutral” to the “1 windows PE” and then change the value of “UILanguage” in the far right pane to “en-us”
- Expand “amd64_Microsoft-Windows-International-Core-WinPE_neutral” to the “1 windows PE”, Click on “SetupUILanguage” and then change the value of “UILanguage” in the far right pane to “en-us”
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-setup_neutral” to the “1 windows PE” section of the answer file.
- Expand “amd64_Microsoft-Windows-setup_neutral”, Click on “DiskConfiguration” and then change the value of “WillShowUI” to “OnError”
- Right Click on “DiskConfiguration” and select “Insert New Disk”
- Expand “DiskConfiguration” and Select the newly created disk, Change the setting on the far right side “DiskID” to “0”, Change the setting on the far right side “WillWipeDisk” to “true”
- Expand the newly created disk, Right Click on “CreatePartions” and select “Insert new CreatePartition”
- Expand the newly created “CreatePartition”, Change the setting “Extend” to “true”, change the setting “Order” to “1”, change the setting “Type” to “Primary
- Right click on “ModifyPartitions” and select “Insert new ModifyPartition”
- Expand “ModifyPartitions” and select the newly created “ModifyPartition”, change the setting “Format” to “NTFS”, change the setting “Label” to “Windows”, change the setting “Order” to “1”, change the setting “PartitionID” to “1”
- Go back up to the level “amd64_Microsoft-Windows-Setup_neutral” and then expand “WindowsDeploymentServices”
- Expand ”ImageSelection”, Click on “InstallImage”, Change the setting “ImageGroup” to the name of the Image group created on the WDS Server.
- Click on “InstallTo” and change the setting “DiskID” to “0”, Change the setting “PartitionID” to “1”
- Expand “Login” and then click “Credentials”, change the setting “Domain” to the NETBIOS name of your Active Directory Domain, change the setting “Password” to the password of a Domain Admin, change the setting “Username” to that of a Domain Admin. You may be asking, is this safe? The password is encrypted before it’s put into the file, so that’s good, but I’m sure it’s not the safest thing to leave you Domain Admin credentials in this xml file that any user on the network can browse to, so see the addendum of how to get a Domain User account working instead of a Domain Admin.
- Save this answer file as “WDSUnattend.xml in your
Create a new blank answer file.
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-Security-SPP_neutral” to the “3 Generalize” section of the answer file.
- Click “amd64_Microsoft-Windows-Security-SPP_neutral”, change the setting “SkipRearm” to “1”
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-Deployment_neutral” to the “4 specialize” section of the answer file.
- Expand “amd64_Microsoft-Windows-Security-SPP_neutral”, right click on “RunSynchronous” and select “Insert New RunSynchronousCommand”. Perform this task twice.
- Select the first newly created RunSynchronousCommand, change the setting “Order” to “1”, change the setting “Path” to
net user administrator /active:yes. This command enables the local Administrator account on the workstation.
- Select the second newly created RunSynchronousCommand, change the setting “Order” to “2”, change the setting “Path” to “reg add
"HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000000 /f. This command sets the first newly detected network to “work” automatically.
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-Security-SPP-UX_neutral” to the “4 specialize” section of the answer file.
- Select “amd64_Microsoft-Windows-Security-SPP-UX_neutral”, change the setting “SkipAutoActivation” to “true”
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-Shell-Setup_neutral” to the “4 specialize” section of the answer file.
- Select “amd64_Microsoft-Windows-Shell-Setup_neutral”,change the setting “BluetoothTaskbarIconEnabled” to “false”, change the setting “ComputerName” to
%MACHINENAME%, change the setting “CopyProfile” to “false”, change the setting “ShowWindowsLive” to “false”, change the setting “TimeZone” to “Eastern Standard Time”, or whichever time zone you are in.
- Expand “amd64_Microsoft-Windows-Shell-Setup_neutral”, Select “Display”, change the setting “ColorDepth” to “32”, Change the setting “HorizontalResolution” to “1024”, change the setting “VerticalResolution” to “768”. Note: change these values to that of your PC being ready to be sysprepped.
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-UnattendedJoin_neutral” to the “4 specialize” section of the answer file.
- Expand “amd64_Microsoft-Windows-UnattendedJoin_neutral”, Select “Identification”, change the setting “DebugJoin” to “true”, change the setting “JoinDomain” to the FQDN of your Active Directory Domain, change the setting “UnsecureJoin” to “true”.
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-International-Core_neutral” to the “7 oobeSystem” section of the answer file.
- Select “amd64_Microsoft-Windows-International-Core_neutral”, change “InputLocate” to “en-us”, change the setting “SystemLocale” to “en-us”, change the setting “UILanguage” to “en-us”, change the setting “UserLocale” to “en-us”. Note: Change these setting to match your locale.
- Expand Components in the Windows Image section and add “amd64_Microsoft-Windows-Shell-Setup_neutral” to the “7 oobeSystem” section of the answer file.
- Select “amd64_Microsoft-Windows-Shell-Setup_neutral”, change the setting “BluetoothTaskbarIconEnabled” to “false”, change the setting “Registered Organization” to the name of your organization, change the setting “RegisteredOwner” to the name of your organization, change the setting “ShowWindowsLive” to “false”, change the setting “TimeZone” to “Eastern Standard Time” or your local time zone.
- Expand “amd64_Microsoft-Windows-Shell-Setup_neutral”, Select “AutoLogon”, change the setting “Domain” to the NetBIOS name of your Active Directory Domain, change the setting “Enabled” to “true”, change the “LogonCount” to “1”, change the setting “Username” to the name of your Domain Administrator account. Note: you don’t have to do this, this setting configures an automatic logon after the system is imaged, which allows you to run commands automatically after the system is imaged, which we’ll do shortly.
- Expand “AutoLogon”, select “Password”, change the setting “Value” to the Password of the account that will automatically log in. The password will be encrypted when the file is saved.
- Select “Display”, change the setting “ColorDepth” to “32”, Change the setting “HorizontalResolution” to “1024”, change the setting “VerticalResolution” to “768”. Note: change these values to that of your PC being ready to be sysprepped.
- Right Click on “FirstLogonCommands”, select “Insert New SynchronousCommand”. Perform this task 5 times.
- Select the first newly created SynchronousCommand, change the setting “CommandLine” to “c:\drivers\win\display\setup.exe -overwrite –s”, change the setting “order” to “1”, change the setting “RequiresUserInput” to “false”. Note: This is just something I thought to include because it seems like I run into it a lot, after imaging Intel Based graphics card don’t get configured with the correct driver, this just runs the setup silently and fixes that issue.
- Select the second newly created SynchronousCommand, change the setting “CommadLine” to
cscript //b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX where XXXXX-XXXXX-XXXXX-XXXXX-XXXXX is your Windows 7 Open License MAK key, change the setting “Order” to “2”, change the setting “RequiresUserInput” to “false”
- Select the thrid newly created SynchronousCommand, change the setting “CommadLine” to
cscript //b c:\windows\system32\slmgr.vbs /ato, change the setting “Order” to “3”, change the setting “RequiresUserInput” to “false”. These last two command activate windows with you MAK Open License Key.
- Select the fourth newly created SynchronousCommand, change the setting “CommadLine” to
cscript //b "C:\program files\microsoft office\office14\ospp.vbs" /inpkey:XXXXX-XXXXX-XXXXX-XXXXX, change the setting “Order” to “4”, change the setting “RequiresUserInput” to “false”. where XXXXX-XXXXX-XXXXX-XXXXX-XXXXX is your Office 2010 Open License MAK key.
- Select the fifth newly created SynchronousCommand, change the setting “CommadLine” to
cscript //b "C:\program files\microsoft office\office14\ospp.vbs" /act, change the setting “Order” to “5”, change the setting “RequiresUserInput” to “false”.
- Select “OOBE”, change the setting “HideEULAPage” to “true”, change the setting “NetworkLocation” to “Work”, change the setting “ProtectYourPC” to “3”, change the setting “SkipUserOOBE” to “true”. Note: The network location in this part may be redundant, because of the registry fix above.
- Expand “UserAccounts”, click on “AdministratorPassword”, change the setting “Value” to the desired local administrator password of the workstation.
- Right click on “LocalAccounts”, select “Insert New LocalAccount”
- Select the newly created LocalAccount, change the setting “DisplayName” to that of a second local administrator account, change the value “Group” to “Administrators”, change the setting “Name” to a that of a second local administrator username.
- Expand, LocalAccount, change the setting “Value” to the desired password of this newly created account. Note: Both of these passwords will be encrypted in the file.
- Finally, save this file as Unattend.xml in your
- Copy both of these files over to your WDS Server.
Prepare Image for Capture
Now it’s time to get this image sealed and ready to be uploaded to the WDS Server.
- Copy the Unattend.xml file over to the local computer folder
- Create a new folder under
C:\windows\Setup called “Scripts”
- Create a new file called “SetupComplete.cmd” in
- Edit this file with notepad, Enter the following commands,
del /Q /F c:\windows\system32\sysprep\Unattend.xml &
del /Q /F c:\windows\panther\Unattend.xml
- Save the SetupComplete.cmd file
- Prep Your Antivirus software for Imaging, for Symantec Endpoint Protection12 go here.
- Open Command prompt, Navigate to
c:\windows\system32\sysprep\ enter for the following command:
sysprep /generalize /oobe /shutdown /unattend:Unattend.xml
Upload image to Server
- Once the computer shuts down, connect the USB Hard Drive, and power the computer back up
- Turn on the computer, enter the BIOS, disable booting from the hard drive (just in case you miss the PXE boot), enable PXE boot on the NIC. Exit the BIOS
- Boot from the network card
- When prompted to select an image, select CAPTURE
- Follow the wizard to Select the C:\ drive, name the image, store it on the USB drive, and then upload it to the WDS Server.
- Once the image is done being uploaded to the WDS server shut this PC down.
- DO NOT IMAGE THIS PC, if you do, and the imaging does not work you’ll need to re-create the entire image.
Apply unattend file to WDS image
- Open the Windows Deployment Server MMC console
- Expand Install Images
- Expand the Install group you created earlier
- Find the image you just uploaded, right click it, and select properties
- Check the box titled “Allow Image to install in unattended mode”, select the WDSUnattend.xml file that was moved to the WDS Server
- Click OK.
- Open the Windows Deployment Server MMC console
- Right click on your server and go to “properties”, click the “PXE Response” tab
- Select the r