Project Professional 'ı Project Web App 'a bağlamak için Project Web AppProject Professional içinde ayarlamanız gerekir. bunu Project Professional 'de gerçekleştirebilirsiniz ancak Windows PowerShell kullanarak da hızlı ve otomatik bir şekilde yapabilirsiniz.
Bu Windows PowerShell betiği, Project Professional 2013, Project Professional 2016 veya Project Online Masaüstü İstemcisiProject Web App bağlamak için gerekli kayıt defteri anahtarlarını oluşturur.
Aşağıdaki betiği CreateAccounts.ps1 adlı bir dosyaya kaydedin.
#
# 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
Betiği çalıştırdığınızda iki parametre geçirin:
-
Hesaba vermek istediğiniz ad Project Professional
-
Project Web App sitenizin URL'si
Betiği çalıştırmak için yönetici olarak bir Windows PowerShell komut penceresi açın ve iki parametreyi geçirerek betiği çalıştırın.
Örneğin:
./CreateAccount.ps1 PWA https://contoso.sharepoint.com/sites/pwa