You can do that with the Powershell cmdlets:

$SiteCode = "PS1"
$Server = "SERVER"
$searchQuery = "Select Name from SMS_R_System where Name like 'COMPNAME'"
Import-Module 'C:\Program Files (x86)\Microsoft Configuration
Manager\AdminConsole\bin\ConfigurationManager.psd1'
$CDTo = "$SiteCode" + ":\"
CD $CDTo
Get-WmiObject -Namespace "root\sms\site_$sitecode" -ComputerName $Server
-Query $searchquery | ForEach-Object {
    New-CMDeviceVariable -DeviceName $_.Name -VariableName
"OSDComputerName" -VariableValue $_.Name -IsMask $true
}


On Thu, Apr 10, 2014 at 2:35 AM, Matt Wilkinson <[email protected]>wrote:

> Anyway of populating the text field with the existing computer name when
> the collection variable is set? Without MDT.
>
> _____________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System on
> behalf
> of Leeds College of Building.
> For more information please visit http://www.symanteccloud.com
> _____________________________________________________________________
>
>


Reply via email to