Archive

For the SCCM category

How to apply Local Group Policy settings silently using the ImportRegPol.exe and Apply_LGPO_Delta.exe utilities.

No Comments

In many Organizations, the AD support team is separated from the team in charge of Imaging.  The AD team naturally is protective with their setup and fight any GPO setting that would result in more responsibility to their staff.  So that leaves us in some occasions having to turn to Local Group Policy to apply the settings we want.  I’ve recently come across some great tools provided by Microsoft (very quietly) for Government usage.  These tools allow you to basically back up your LGPO settings to a txt file and apply them on demand with a script silently.

MS link: http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-05-16-48/LGPO_2D00_Utilities.zip
BackUp link: https://panaconsulting.egnyte.com/h-s/20120118/077e07ba18c74413

How to use:

  1. Apply desired settings on a Windows 7 test machine, using the gpedit.msc MMC snap-in.
  2. Run the “ImportRegPol.exe” with the /parseonly and /log to pull settings and save to a specified LOG file.
    User settings and machine settings need to be captured separately:
    LGPO User Settings
    Capture User Example
    ImportRegPol.exe /u  C:\Windows\System32\GroupPolicy\User\registry.pol /parseonly /log <PathToSettingsFile>.log
    LGPO Machine Settings
    Capture Machine Settings Example:
    ImportRegPol.exe /m  C:\Windows\System32\GroupPolicy\Machine\registry.pol /parseonly /log <PathToSettingsFile>.log
  3. Use the Apply_LGPO_Delta.exe utility to apply the settings silently.  On restart the settings will take effect.
    Apply_LGPO_Delta.exe <PathToSettingsFile>.log /log <PathToLogFile>.log
  4. This can easily be added to an SCCM or MDT Task Sequence and tied to logic to ensure the correct settings get pushed to the appropriate target systems/users.

Command Line help for LGPO Tools:

Apply_LGPO_Delta.exe inputfile0 [inputfile1 ...] [/log LogFile] [/error ErrorLogFile] [/boot]

inputfileN             One or more input files specifying the changes to make.  Input files must be security template files, or registry-based policy files using a custom file format described below.  Apply_LGPO_Delta automatically determines whether a file is a custom policy file or a security template.  Security templates can be created using the “Security Templates” MMC snap-in.

/log LogFile           Writes detailed results to a log file.  If this option is not specified, output is not logged nor displayed.

/error ErrorLogFile   Writes error information to a log file.  If this option is not specified, error information is displayed in a message box dialog.

/boot                  Reboots the computer when done.

 

ImportRegPol.exe –m|-u path\registry.pol [/parseOnly] [/log LogFile] [/error ErrorLogFile] [/boot]

-m path\registry.pol   [for Computer configuration] or

-u path\registry.pol   [for User configuration]

Path\registry.pol specifies the absolute or relative path to the input registry policy file (which does not need to be named “registry.pol”).

/parseOnly             Reads and validates the input file but does not make changes to local group policy.  In conjunction with the /log option, can be used to convert a registry policy file to an input file for Apply_LGPO_Delta.

/log LogFile           Writes detailed results to a log file.  If this option is not specified, output is not logged nor displayed.  The logged results for the registry policy settings can be used as input for Apply_LGPO_Delta.

/error ErrorLogFile   Writes error information to a log file.  If this option is not specified, error information is displayed in a message box dialog.

/boot                  Reboots the computer when done.

 

-Brian G

Share

“SMS Collection Evaluator failed to process Collection Settings changes” error in SCCM 2007

No Comments

Received the “SMS Collection Evaluator failed to process Collection Settings changes” error in SCCM on the “SMS_COLLECTION_EVALUATOR” Component. The fix was simple and simply overlooked during the SCCM installation:

1. Open the ADSI editor.
2. Browse to the “System Management” container. Should be listed under the “System” container.

3. Right-Click on the “System Management” container and click on the “Properties”.
4. Click on the “Security” tab and review if the “$” user exists. If exists, skip to step 6.
5. Click on Add, then “Object Types” and then check the “Computers”. Next type the Computername of the SCCM server and click on “OK”.


6. Click on “Advanced” and then highlight the “” entry and click on “Edit”.
7. Change the “Apply To” Drop Down to “This object and all descendant objects” and then check the “Allow Full control” permission.

8. Restart the SCCM server.

-Brian G

Share

How to use VBScript in your MDT/SCCM CustomSettings.INI.

No Comments

