Earlier this month I posted a Powershell function to check for a loaded module.
Bas Steeloper, another Dutch IT Pro, commented on the post and by tweaking the function I’ve provided in the post he came up with a another function to check for a loaded snapin.
You can find his comment here but for your convenience here is the code:
function Check-LoadedSnapIN{
Param( [parameter(Mandatory = $true)][alias("SnapIN")][string]$SnapINName)
if ( (Get-PSSnapin -Name $SnapINName -ErrorAction SilentlyContinue) -eq $null )
{
Add-PsSnapin $SnapINName
}
}

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 
Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #13 - Flo's Datacenter Report
Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #13 - TechCenter - Blog - TechCenter – Dell Community
Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #13 - Dell TechCenter - TechCenter - Dell Community
Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #13 | ServerGround.net