Skip to content

Instantly share code, notes, and snippets.

@postworthy
Last active December 18, 2019 21:26
Show Gist options
  • Save postworthy/317d1b8b6bf90d1294103b2f3745ad14 to your computer and use it in GitHub Desktop.
Save postworthy/317d1b8b6bf90d1294103b2f3745ad14 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-CMResource -ResourceType System -Fast | select Name, IPAddress, IPSubnets, OperatingSystemNameandVersion, Build, BuildExt
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