Share via

How to Create a Windows PowerShell Profile

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

  1. 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.

  2. At the Windows PowerShell prompt, type the following command, and then press ENTER:

    Test-path $profile
  3. If the results of the previous command are false, go to step 4. If the results are true, go to step 5.

  4. Type the following command, and then press ENTER.

    New-item –type file –force $profile
  5. Type the following command, and then press ENTER.

    Notepad $profile
  6. 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.

  7. On the menu bar, click File, and then click Exit.

  8. In Notepad, click Save.

  9. 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