一、在用戶所在的文檔目錄中創建一個名爲“WindowsPowerShell” 的目錄
例如:
C:\Users\silence\Documents\WindowsPowerShell
二、在WindowsPowerShell的目錄下創建一個名爲“profile.ps1”的文件,內容爲:
Set-Location C:\Users\silence # 後面是你設置的啓動目錄
三、管理員啓動powershell 在命令行界面下輸入以下命令
set-executionpolicy remotesigned
選擇是
y