5th March 2019
Find path to configurationmanager.psd1
A module to find path to ConfigMgr module on client/server
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function Get-CMModule { [CmdletBinding()] param() Try { Write-Verbose "Trying to import SCCM Module" Import-Module (Join-Path $(Split-Path $ENV:SMS_ADMIN_UI_PATH) ConfigurationManager.psd1) -Verbose:$false Write-Verbose "Nice...imported the SCCM Module" } Catch { Throw "Failure to import SCCM Cmdlets." } } |