Every time you start a Windows PowerShell session to run a Service Manager cmdlet, you must first add the Service Manager Windows PowerShell snap-in. As most of us are lazy admins I created a “service manager” profile having all Service Manager cmdlets by default available when starting PowerShell session.
Create a profile
- Before we decide to create a profile, let’s check to see whether we already have one:
- If the profile exists this command will return True; if it doesn’t exist, the command will return False. If this command returns False, you need to create the profile.
New-Item -path $profile -type file -force