Pour vous connecter Project Professionnel à Project Web App, vous devez configurer votre Project Web App dans Project Professionnel. Bien que vous puissiez le faire dans Project Professionnel, vous pouvez également le faire de manière rapide et automatisée en utilisant Windows PowerShell.
Ce script Windows PowerShell crée les clés de Registre requises pour connecter Project Professionnel 2013, Project Professionnel 2016 ou Client de bureau Microsoft Project Online à Project Web App.
Enregistrez le script suivant dans un fichier appelé 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
Lorsque vous exécutez le script, transmettez deux paramètres :
-
Nom que vous souhaitez donner au compte dans Project Professionnel
-
URL de votre site Project Web App
Pour exécuter le script, ouvrez une fenêtre de commande Windows PowerShell en tant qu’administrateur, puis exécutez le script en passant les deux paramètres.
Par exemple :
./CreateAccount.ps1 PWA https://contoso.sharepoint.com/sites/pwa