Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

SCCM

565

Solutions

558

Contributors

Systems Center Configuration Manager (SCCM, formerly known as Systems Management Server) is Microsoft’s system software for managing large groups of not only Microsoft computers, but those running other operating systems, such as Linux, OS-X, and various mobile technologies.

Share tech news, updates, or what's on your mind.

Sign up to Post

Configuring Remote Assistance for use with SCCM
1
New feature and membership benefit!
LVL 10
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Determining the an SCCM package name from the Package ID
2
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
0
 

Expert Comment

by:Derek Bannard
Comment Utility
Well... couldn't figure out how to set the inner "Option" on the policy, but everything else is here.

Remember to run this in an administrative powershell prompt on the DHCP server.
You need to restart the DHCPServer service after running this and set the PXEClient settings in the 3 policies.  The BIOS policy is blank, the UEFI polcies are the default of "PXEClient".

The command to run is "Set-DHCPPXEOptions"

Enjoy!


<# 
.Synopsis
	Receives user input, gets the list of DHCP options, classes and policies, then sets them if they don't exist.
.DESCRIPTION 
	Enter the option number, class name or policy name where approporiate.
.NOTES 
	Author: Derek Bannard
.EXAMPLE
	Import-Module .\DHCPPXEOptions.psm1
	Loads the modules to perform the DHCP functions.
.EXAMPLE
	Get-DHCPOptions
	Lists missing options for use with Set-DHCPPXEOptions function.
.EXAMPLE
	Get-DHCPClasses
	Lists missing classes for use with Set-DHCPPXEOptions function.
.EXAMPLE
	Get-DHCPPolicies
	Lists missing policies for use with Set-DHCPPXEOptions function.
.EXAMPLE
	Set-DHCPPXEOptions
	Creates all missing options, classes and policies for BIOS/UEFI PXE co-existance.
#>

<#
=================================================
Error Preferences
=================================================
#>
$errpref = $ErrorActionPreference
$ErrorActionPreference = "SilentlyContinue"


<#
=================================================
Script Variables, comma separated
=================================================
#>
[string[]]$DHCPOptions = 060,066,067
[string[]]$DHCPClasses = "PXEClient:Arch:00000","PXEClient:Arch:00006","PXEClient:Arch:00007"
[string[]]$DHCPPolicies = "PXEClient (BIOS x86 & x64)","UEFI 32-Bit DHCP Policy","UEFI 64-Bit DHCP Policy"

[string[]]$rtnDHCPOptions = @()
[string[]]$rtnDHCPClasses = @()
[string[]]$rtnDHCPPolicies = @()


<#
=================================================
Script Get Functions
=================================================
#>
Function Get-DHCPOptions{
	$arrayOptions = New-Object System.Collections.ArrayList

	ForEach ($DHCPOption in $DHCPOptions){
		Try{
			If((Get-DhcpServerv4OptionDefinition -OptionId $DHCPOption) -eq $null){
				Write-Verbose "OptionId $DHCPOption is not present."
				$arrayOptions.Add($DHCPOption) | Out-Null
				}
			Else{
				Write-Verbose "OptionId $DHCPOption is already present."
				}
		}
		Catch{
		}
	}
	$global:rtnDHCPOptions = $arrayOptions
}


Function Get-DHCPClasses{
	$arrayClasses = New-Object System.Collections.ArrayList

	ForEach ($DHCPClass in $DHCPClasses){
		Try{
			If((Get-DhcpServerv4Class -Type Vendor | Where {$_.AsciiData -eq $DHCPClass}) -eq $null){
				Write-Verbose "OptionId $DHCPClass is not present."
				$arrayClasses.Add($DHCPClass) | Out-Null
				}
			Else{
				Write-Verbose "OptionId $DHCPClass is already present."
				}
		}
		Catch{
		}
	}
	$global:rtnDHCPClasses = $arrayClasses
}


Function Get-DHCPPolicies{
	$arrayPolicies = New-Object System.Collections.ArrayList

	ForEach ($DHCPPolicy in $DHCPPolicies){
		Try{
			If((Get-DhcpServerv4Policy -Name $DHCPPolicy) -eq $null){
				Write-Verbose "OptionId $DHCPPolicy is not present."
				$arrayPolicies.Add($DHCPPolicy) | Out-Null
				}
			Else{
				Write-Verbose "OptionId $DHCPPolicy is already present."
				}
		}
		Catch{
		}
	}
	$global:rtnDHCPPolicies = $arrayPolicies
}


