-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCCM - AppEvalNameFinder.ps1
More file actions
38 lines (27 loc) · 1.58 KB
/
SCCM - AppEvalNameFinder.ps1
File metadata and controls
38 lines (27 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<##############################################################################
Lists Unique IDs for Deployment Types - Needed this since some logs just
refer to these only
##############################################################################>
# =============================================================================
# Import Modules
# =============================================================================
# -----------------------------------------------------------------------------
# SCCM (Requires Console Installed on machine)
# -----------------------------------------------------------------------------
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" -ErrorAction SilentlyContinue
# =============================================================================
# Connect to SCCM
# =============================================================================
# Grab the site server information
$SiteInfo = Get-PSDrive -PSProvider CmSite
# Site Code
$SiteCode = $SiteInfo.Name
# FQDN of Site Server
$SiteServer = $SiteInfo.Root
# =============================================================================
# List Deployment Types + CIUniqueID
# =============================================================================
$APPQuery = Get-CIMInstance -ComputerName $SiteServer -Namespace "Root\SMS\Site_$SiteCode" -Class SMS_DeploymentType
#$APPQuery.CI_UniqueID
$APPQuery | Select LocalizedDisplayName, CI_UniqueID | ogv
$APPQuery | ogv