Dark mode

Dark mode

There are 0 results matching

article card image dark article card image light

Published by · May 22, 2024 tools · 2 mins read

Introducing: Windows User Rights Assignment Tool - Part 1

Get Windows Rights Assignment with our PowerShell Tool. ...

See More
article card image dark article card image light

Published by · Apr 11, 2024 tools · 2 mins read

Introducing: Intune Linux Onboarding Tool

Onboard Ubuntu Linux devices to Microsoft Intune using a bash script. Installs prerequisites and starts the user-driven enrollment. ...

See More
article card image dark article card image light

Published by · Apr 11, 2024 tools · 2 mins read

Introducing: Intune macOS Onboarding Tool

Onboard macOS devices to Microsoft Intune using a bash script that initiates the process. Optionally, the script converts mobile accounts, resets the FileVault key, and removes ...

See More
article card image dark article card image light

Published by · Jan 23, 2024 tools · 3 mins read

Introducing: Intune Device Renaming Tool

Rename Intune Devices by setting a Prefix or using a User Attribute as Prefix. Supports Windows, macOS, and Linux ...

See More
article card image dark article card image light

Published by · Dec 8, 2023 intune · 5 mins read

Intune Logs: A Deep Dive into Locations, Interpretation, and Configuration

A Comprehensive Guide to Locations, Interpretation, and Configuration of Intune Logs ...

See More
article card image dark article card image light

Published by · Aug 14, 2023 configmgr · 2 mins read

Configuration Manager Console Extension to show Device Collection Membership with Console Builder

Use the Configuration Manager Console Builder, to add Collection Membership View to the Device Node ...

See More
article card image dark article card image light

Published by · Aug 3, 2023 tools · 3 mins read

Introducing: Configuration Manager SSRS Dashboards

A Configuration Manager Dashboards solution with Reports for Software Updates, Bitlocker and more ...

See More
article card image dark article card image light

Published by · Aug 3, 2023 tools · 2 mins read

Introducing: PowerShell WMI Management Toolkit Module

Streamline your WMI Namespace, Class, and Instance Management with our PowerShell Module ...

See More
article card image dark article card image light

Published by · Jul 14, 2023 configmgr · 1 mins read

Configuration Manager detailed, filterable Port Documentation

Configuration Manager detailed, filterable port documentation as an excel document ...

See More
article card image dark article card image light

Published by · Jul 14, 2023 configmgr · 3 mins read

Configuration Manager PXE TFTP Window Size Bug

Configuration Manager TFTP Block Size and TFTP Window Size Correct Configuration ...

See More
article card image dark article card image light

Published by · Jun 18, 2023 tools · 4 mins read

Introducing: Configuration Manager Client Cache Cleanup Tool

Cleaning the Configuration Manager Client Cache the Right Way with PowerShell and Configuration Baselines ...

See More
article card image dark article card image light

Published by · Jun 18, 2023 tools · 2 mins read

Introducing: Windows Cache Cleanup Tool

Cleaning Windows and Configuration Manager Caches for Configuration Manager Build and Capture Task Sequence or Standalone Use ...

See More
article card image dark article card image light

Published by · Jun 17, 2023 tools · 1 mins read

Introducing: Windows Update Database Reinitialization Tool

Proactively repair corrupted Windows Update Database with Powershell and Configuration Manager ...

See More
article card image dark article card image light

Published by · Mar 31, 2023 tools · 3 mins read

Introducing: Configuration Manager SQL Products Reporting

A Complete SQL Products reporting solution using Configuration Manager ...

See More
article card image dark article card image light

Published by · Jan 28, 2023 configmgr · 1 mins read

Application Detection Method using the Configuration Manager Application Version

Replace hardcoded application version in scripts, with the Configuration Manager Application Version ...

See More
article card image dark article card image light

Published by · Jan 28, 2023 tools · 3 mins read

Introducing: Certificate Management Toolkit

Managing Certificates with Configuration Manager and PowerShell by using just the Public Key ...

