sccm
Set the computer name using the BIOS Asset Tag
If you are setting the Asset Tag the same name that the computer is, it makes sense to only have to input it once. I created a powershell script that will do the following:
If VM or Mac: Exit 0
If computer exists in SCCM: Exit 0
If AssetTag Exists/Not empty: Set OSDComputerName to AssetTag, Exit 0
If AssetTag doesn't exist: Bring up an error message, Exit 1
Tested with HP and Dell machines.
Update: Added optional script that uses the HP Ownership Tag
How to use:
Create a package for the script
Copy serviceUI.exe (From MDT Toolkit) to the same folder.
In the Task Sequence after initial format of the drive create a Run Command Line step using the package that you created
with the command: ServiceUI.exe -process:TSProgressUI.exe %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File AssetTag.ps1
Thanks Nickolaj and Dave Green for the initial form
MDT Toolkit files fail to download - could not resolve source
If this happens during OSD, it is likely due to 2 settings in the BIOS.
I recommend
WIN7 -
Boot mode: Legacy
Sata mode: AHCI
Win10-
Boot mode: UEFI
Sata mode: AHCI
From the log:
The task sequence execution engine failed executing the action (Use Toolkit Package) in the group (Initialization) with the error code 2147942561
Action output: ... ursiveCreatePath(sPath.substr(0, nPos), psa), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\core\ccmcore\path.cpp,104)
RecursiveCreatePath(sPath.substr(0, nPos), psa), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\core\ccmcore\path.cpp,104)
RecursiveCreatePath( sNormalizedPath, psa ), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\core\ccmcore\path.cpp,159)
DownloadContentLocally (pszSource, sSourceDirectory, dwFlags, hUserToken, mapNetworkAccess), HRESULT=800700a1 (e:\nts_sccm_release\sms\framework\tscore\resolvesource.cpp,3582)
TS::Utility::ResolveSource (pszPkgID, sPath, 0, hUserToken, mapNetworkAccess), HRESULT=800700a1 (e:\nts_sccm_release\sms\client\osdeployment\installsoftware\runcommandline.cpp,399)
cmd.Execute(pszPkgID,sProgramName, dwCmdLineExitCode), HRESULT=800700a1 (e:\nts_sccm_release\sms\client\osdeployment\installsoftware\main.cpp,372)
Failed to resolve the source for SMS PKGID=PS10098B, hr=0x800700a1
Install Software failed to run command line, hr=0x800700a1. The operating system reported error 2147942561: The specified path is invalid.
Build and Capture fails if KB3160005 IE sec cumulative update is installed
Update: Adding more scratch space to the boot wim seems to have resolved the problem on Windows 10, Windows 7 seems to still have issues.
Update: This update is also in Windows 10 CU 3163018, causing the same error. No workaround yet
If your build and capture is failing at the capture step make sure you don't have the cumulative Security Update for IE11 KB3160005. It's somehow stopping the registry load part of the step.
1 2 3 4 5 6 7 8 9 10 11 12 |
The task sequence execution engine failed executing the action (Capture the Reference Machine) in the group (Capture the Reference Machine) with the error code 2147943850 Action output: ... software" into HKLM\OfflineRegistry1 RegLoadKey( oRegKeyHKLM, sRegKey, sRegHivPath), HRESULT=800705aa (e:\qfe\nts\sms\framework\osdcore\offlineregistry.cpp,68) LoadHive( szPathBuffer, m_sRegKeySoftware, m_oRegKeySoftware ), HRESULT=800705aa (e:\qfe\nts\sms\framework\osdcore\offlineregistry.cpp,190) m_oOfflineRegistry.Init(pszSystemRoot), HRESULT=800705aa (e:\qfe\nts\sms\framework\osdcore\offlineos.cpp,737) rDefaultOs.initialize(sTargetSystemRoot), HRESULT=800705aa (e:\nts_sccm_release\sms\client\osdeployment\capturesystemimage\capturesystemimage.cpp,613) VerifySystemForCapture(DefaultOs), HRESULT=800705aa (e:\nts_sccm_release\sms\client\osdeployment\capturesystemimage\capturesystemimage.cpp,859) Finished with error code 0x800705AA Failed to load "C:\WINDOWS\system32\config\software" (0x800705aa). Failed to load the offline SOFTWARE registry (0x800705aa). Failed to validate for capture. nsufficient system resources exist to complete the requested service. (Error: 800705AA; Source: Windows). The operating system reported error 2147943850: Insufficient system resources exist to complete the requested service. |
Hey Cortana! How do I add additional speeches during OSD so you work?
For Cortana to work with your language you need to install the appropriate speech pack however if you are connected to an enterprise WSUS you won't be able to see additional downloads for your language.
To work around this you can get the language cab files from the 'Windows 10 Features on Demand' iso available via volume license and MSDN downloads, then use dism commands to apply the desired language packages. Currently the available ones are
- German - Germany (Microsoft-Windows-LanguageFeatures-Speech-de-de-Package.cab)
- English - Australia (Microsoft-Windows-LanguageFeatures-Speech-en-au-Package.cab)
- English - Canada (Microsoft-Windows-LanguageFeatures-Speech-en-ca-Package.cab)
- English - United Kigndom (Microsoft-Windows-LanguageFeatures-Speech-en-gb-Package.cab)
- English - India (Microsoft-Windows-LanguageFeatures-Speech-en-in-Package.cab)
- English - United States (Microsoft-Windows-LanguageFeatures-Speech-en-us-Package.cab)
- Spanish - Spain (Microsoft-Windows-LanguageFeatures-Speech-es-es-Package.cab)
- French - France (Microsoft-Windows-LanguageFeatures-Speech-fr-fr-Package.cab)
- Italian - Italy (Microsoft-Windows-LanguageFeatures-Speech-it-it-Package.cab)
- Japanese - Japan (Microsoft-Windows-LanguageFeatures-Speech-ja-jp-Package.cab)
- Chinese - China (Microsoft-Windows-LanguageFeatures-Speech-zh-cn-Package.cab)
- Chinese - Hong Kong (Microsoft-Windows-LanguageFeatures-Speech-zh-hk-Package.cab)
- Chinese - Taiwan (Microsoft-Windows-LanguageFeatures-Speech-zh-tw-Package.cab)
Note: Cortana is currently only available in United States, Japan, Australia, and Canada and India (in English) however having the speech packs installed will help your deployment if other markets open up.
You can also install the Text to speech pack along side. For example
Microsoft-Windows-LanguageFeatures-TextToSpeech-en-au-Package.cab adds Aussie Catherine and British James however Cortana doesn't use them.
To deploy during OSD create a package with the desired speech packs and an Install.bat file. The following example of install.bat sets up English-Australia and also adds text to speech voices, you can add additional packages by changing the PackagePath:
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-TextToSpeech-en-au-Package.cab
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-Speech-en-au-Package.cab
And then create a Run Command Line step in the task sequence referencing the package with Disable 64-bit file system redirection
install.bat
To set the default Speech Language you need to modify the default user reg. This can be achieved in 3 commands during the task sequence
Load Default User Registry
reg load HKU\DefaultTemp "C:\Users\Default\NTUSER.DAT"
Set Default SpeechRecognizer
reg add "HKU\DefaultTemp\Software\Microsoft\Speech_OneCore\Settings\SpeechRecognizer" /v RecognizedLanguage /t REG_SZ /d en-AU /F
Unload Default User Registry
reg unload HKU\DefaultTemp
Ensure the Operating System applys to C: drive not D: drive
This problem will increase more and more as everyone starts to use wim's instead of the OS media in SCCM.
There are a few workarounds for this problem however the best method is to force the new OS the reevaluate Drive Letters with 3 easy steps after applying the OS
Create a Run Command Line step for each of the 3 commands
Reg.exe load HKLM\Temp %OSDTargetSystemDrive%\Windows\system32\config\system
Reg.exe delete HKLM\Temp\MountedDevices /va /f
Reg.exe unload HKLM\Temp
This forces the default behaviour of Windows to choose the drive letter.
For more information and other workarounds see http://blogs.technet.com/b/configurationmgr/archive/2014/04/28/how-to-ensure-that-windows-installs-on-c-during-a-system-center-2012-configuration-manager-osd-task-sequence.aspx
Creating Collections to deploy ConfigMgr client updates (the easy way)
Get the Servicing Exstension from Microsoft NOW as it does all the work!!! http://blogs.technet.com/b/configmgrteam/archive/2014/12/09/now-available-microsoft-system-center-2012-configuration-manager-servicing-extension.aspx
Once you have this, in the Admin node, there's a site servicing section -> client targeting. You click 'Create Query' and it makes a nice query for your collections.
Then you go about creating your collection.
click next. Select Add Rule -> Query Rule
Click Import Query Statement and choose the nice query microsoft made for you.
Deploy the cumulative update to the clients.
Format failed (0x80070057) during task sequence.
Update:
If this is happening to you I recommend importing the boot wim again creating a new one and only adding the network drivers (in the surface pro 3 case) and test using that boot wim with a copy of your task sequence. Then add existing sata/network drivers you need for other devices using latest versions.
I recieved an email from someone that has the same issue, he noticed that Microsoft ships with either a Hynix SSD or a Samsung SSD. The Samsung SSD has never had any issues. From my SCCM data we have 20% Hynix drives - possibly due to change of hard drive supply or shortage, I'm not sure. This will explain why you may be going crazy not understanding why encountering imaging issues after having success.
In this scenario the formatting of the disk fails and then the disk just dissapears even in diskpart until next reboot.
Solution is to get the correct SATA driver for the device. This happened on one of the Surface Pro 3's yet all the others imaged fine. Using the driver provided by the driver pack in the boot wim the task sequence was able to successfully format the disk.
Text from the smsts.log:
1 2 3 4 5 6 7 8 9 10 |
Format failed (0x80070057) OSDDiskPart 15/12/2014 4:33:23 PM 864 (0x0360) CVolume::Format( sDrive.c_str(), (*iter)->getFilesystem(), (*iter)->getVolumeName().c_str(), 0, (*iter)->getIsQuickFormat() ? CVolume::foptQuick : 0, FormatProgressCallback, NULL), HRESULT=80070057 (e:nts_sccm_releasesmsclientosdeploymentosddiskpartmain.cpp,1003) OSDDiskPart 15/12/2014 4:33:23 PM 864 (0x0360) Failed to format drive C: (0x80070057) OSDDiskPart 15/12/2014 4:33:23 PM 864 (0x0360) FormatPartitions(oDisk), HRESULT=80070057 (e:nts_sccm_releasesmsclientosdeploymentosddiskpartmain.cpp,1279) OSDDiskPart 15/12/2014 4:33:23 PM 864 (0x0360) Failed to format partition(s) for disk 0 (0x80070057) OSDDiskPart 15/12/2014 4:33:23 PM 864 (0x0360) OSDDiskPart.exe failed: 0x80070057 OSDDiskPart 15/12/2014 4:33:23 PM 864 (0x0360) Process completed with exit code 2147942487 TSManager 15/12/2014 4:33:23 PM 1088 (0x0440) !--------------------------------------------------------------------------------------------! TSManager 15/12/2014 4:33:23 PM 1088 (0x0440) Failed to run the action: Format and Partition Disk (UEFI). This is usually caused by a problem with the program. Please check the Microsoft Knowledge Base to determine if this is a known issue or contact Microsoft Support Services for further assistance. The parameter is incorrect. (Error: 80070057; Source: Windows) TSManager 15/12/2014 4:33:23 PM 1088 (0x0440) |
How To: Create Automatic Deployment Rules for Patch Tuesday Software Updates
Automatic deployment of updates is one of the best features of SCCM. Automation in general is awesome.
The best way to use Automatic deployment rules (ADR) is to have them run on Patch Tuesday which is the second Tuesday of the month when Microsoft releases their updates generally before 11:00 PST/PDT (I am Australian based so I set ADRs to run Wednesday Morning).
In this example I am deploying Windows 8.1 x64 critical, security and 'updates' updates.
1. Under the Software Library Node Software Updates click Automatic Deployment Rules then select 'Create Automatic Deployment Rule' from the Ribbon
2. In the Wizard name your ADR 'ADR: Windows 8.1 x64 Updates'
3. Click Browse and select your target collection
4. Change the Option to 'Create a new Software Update Group'. The other Option should really be called 'Wipe previous updates from Software Update Group' as that's what it does.
5. Click Next.
6. Ensure 'Automatically deploy all software updates found by this rule, and approve any license agreements. Also optionally enable the Wake-on-LAN tickbox.
7. Click Next
8. Choose Date Released or Revised, set it to Last 3 weeks.
9. Choose Product, set it to 'Windows 8.1'
10. Choose Update Classification, set it to “Critical Updates” OR “Security Updates” OR
“Updates”
11. Choose Title, set it to 'x64'. This is to filter out x86 updates.
12. Click Preview, if you are doing this on Patch Tuesday you will see all the applicable updates that will be deployed. Otherwise you can change the date range for the example.
13. Click Next
14. Choose 'Run the rule on a schedule.
15. Click Customize and choose to run the rule every second Tuesday at the appropriate time depending what time zone you are in. Click OK (Not to important for the demo as you can run it manually)
16. Click Next
17. Customize the Deadline to 'As soon as possible'.
18. Click Next
19. Change the User Experience to 'Display in Software Center and show all notifications'
20. Tick 'Software Installation'.
21. Click Next.
22. Click Next.
23. Click Next
24. Choose Create a new deployment package.
25. Name it 'ADR: Windows 8.1 x64 Updates' and select a UNC share for storage of the software updates.
26. Add Distribution Points.
27. Click Next.
28. Click Next
29. Select desired languages, click Next
30. Click Next, then Close.
31. Right click on your newly created ADR and click 'Run Now'. You can monitor progress on the site server checking Program FilesMicrosoft Configuration ManagerLogsruleengine.log
32. Give it some time to download updates and distribute them then on the client machine run a machine policy update and verify updates install using Software Center
33. After having a play check out this post for some best practices to setting up all your Automatic Deployment Rules including Piloting your updates to a pilot group for 7 days.
34. Also check out this post to automate sending a report out on what updates are being deployed.
KB: Temporary partition to stage boot wim on UEFI booted devices fails.
When not using the latest version of bootable media and the system is not partitioned SCCM is meant to create a temporary partition to stage the correct boot wim. What actually happens is it just creates 1 big NTFS partition.
What actually happens is it just creates 1 big NTFS partition.
Then it checks the for a system partition and bombs out.
http://technet.microsoft.com/en-au/library/hh824839.aspx states that the System partition must be formatted FAT32, SCCM is formatting it NTFS so it never gets recognised as a system partition.
For UEFI the EFI & MSR volume should also be created to make system partition readable and bootable.
I created a hotfix request, will update this post if anything comes of it.
Optimize the 'build and capture' time and size (SCCM Build)
Inspired by Johan's post http://www.deploymentresearch.com/Research/tabid/62/EntryId/174/Building-reference-images-like-a-boss.aspx
I am probably one of the few that uses SCCM to capture base images. I use it because I create a thick image and it keeps the history of packages that it has installed meaning that newly imaged machines will know that they have already installed software x when they recieve it's required deployment.
Patch the install.wim
Patching the default Windows 7 install.wim so it doesn't need to install as many updates during OSD.
1. Download WSUS Offline Update from http://download.wsusoffline.net/
2. Extract to C:wsusoffline and run UpdateGenerator.exe
3. Choose Windows 7 x64 Global and click start.
4. Important: Delete KB2506143, KB2533552 and KB2819745 from C:wsusofflineclientw61-x64glb if they exist. They break the wim. If your company hasn't deployed IE11 also delete patches for it.
5. Extract a Win7 SP1 Enterprise ISO to 'C:OS Windows 7 SP1 x64'
6. Create the dir C:mount
7. Mount the wim -
dism /mount-wim /wimfile:"C:OS Windows 7 SP1 x64sourcesinstall.wim" /mountdir:C:mount /index:1
8. Patch the wim -
dism /image:C:mount /Add-Package /PackagePath:C:wsusofflineclientw61-x64glb
9. Commit/Close the wim -
dism /unmount-wim /mountdir:C:mount /commit
10. Copy the 'OS Windows 7 SP1 x64' folder to an unc share and import into SCCM under Operating System Installers.
Use Mikael Nystrom's Cleanup Script
1. Download via http://deploymentbunny.com/2014/06/05/nice-to-know-get-rid-of-all-junk-before-sysprep-and-capture-when-creating-a-reference-image-in-mdt/
2. Place in a UNC Share.
3. Copy ZTIUtility.vbs from MDT 2013 to the UNC Share.
4. Modify Action-CleanupBeforeSysprep.wsf second line to reference the ZTIUtility.vbs in the same folder
<script language="VBScript" src="ZTIUtility.vbs"/>
5. Create a package in SCCM.
6. Before the capture steps create a run command step surrounded by 2 reboots:
cscript.exe Action-CleanupBeforeSysprep.wsf using the package created and disable 64-bit file system redirection
The updated wim will have the patches required for this step.
Access the wim directly from the distribution point
For this to work you need to tick the checkbox on the OS Installer properties to copy to a share, then also the Access content directly in the task sequence Apply OS step.
Monitor KB2894518 for mutiple reboot updates
http://support.microsoft.com/kb/2894518
Create a separate deployment for these updates to a collection that excludes your capture VMs
Tweak your Virtual Machine
- Don't use the Legacy Network adapter (Have had issues at capture stage)
Visit http://www.deploymentresearch.com/Research/tabid/62/EntryId/174/Building-reference-images-like-a-boss.aspx for VM tweaks
- Use 2 vCPUs
- Use a RAM Disk