The built-in CustomSettings.INI variables are very useful, but in some occassions they are simply not enough. For instance, the “Model” variable contains the FULL model number (ie. CF-19K4RAX2M). What if I want to create a section breakout for all CF-19 laptops? Here is a method I found to perform this task:
1. First you must tell your “ZTIGather..” script to look out for a new variable, which is ShortModel in my example. Add a line to the “<DeploymentShare>\Scripts\ZTIGather.XML” file, which is read by the ZTIGather.wsf prior to combing your CS.INI matching variables.

<property id=”ShortModel” type=”string” overwrite=”true” description=”Short Model Number” />

2. Next add the following lines to your CS.INI:

;Tells ZTIGather to look in the “RunFirst” section first,
; which will populate the ShortModel variable, which in
; turn be replaced when searching for the “ShortModel”
; section.
Priority=RunFirst, ShortModel, Default

[RunFirst]
;Example output will be CF-19 instead of CF-19K4RAX2M
ShortModel=# LEFT( oEnvironment.Item(“Model”),5 ) #

;Now I can add my CF-19 section
[CF-19]

Another very useful easy CS.INI code block I use to add VBScript and more intelligence to my CS.INI. Is a custom Variable, which contains a specialized formatted Date to my liking. I can use this variable wherever I like and whenever I like throughout my ENTIRE Deployment (TS included).
1. Just as I did before I add the variable to my “ZTIGather.XML” file to tell my ZTIGather.wsf to look out for the variable in my CS.INI.

<property id=”SpecialDate” type=”string” overwrite=”true” description=”Special Date Value” />

2. Then I populate it wherever I like in my CS.INI

SpecialDate=#DatePart("M",Now) & DatePart("D",Now) & DatePart("YYYY",Now)#

-Brian G

Share

Blogs, Forums and Sites Oh My…

No Comments

Here are all of the blogs, forums and pages I visit and subscribe to with Google Reader.  All very reputable sources,  I bolded the most active and strong writers:

Raphael: Your System Center Configuration Manager portal
http://wmug.co.uk/blogs/dotraphael/rss.aspx

AlexSemi’s Blog
http://blogs.msdn.com/b/alex_semi/rss.aspx

Ask the Core Team
http://blogs.technet.com/b/askcore/rss.aspx

Brian Jackson’s IT Blog
http://feeds.feedburner.com/brianleejackson

CCMEXEC.COM – System Center blog
http://ccmexec.com/?feed=rss2

[Deploy_Windows (TRUE)]
http://deploywindows.net/feed

Deployment Research – Johan Arwidmark
http://www.deploymentresearch.com/Blog/tabid/62/rssid/1/Default.aspx

Michael Niehaus’ Windows and Office deployment ramblings
http://blogs.technet.com/b/mniehaus/rss.aspx

Microsoft Deployment Toolkit Forum
http://social.technet.microsoft.com/Forums/en/mdt/threads?outputAs=rss

Mike’s Tech Head Blog
http://itbloggen.se/cs/blogs/micke/rss.aspx

myITforum.com – Microsoft Deployment
http://www.myitforum.com/absolutenm/rss.aspx?z=103

NetBootDisk.com News
http://www.netbootdisk.com/rss.php

System Center Ideas
http://systemcenterideas.com/feed/

The WMI guy aka Kim Oppalfens
http://myitforum.com/cs2/blogs/koppalfens/rss.aspx

The D-spot
http://www.the-d-spot.org/wordpress/feed/

The Deployment Guys
http://blogs.technet.com/deploymentguys/rss.xml

Windows Deployment
http://www.deployblog.se/?feed=rss2

Xtreme Deployment
http://deployment.xtremeconsulting.com/feed/

 

- Brian G

Share

Apply Open Office Settings via Script Or Batch

No Comments

In most cases, my customer base have decided to install Open Office applications outside of their base images.  The silent installations are fairly simple, because the install files are provided in .MSI format.

Applying custom settings after a clean installation need to also be addressed.  I found this was also fairly simple.  All of the settings changed are made to the files stored in the following folder:
Windows 7: “C:\Users\Administrator\AppData\Roaming\OpenOffice.org”
Windows XP: “C:\Documents and Settings\Administrator\Application Data\OpenOffice.org”

So Simply apply the desired setting changes on a test machine and capture the settings folder.  Then change the permissions of the folder to the following:

Grant Everyone “Full Control”
image
image

Next in your Post Image processing overwrite the Directory with your custom settings Directory and you are all set.
xcopy "%~dp0OpenOffice.org\" "C:\Users\Administrator\AppData\Roaming\OpenOffice.org" /heyi

Share
Blue Taste Theme created by Jabox