若要將 Project 專業版Project Web App,您必須在 Project Web App 中 Project 專業版。 雖然您可以在 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?

Expand your skills
Explore Training
Get new features first
Join Microsoft Office Insiders

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×