<#
=================================================
Script Set Function
=================================================
#>
Function Set-DHCPPXEOptions{
	If($rtnDHCPOptions){
		ForEach ($rtnDHCPOption in $rtnDHCPOptions){
			If($rtnDHCPOption -eq "060"){
				Try{
					Write-Output "Adding OptionId 060..."
					Add-DhcpServerv4OptionDefinition -Name "PXEClient" -Description "PXE Support" -DefaultValue "PXEClient" -OptionId 060 -Type String
				}
				Catch{
				}
			}
			ElseIf($rtnDHCPOption -eq "066"){
				Try{
					Write-Output "Adding OptionId 066..."
					Add-DhcpServerv4OptionDefinition -Name "Boot Server Host Name" -Description "TFTP boot server host name" -OptionId 066 -Type String
				}
				Catch{
				}
			}
			ElseIf($rtnDHCPOption -eq "067"){
				Try{
					Write-Output "Adding OptionId 067..."
					Add-DhcpServerv4OptionDefinition -Name "Bootfile Name" -Description "Bootfile Name" -OptionId 067 -Type String
				}
				Catch{
				}
			}
			Else{
				Write-Output "Undefined options cannot be added!"
			}
		}
	}
	Else{
		Write-Output "No Options are required to be added."
	}


	If($rtnDHCPClasses){
		ForEach ($rtnDHCPClass in $rtnDHCPClasses){
			If($rtnDHCPClass -eq "PXEClient:Arch:00000"){
				Try{
					Write-Output "Adding PXEClient (BIOS x86 & x64) Class..."
					Add-DhcpServerv4Class -Name "PXEClient (BIOS x86 & x64)" -Type Vendor -Data "0x505845436c69656e743a417263683a3030303030" -Description "PXEClient:Arch:00000"
				}
				Catch{
				}
			}
			ElseIf($rtnDHCPClass -eq "PXEClient:Arch:00006"){
				Try{
					Write-Output "Adding UEFI 32-Bit DHCP Class..."
					Add-DhcpServerv4Class -Name "PXEClient (UEFI x86)" -Type Vendor -Data "0x505845436c69656e743a417263683a3030303036" -Description "PXEClient:Arch:00006"
				}
				Catch{
				}
			}
			ElseIf($rtnDHCPClass -eq "PXEClient:Arch:00007"){
				Try{
					Write-Output "Adding UEFI 64-Bit DHCP Class..."
					Add-DhcpServerv4Class -Name "PXEClient (UEFI x64)" -Type Vendor -Data "0x505845436c69656e743a417263683a3030303037" -Description "PXEClient:Arch:00007"
				}
				Catch{
				}
			}
			Else{
				Write-Output "Undefined classes cannot be added!"
			}
		}
	}
	Else{
		Write-Output "No Classes are required to be added."
	}


	If($rtnDHCPPolicies){
		ForEach ($rtnDHCPPolicy in $rtnDHCPPolicies){
			If($rtnDHCPPolicy -eq "PXEClient (BIOS x86 & x64)"){
				Try{
					Write-Output "Adding PXEClient (BIOS x86 & x64) Policy..."
					Add-DhcpServerv4Policy -Name "PXEClient (BIOS x86 & x64)" -Description "Delivers the correct bootfile for BIOS machines" -Condition OR -VendorClass EQ,"PXEClient (BIOS x86 & x64)*" -ProcessingOrder 1 -Enabled $True -Confirm:$False
				}
				Catch{
				}
			}
			ElseIf($rtnDHCPPolicy -eq "UEFI 32-Bit DHCP Policy"){
				Try{
					Write-Output "Adding UEFI 32-Bit DHCP Policy..."
					Add-DhcpServerv4Policy -Name "UEFI 32-Bit DHCP Policy" -Description "Delivers the correct bootfile for (UEFI x86) machines" -Condition OR -VendorClass EQ,"PXEClient (UEFI x86)*" -ProcessingOrder 3 -Enabled $True -Confirm:$False
				}
				Catch{
				}
			}
			ElseIf($rtnDHCPPolicy -eq "UEFI 64-Bit DHCP Policy"){
				Try{
					Write-Output "Adding UEFI 64-Bit DHCP Policy..."
					Add-DhcpServerv4Policy -Name "UEFI 64-Bit DHCP Policy" -Description "Delivers the correct bootfile for (UEFI x64) machines" -Condition OR -VendorClass EQ,"PXEClient (UEFI x64)*" -ProcessingOrder 2 -Enabled $True -Confirm:$False
				}
				Catch{
				}
			}
			Else{
				Write-Output "Undefined policies cannot be added!"
			}
		}
	}
	Else{
		Write-Output "No Policies are required to be added."
	}
	
	#Restart-Service "DHCPServer"
}

