Bypass Userlogon Requirement of a Deployment

Sometimes it can be handy to bypass the logon requirement of a Configuration Manager deployment on a single computer. (Specifically for testing etc…)

You can do this with the following powershell function:


Function($CompName,$AdvID){

$strQuery = "Select * from CCM_SoftwareDistribution where ADV_AdvertisementID='" + $AdvID + "'"
Get-WmiObject -ComputerName $CompName -Namespace "root\CCM\Policy\Machine\ActualConfig" -Query $strQuery | ForEach-Object {
$_.PRG_PRF_UserLogonRequirement = "None"
[Void]$_.Put()
}

}

-Matthew DeBoer

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s