Skip to content

Instantly share code, notes, and snippets.

@Kaidja
Created February 10, 2018 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kaidja/eeb56d4bd97dd6d53c8ecffb8c8151b6 to your computer and use it in GitHub Desktop.
Save Kaidja/eeb56d4bd97dd6d53c8ecffb8c8151b6 to your computer and use it in GitHub Desktop.
Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1")
$CMSite = Get-PSProvider -PSProvider CMSITE
Set-Location -Path "$($CMSite.Drives.Name):\"
Invoke-CMQuery -Name 'All Non-Client Systems'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment