Change PXE Password on all remote distribution points

Each calendar year, my organization images almost 200,000 machines, the bulk of that happening during an 2-month stretch. To help facilitate the mass-imaging, we disable the PXE password on all of our remote distribution points for this period of time. Because we manage 200+ remote distribution points, it’s not feasible to go through the SCCM console and remove the PXE password one-by-one and then setting it again afterwards.

In order to remove the password, you have to actually get user-input since you cannot convert a null value natively to a secure string.

To Remove the Password:
#leave user input as empty – just hit enter
$my_secure_password = read-host -AsSecureString
Get-CMDistributionPoint -ALLSITE | WHERE {$_.type -eq “8”} | set-cmdistributionpoint -PxePassword $my_secure_password

To set the password:
$my_secure_password = convertto-securestring “password” -asplaintext -force

Get-CMDistributionPoint -ALLSITE | WHERE {$_.type -eq “8”} | set-cmdistributionpoint -PxePassword $my_secure_password


Post navigation