Skip to content

Instantly share code, notes, and snippets.

@postworthy
Created December 18, 2019 21:01
Show Gist options
  • Save postworthy/b59b6f95e8659fe4e13943fc2332dfc4 to your computer and use it in GitHub Desktop.
Save postworthy/b59b6f95e8659fe4e13943fc2332dfc4 to your computer and use it in GitHub Desktop.
#You will need to have SCCM Admin Installed before running this script
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)/../ConfigurationManager.psd1"
cd $(reg query 'HKLM\SOFTWARE\Microsoft\SMS\Mobile Client' /v AssignedSiteCode | where { $_.Contains("AssignedSiteCode") } | % { $_.Split(( " " ), [System.StringSplitOptions]::RemoveEmptyEntries)[2] + ":" })
Get-CMUser | select SMSID
Get-CMApplication | select LocalizedDisplayName
Get-CMPackage -Fast | select Name, PkgSourcePath
Get-CMProgram | select ProgramName, CommandLine
Get-CMQuery | select Name, Expression
Get-CMTaskSequence | select Name, Sequence
Get-CMTrustedRootCertificate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment