Quantcast
Viewing all articles
Browse latest Browse all 4762

Custom User Global Condition - Current AD User Property

Hello,

I have an application which has two deployment types, which I have named based on the office location. The software specifically is to be assigned to a user collection as opposed to the device collection, because of our hotdesking environment it is software not to be used by everyone.

I've noticed that one of the options in the global condition, when specified as custom, to select the option of Script and specify if it is PowerShell etc, with the script returning a value for SCCM to pick up. In some documentation regarding SCCM I noticed that scripts were mentioned as "Discovery Scripts". Does this mean the method I am looking to implement won't work, or in design is not meant to work the way I have thought it through. The script i've added in below, which I have tested out quickly and it didn't seem to install either of the two deployment types.

$CurrentUser = $env:USERNAME
$Office =  Get-ADUser -Identity $CurrentUser -Properties * | Select-Object -ExpandProperty physicaldeliveryofficename
if ($Office -match "London")
    {return $true}

Any feedback would be great.

Regards,


Ollie


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>