How to Create a Windows PowerShell Profile
Updated: December 1, 2010
Applies To: System Center Service Manager 2010 SP1
Rather than typing the Add-PSSnapIn SMCmdletSnapIn command every time you start Windows PowerShell, you can create a Windows PowerShell profile and add this command to the profile. After you create the profile, the System Center Service Manager 2010 snap-in for Windows PowerShell is automatically added each time you start Windows PowerShell. Use the following procedure to determine whether you already have a profile, to create a new profile, and to edit the profile.
To add the Add-PSSnapIn command to a new or existing profile
-
On the computer that hosts the data warehouse management server, click Start, point to Programs, point to Windows PowerShell 1.0, right-click Windows PowerShell, and then click Run as administrator.
-
At the Windows PowerShell prompt, type the following command, and then press ENTER:
Test-path $profile
-
If the results of the previous command are false, go to step 4. If the results are true, go to step 5.
-
Type the following command, and then press ENTER.
New-item –type file –force $profile
-
Type the following command, and then press ENTER.
Notepad $profile
-
In the profile, type Add-PSSnapIn SMCmdletSnapIn. If you are adding this command to an existing profile, add it on a new line at the end of the profile.
-
On the menu bar, click File, and then click Exit.
-
In Notepad, click Save.
-
Type the following commands, and then press ENTER after each command.
Set-ExecutionPolicy RemoteSigned
. $profile
Did you find this information helpful? Please send your suggestions and comments about System Center Service Manager documentation to scsmdocs@microsoft.com.
