Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#Check if device exists in Configuration Manager
Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1")
$CMSite = Get-PSProvider -PSProvider CMSITE
Set-Location -Path "$($CMSite.Drives.Name):\"
#Query against Configuration Manager
$ADComputerInfo = Get-ADComputer -Identity PC1
Get-CMDevice -Name $ADComputerInfo.Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.