Get-DHCPOptions
Get-DHCPClasses
Get-DHCPPolicies

Open in new window

0
 

Expert Comment

by:Hyoin Wang
Comment Utility
Many Thanks.

One more question:
I also deploy BIOS x86, but the policy covers (x86 & x64).  I will set up two 'Define Vendor Classes' for x86 and x64? But ASCII, could I set as PXEClient:Arch:00000 for both?
0
SCCM Add to GRP TS
Adding Computers to AD groups through an SCCM Task Sequence
1
Bad Influence
An article on effective troubleshooting
1
Troubleshooting common task sequence error codes
1
BDR
Binary Differential Replication, What it is, how it works and how it differs from standard delta file replication
1
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
1
 
LVL 8

Expert Comment

by:Senior IT System Engineer
Comment Utility
Hi SCCMCanuck,

Which of the Powershell line that I can edit safely to suit my environment ?
0
 
LVL 9

Author Comment

by:SCCMCanuck
Comment Utility
Thanks for your interest. At the moment the following lines are safe to change

[version]$InstallerVersion = '8.0.1210.13'
$AppName = 'Java*'

The value of $AppName variable is a wildcard string that corresponds with the DisplayName registry value, where as $InstalledVersion corresponds to DisplayVersion.

You can modify any part of the script to accommodate any type of detection method and use and/or statements to create a more restrictive set of criteria. The goal of my example is to make the SCCM client agent believe that Java is installed if its version is greater than or equal to the value of $InstallerVersion in the Variable Declaration section

Registry.PNG
1
The following article discusses and demonstrates the advantages of using Pull Distribution Points in SCCM 2012 SP1 or higher as opposed to traditional push based architecture
0
Main Metering Runbook
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
2
 
LVL 66

Expert Comment

by:Jim Horn
Comment Utility
Nicely illustrated and reads very well.   Voted Yes.
0
 
LVL 66

Expert Comment

by:Jim Horn
Comment Utility
You're welcome.  Nice work.

Speaking of .. my recent article just went Featured Article ... Top 10 Ways to Write Rock Star Articles
0
Introduction

I administer SCCM in the education field for a living. Our school division contains 43 sites, spread out over a large rural area, it takes approximately 3 hours to traverse it from its furthest points. Our main site (the main office and primary site for our SCCM infrastructure) has a 100Mbps link. All of our schools connect to our 100Mbps connection via 3Mbps links.

After considering various products, such as Altiris, SCCM, Casper, etc. Our division settled on SCCM as our systems management suite of choice. This was for the most part due to a pre-existing license agreement for which we were already paying for Client ML’s.

The Problem

After consulting various sources on the internet & a certification exam…I went to work in designing the infrastructure. Infrastructure wise – the system worked flawlessly, roles deployed correctly, clients were talking to the management point…and then, we distributed our Win 7 image to our DP's (Distribution Points)…and wham, the network slowed to a grinding halt. Examination of our head-end routing appliance revealed that SCCM had consumed 90% of the bandwidth on our 100Mbps link almost instantaneously… additionally the 3Mbps connections at all sites were also pinned.

Needless to say…management was not impressed.

In consulting with Management and our Network Analyst we attempted to weigh our options… I pointed out the built in Rate Limiting features of SCCM as an option, but not understanding it …
6

SCCM

565

Solutions

558

Contributors

Systems Center Configuration Manager (SCCM, formerly known as Systems Management Server) is Microsoft’s system software for managing large groups of not only Microsoft computers, but those running other operating systems, such as Linux, OS-X, and various mobile technologies.