See More
article card image dark article card image light

Published by · Jan 7, 2019 reports · 2 mins read

Configuration Manager Device Boundary and Network Information Report

List Device Boundaries and Network Information with Configuration Manager ...

See More
article card image dark article card image light

Published by · Sep 9, 1980 help · 5 mins read

MEM.Zone Blog Publishing Documentation

Publishing Documentation for MEM.Zone ...

See More

We couldn’t find anything related to

“SCCM”

BLOG / configmgr zone

Application Detection Method using the Configuration Manager Application Version

Published by Popovici Ioan · Jan 28, 2023 · 1 mins read
article card image dark article card image light

Quick Summary

Say goodbye to hardcoding your application version in a detection script. Use instead the Configuration Manager Client SDK to use the Console Application Version instead.

Notes

This method is valid for any Configuration Manager Application.

Prerequisites

Script

Parameters

  • Name
    Specifies the name of the application. Supports Wildcards.
  • Version
    Specify the version to check.
Notes

  • Returns Detected if the Name matches.
  • Returns Detected if the Name and Version match.
  • Returns Multiple Applications (x) Found! if multiple applications match. It also throws an error.
  • Returns Not-Detected in all other cases.

Code

  1<#
  2.SYNOPSIS
  3    Get Specified ConfigMgr Managed Application version.
  4.DESCRIPTION
  5    Get Specified ConfigMgr Managed Application version, by querying the
  6    ConfigMgr Client SDK and optionally check the version.
  7.PARAMETER Name
  8    Specifies the name of the application. Supports Wildcards.
  9.PARAMETER Version
 10    Specifie the version to check.
 11.EXAMPLE
 12    Test-CMApplication.ps1 -Name '*Autocad'
 13.EXAMPLE
 14    Test-CMApplication.ps1 -Name '*Autocad' -Version '9.0.0'
 15.INPUTS
 16    None.
 17.OUTPUTS
 18    None.
 19.NOTES
 20    Created by Ioan Popovici
 21    If more than one application is detected the script will throw 'Multiple Applications (x) Found!' error.
 22.LINK
 23    https://MEMZ.one/Test-CMApplication
 24.LINK
 25    https://MEMZ.one/Test-CMApplication-CHANGELOG
 26.LINK
 27    https://MEMZ.one/Test-CMApplication-GIT
 28.LINK
 29    https://MEM.Zone/ISSUES
 30.COMPONENT
 31    Configuration Manager
 32.FUNCTIONALITY
 33    Gets Managed Application
 34#>
 35
 36## Set script requirements
 37#Requires -Version 3.0
 38
 39##*=============================================
 40##* VARIABLE DECLARATION
 41##*=============================================
 42#region VariableDeclaration
 43
 44## Get script parameters
 45[CmdletBinding()]
 46Param (
 47    [Parameter(Mandatory = $true, HelpMessage = "Enter application name", Position = 0)]
 48    [ValidateNotNullorEmpty()]
 49    [SupportsWildcards()]
 50    [string]$Name,
 51    [Parameter(Mandatory = $false, HelpMessage = "Enter application version", Position = 1)]
 52    [ValidateNotNullorEmpty()]
 53    [string]$Version
 54)
 55
 56#endregion
 57##*=============================================
 58##* END VARIABLE DECLARATION
 59##*=============================================
 60
 61##*=============================================
 62##* FUNCTION LISTINGS
 63##*=============================================
 64#region FunctionListings
 65
 66#region Function Test-CMApplication
 67Function Test-CMApplication {
 68<#
 69.SYNOPSIS
 70    Get ConfigMgr Managed Application version.
 71.DESCRIPTION
 72    Get ConfigMgr Managed Application version, by querying the
 73    ConfigMgr Client SDK and optionally check the version.
 74.PARAMETER Name
 75    Specifies the name of the application.
 76.PARAMETER Version
 77    Specifie the version to check.
 78.EXAMPLE
 79    Test-CMApplication -Name '*Autocad'
 80.EXAMPLE
 81    Test-CMApplication -Name '*Autocad' -Version '9.0.0'
 82.INPUTS
 83    None.
 84.OUTPUTS
 85    None.
 86.NOTES
 87    Created by Ioan Popovici
 88.LINK
 89    https://MEMZ.one/Test-CMApplication
 90.LINK
 91    https://MEMZ.one/Test-CMApplication-CHANGELOG
 92.LINK
 93    https://MEMZ.one/Test-CMApplication-GIT
 94.LINK
 95    https://MEM.Zone/ISSUES
 96.COMPONENT
 97    Configuration Manager
 98.FUNCTIONALITY
 99    Gets Managed Application
100#>
101    [CmdletBinding()]
102    Param (
103        [Parameter(Mandatory = $true, HelpMessage = "Enter application name", Position = 0)]
104        [ValidateNotNullorEmpty()]
105        [string]$Name,
106        [Parameter(Mandatory = $false, HelpMessage = "Enter application version", Position = 1)]
107        [ValidateNotNullorEmpty()]
108        [string]$Version
109    )
110
111    Begin {
112        [string]$Output = 'Not-Detected'
113    }
114    Process {
115        Try {
116
117            ## Get the application object
118            $Application = (Get-CimInstance -ClassName 'CCM_Application' -Namespace 'Root\ccm\ClientSDK').Where({ $PSItem.FullName -like $Name })
119
120            ## Check for multple applications found
121            If ( $($Application.FullName).Count -gt 1 ) {
122
123                ## Return custom error
124                $Message       = [string]"Multiple Applications ({0}) Found! {1}" -f $($Application.FullName).Count, $($PsItem.Exception.Message)
125                $Exception     = [Exception]::new($Message)
126                $ExceptionType = [Management.Automation.ErrorCategory]::OperationStopped
127                $ErrorRecord   = [System.Management.Automation.ErrorRecord]::new($Exception, $PsItem.FullyQualifiedErrorId, $ExceptionType, $Application)
128                $Output = $Message
129                $PSCmdlet.ThrowTerminatingError($ErrorRecord)
130            }
131            If ($Application) {
132                $Output = 'Detected'
133
134                ## Compare versions
135                If ([string]::IsNullOrEmpty($Version)) {
136                    If ([version]$Application.SoftwareVersion -eq [version]$Version) { $Output = 'Detected' } Else { $Output = 'Not-Detected' }
137                }
138            }
139        }
140        Catch {
141
142            ## Return custom error
143            $Message       = [string]"Error getting application '{0}'.`n{1}" -f $Application, $($PsItem.Exception.Message)
144            $Exception     = [Exception]::new($Message)
145            $ExceptionType = [Management.Automation.ErrorCategory]::OperationStopped
146            $ErrorRecord   = [System.Management.Automation.ErrorRecord]::new($Exception, $PsItem.FullyQualifiedErrorId, $ExceptionType, $Application)
147            $Output        = $Message
148            $PSCmdlet.ThrowTerminatingError($ErrorRecord)
149        }
150        Finally {
151            Write-Output -InputObject $Output
152        }
153    }
154    End {
155    }
156}
157#endregion
158
159#endregion
160##*=============================================
161##* END FUNCTION LISTINGS
162##*=============================================
163
164##*=============================================
165##* SCRIPT BODY
166##*=============================================
167#region ScriptBody
168
169Test-CMApplication @PSBoundParameters
170
171#endregion
172##*=============================================
173##* END SCRIPT BODY
174##*=============================================

SHARE

article card image dark article card image light

Published by · Jan 28, 2023 tools · 3 mins read

Introducing: Certificate Management Toolkit

Managing Certificates with Configuration Manager and PowerShell by using just the Public Key ...

See More
article card image dark article card image light

Published by · Jan 7, 2019 reports · 2 mins read

Configuration Manager Device Boundary and Network Information Report

List Device Boundaries and Network Information with Configuration Manager ...

See More