Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

若要將 Project 專業版 連線至 Project Web App,您必須在 Project 專業版中設定 Project Web App 。 雖然您可以在 Project 專業版中執行此動作,但您也可以使用 Windows PowerShell,以快速、自動化的方式執行這項作業。

此 Windows PowerShell 腳本會建立必要的登錄機碼,以連線 Project 專業版 2013、 Project 專業版 2016或 Project Online 電腦版用戶端Project Web App。

將下列腳本儲存到名為 CreateAccounts.ps1 的檔案。

#
# This script will create the account for Project Pro for O365 to connect to Project Online. 
# 
# Execute this script with two parameters: the account name and PWA URL
#
# ./CreateAccount.ps1 PWA https://contoso.sharepoint.com/sites/pwa
#
############################################################################

Param(
  [string]$accountName,
  [string]$pwaURL
)

function CreateAccount ($keyPath, $accountName, $pwaURL)  {

    $guid = [System.Guid]::NewGuid()

    New-Item -Path "$keyPath$accountName"
    New-ItemProperty -Path "$keyPath$accountName" -Name Name -PropertyType String -Value $accountName
    New-ItemProperty -Path "$keyPath$accountName" -Name GUID -PropertyType String -Value "{$guid}"
    New-ItemProperty -Path "$keyPath$accountName" -Name Path -PropertyType String -Value $pwaURL
}


function CreateProjectOnlineAccount ($accountName, $pwaURL)
{
    $15keyPath = "HKCU:\Software\Microsoft\Office\15.0\MS Project\Profiles\"
    $16keyPath = "HKCU:\Software\Microsoft\Office\16.0\MS Project\Profiles\"

    If (Test-Path($15keyPath)) {
  
        CreateAccount $15keyPath $accountName $pwaURL
    }


    If (Test-Path($16keyPath)) {
        CreateAccount $16keyPath $accountName $pwaURL
    }
}

CreateProjectOnlineAccount $accountName $pwaURL 

當您執行文稿時,請輸入兩個參數:

  • 您想要在 Project 專業版中提供帳戶的名稱

  • Project Web App 網站的 URL

若要執行腳本,請以系統管理員身分開啟 Windows PowerShell 命令窗口,然後執行腳本,並傳遞兩個參數。

例如:

./CreateAccount.ps1 PWA https://contoso.sharepoint.com/sites/pwa

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×