Add or remove local user in SCCM 2012 OSD Task Sequence

Sometimes it is necessary to add of remove a local user to your Windows image (like notebooks which must be used at external locations). You can create an image for SCCM with local users, but then you have another image with a different configuration. I think it’s cool everything can be managed with just one image, so here is a small tip to add an user from the task sequence.

The command net user can be used to add a local user, or delete it:
Add user
net user username password /add

Delete user
net user username /delete

Look at http://support.microsoft.com/kb/251394 for the right parameters.

I want to delete a user account which was created during a manual image built.
net user username /delete

Next thing is to add the command line to the task sequence:
1. Edit the Task Sequence
2. Choose Add, General, Run Command Line
Note:
The user can’t be added as all steps in the Install Operating System group are executed in WinPE.
The creation of the user to the end of the TS, after setting up the SCCM client and after restoring the user data.
ScreenHunter_264 Dec. 10 11.21
3. Type or paste the command in the Command line: box

 

Deploy custom MS updates/hotfixes in SCCM 2012 via WSUS

Some updates and enterprise hotfixes are not displayed in WSUS and therefore not applicable in WSUS. This blog post shows how to streamline these update/hotfixes in WSUS and SCCM.

The trick is that “out of the box” you can’t deploy this. Some updates do not sync to WSUS and your SCCM software update point (SUP) automatically. There are some simple steps you can take to get it there.
This example adds KB2670838 in the update list.

Lets start,
-On your central site, start the Windows Server Update Services admin console
Note that changing things in the WSUS console can mess up the WSUS integration; Do so carefully.
-Go to updates select Import Updates to launch a webpage to the Microsoft Update Catalog.
ScreenHunter_232 Nov. 27 13.17
-Search on KB2670838 and add all that you are interested in getting for your environment
-Check import directly into Windows Server Update Services is selected then hit the import button.
Another box will come up tracking the download and show success when completed
Note that the updates are feature Packs
ScreenHunter_233 Nov. 27 13.19
-Give the WSUS services a full sync by clicking Synchronize Now
ScreenHunter_234 Nov. 27 13.21

Next we are setting up the SCCM part
-Start the SCCM 2012 R2 Console
Verify that your SCCM site is set to sync “Feature Packs” classification, because that is what this is (as compared to “service packs” or “security updates”).
-Check Feature Packs in Administration, Sites, Software Update PointScreenHunter_237 Nov. 27 13.24

-Once that download is complete you can sync SCCM by clicking Synchronize Software Updates ScreenHunter_235 Nov. 27 13.22
Once the Sync is complete you should see the updates in SCCM to deploy as you would any other update

-In the Console select Software Library, Software Updates, Automatic Deployment Rules
-Choose Create Automatic Deployment Rule from the Ribbon
ScreenHunter_238 Nov. 27 13.25
-Give the ADR a name like ADR: Custom Updates, select a template, a collection.
ScreenHunter_239 Nov. 27 13.26
-Setup the ADR as a regular ADR, only choose in the software updates section, the product like Windows 7 and the article ID 2670838
ScreenHunter_241 Nov. 27 13.27
-After finishing the ADR choose Run Now to get a full Sync.
ScreenHunter_249 Nov. 27 13.39

-After the full Sync you see the updates in the WSUS directory of SCCM
 ScreenHunter_251 Nov. 27 13.39
Next part is integrating the update is the OS image

-Start the Software Library, Operating Systems and right click the media you want to update, choose Schedule Updates
ScreenHunter_252 Nov. 27 13.40
Search 2670838 in the choose update and notice that (if its applicable) the update appears in the image.
ScreenHunter_253 Nov. 27 13.41
Apply the update and notice in the OfflineServiceMgr.log the update is applied and afterwards is installed in the installed update tab on the image
ScreenHunter_255 Nov. 27 13.49
ScreenHunter_256 Nov. 27 13.59

That’s it!