Powershell ISE실행시 Sharepoint Management Shell 자동으로 로딩하기

Posted by Alvin You
2015. 4. 2. 15:09 Sharepoint

Windows Poswershell을 어느 정도 아시는 관리자라면 Windows Powershell ISE 편집기를 아실겁니다.

깔끔한 구성에 자동완성 기능등 Powershell 작성에 최적의 환경을 가진 프로그램이죠.

Windows Management 외의 다른 서버 관리를 위해서는 아래와 같이 다른 서버 모듈의 Management Shell Snapin을 로딩해야 하는 번거로움이 있습니다.

Sharepoint 관리용 Snap-In :

   Microsoft.Sharepoint.Powershell

Exchange 관리용 Snap-In :

   Microsoft.Exchange.Management.PowerShell.E2010

   Microsoft.Exchange.Management.Powershell.Support

   Microsoft.Exchange.Management.Powershell.Setup

을 Add-Snapin이라는 Powershell cmdlet으로 로딩 시켜주어야 합니다.

Add-PsSnapin "Microsoft.Sharepoint.Powershell"

하지만, 위 작업을 Windows Powershell ISE가 실행될 때 자동으로 로딩되도록 하는 방법이 있어 알려 드리겠습니다.

아래 Script를 실행해 Profile.ps1 파일을 엽니다. Profile.ps1 파일은 Powershell ISE가 실행될 때 자동으로 실행되는 스크립트 내용입니다.

 

Profile.ps1 파일에 아래 내용을 넣어 자동으로 Sharepoint Management Shell이 로딩되도록 합니다.