Locating and Installing ConfigMgr Cmdlets
By Steve Bowman
Published November 27, 2014
Estimated Reading Time: < 1 minute

EDIT: This function has been updated to operate more efficiently. – JW, 02/25/2015

EDIT 2: We all grow. We all change. We update our scripts to make more sense out of stuff and things. -JW, 10/05/2015

 Function Import-CMModule {
Try {
Import-Module -Name "$(split-path $Env:SMS_ADMIN_UI_PATH)\ConfigurationManager.psd1"
$global:Site = Get-PSDrive -PSProvider CMSite
CD "$($Site):"
Set-Variable -Name Site -Value $Site.Name
}
Catch {
Write-Output $_.Exception.Message
}
}
Import-CMModule 
Article By Steve Bowman
Steve Bowman is a Partner at Model Technology as well as their Vice President of Sales and Marketing. Steve is a father, husband, Franciscan, and lover of technology. He's bilingual in business and technology and have over 30 years of experience in selling enterprise technology solutions in a variety of industries.

Related Posts