次の方法で共有


ConfigMgr OSD Model Check Task Sequence Step

Ok this step is super easy and in my opinion a must have when it comes to Operating System Deployment.  I cant count how many times a separate organization or technician for that matter grabs a system out from under their desk or purchases something off the internet without running it past their image engineering teams…  I know shocking this happens with all the standards we all have in place right… 

Usually when this happens its a model we DONT support we haven't tested and obviously do not have the drivers loaded for, Bios Configurations or any other model specific applications setup and tested for this model.  Low and behold we generally get a frantic call that imaging is DOWN!  Well that hardly ever is the case its usually an unsupported non tested model being imaged without our knowledge.

This step just makes so much sense and is so easy you should implement it immediately and save face before someone sends you chasing ghosts on a Friday right before the day is about to end… Smile  Blocking your Task Sequence from running on unsupported models might seem harsh to some but personally i value my time away from work and want to make the most of it and if we can block someone from doing something they shouldn't be doing in the first place and increase our personal time than that is a WIN in my book!

So the nitty gritty simply add a Run Command Line step as one of the first steps in your task sequence and copy this Powershell one liner into the command line field:

Powershell.exe -Command If(@('Surface Book','Surface Pro 4','Venue 11 Pro 7139','HP Probook 650 G2','Virtual Machine','VMware Virtual Platform') -contains (Get-WmiObject -Class Win32_ComputerSystem).Model){Write-Host "Supported Model Detected:"(Get-WmiObject -Class Win32_ComputerSystem).Model; Exit 0}Else{Write-Host "Error:Unsupported Model Detected:"(Get-WmiObject -Class Win32_ComputerSystem).Model; Exit 1633}

Make sure to add or remove any of the supported models in your enterprise to insure you have full coverage and enjoy your weekend!

Computer Models SQL Query:

select distinct model0 as ‘Computer Model’, COUNT(0) AS ‘Number of Machines’ from Computer_system_data group by model0 order by count(0) desc

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in theTerms of Use.