PowerShell created 365 scheme name doesn't match Explorer Scheme name.

I using a powershell script to launch new schemes from the templating service and one step of this is to create a 365 scheme.

The below script seems to be creating the 365 scheme and  mapping the folder structure to my Work area in explorer but for some reason it is adding a (1) to my scheme name.

So if the scheme is called  'AXXXXX - (R) Generic Scheme Name' in explorer, 365 calls it 'AXXXXX - (R) Generic Scheme Name 1'

Can anyone suggest why this is and how to resolve it? I'm still new to PowerShell but I just cant see where this is coming from. 

#Step 6 - Create 365 Project
    $templates = Get-PW365Templates $oidcToken
    $projectName = $row.PROJECT_Project_Name
    $projectNumber =$row.PROJECT_ProjectNo
    $oidcToken = Get-OIDCToken -Authority https://ims.bentley.com -ClientID powershelltokengen 
    # need token from this authority for other things 
    $oidcToken2 = Get-OIDCToken -Authority https://imsoidc.bentley.com -ClientID powershelltokengen2
    $pw365ida = Add-PW365Project -PW365ProjectName $projectName -PW365ProjectNumber $projectNumber -DataCenterLocation "UK South" -OIDCToken $oidcToken -PW365TemplateName "b63924ff-69a2-4d4e-b686-af9b6dbc1b68"
    # default WAC does not get created immediately 
    $wacs = Get-PWWorkAreaConnectionsOIDC -ConnectedProjectIds $pw365ida -OIDCToken $oidcToken2 
    Set-PWWorkAreaConnectionDisabledOIDC $pw365ida -WorkAreaConnectionId $wacs.id -OIDCToken $oidcToken2 
    $wacs2 = Add-PW365WorkAreaConnectionOIDC $pw365ida -ProjectsToConnect $WorkArea -WSGURL "https://decide-pwce-us-ws.bentley.com/ws" -OIDCToken $oidcToken2 -EnableDrive -EnableUserSync 
    Set-PWConnectedProjectAssociation $WorkArea -ConnectedProjectGUID $pw365ida  
    #########
    $PWDriveSync = Set-PWWorkAreaConnectionUserSync $WorkArea -Token $oidcToken -ConnectedProjectIds $pw365ida   -OIDCToken $oidcToken2.access_token

Also whilst I'm here. Can I use Powershell to set the 'owners' in 365 at the same time as creating it, as that's not the only bit I have to do manually !

Thanks for any pointers!

Parents Reply Children
  • Thanks Mark, hopefully the below output will help.

    Also just to clarify my original post, the name of the project in the 'Manage my Project' tab is correct, it is the name used in the 'Documents' connection tab that is incorrect. 

    True
    VERBOSE: End getting folders.
    VERBOSE: Found 146 folders
    VERBOSE: Built list with 147 members.
    VERBOSE: Creating tree for PopulatePaths...
    VERBOSE: Created tree for PopulatePaths.
    VERBOSE: End getting folders.
    VERBOSE: Found 146 folders
    VERBOSE: Built list with 147 members.
    VERBOSE: Creating tree for PopulatePaths...
    VERBOSE: Created tree for PopulatePaths.
    VERBOSE: Source: 03.0 System Admin\03.06 Project Templates\A00000 - Rail Template
    VERBOSE: Target: 02.0 Projects\A23000 Projects\8e55448f-001f-4020-82ec-28c87b91cb27\A12345 - Verbose test
    VERBOSE: Copied 86 document list views and 0 preview pane views.
    Returned 0 matches
    Found 1 projects
    Filling paths...
    VERBOSE: Created path: '02.0 Projects\A23000 Projects\A12345 - Verbose test'
    VERBOSE: Found 1 documents
    VERBOSE: Successfully updated the document attributes for 'doc00001'.
    VERBOSE: ClientID: powershelltokengen
    VERBOSE: Authority: https://ims.bentley.com
    VERBOSE: Scopes: global_roles email openid profile organization feature_tracking connections:modify connections:read context-registry-service enterprise imodel-bridge-service-api-admin imodel-bridge-se
    rvice-api-general imodelhub imodelhub:webview imodels:modify imodels:read insights:read library:read product-settings-service projects:modify projects:read projectwise-deliverables-management-service p
    rojectwise-drive-settings-api projectwise-share projectwise-web-connections-service projectwise-web-view-service projectwise365:modify projectwise365:read pwconnections-read pwdi-read pwprojects-read r
    bac-user:external-client realitydata:read storage:modify storage:read synchronization:modify synchronization:read users:read offline_access
    VERBOSE: Redirect: http://localhost:4998/oauth-redirect
    VERBOSE: Attempting to read registry key HKCU\SOFTWARE\Bentley\PWPS_DAB\OIDCToken\https://ims.bentley.com\powershelltokengen...
    VERBOSE: Refreshed token with value from registry.
    VERBOSE: Writing refreshed token elements to HKCU\SOFTWARE\Bentley\PWPS_DAB\OIDCToken\https://ims.bentley.com\powershelltokengen in registry.
    VERBOSE: ClientID: powershelltokengen2
    VERBOSE: Authority: https://imsoidc.bentley.com
    VERBOSE: Scopes: global_roles email openid profile organization feature_tracking connections:modify connections:read context-registry-service enterprise imodel-bridge-service-api-admin imodel-bridge-se
    rvice-api-general imodelhub imodelhub:webview imodels:modify imodels:read insights:read library:read product-settings-service projects:modify projects:read projectwise-deliverables-management-service p
    rojectwise-drive-settings-api projectwise-share projectwise-web-connections-service projectwise-web-view-service projectwise365:modify projectwise365:read pwconnections-read pwdi-read pwprojects-read r
    bac-user:external-client realitydata:read storage:modify storage:read synchronization:modify synchronization:read users:read offline_access
    VERBOSE: Redirect: http://localhost:4998/oauth-redirect
    VERBOSE: Attempting to read registry key HKCU\SOFTWARE\Bentley\PWPS_DAB\OIDCToken\https://imsoidc.bentley.com\powershelltokengen2...
    VERBOSE: Refreshed token with value from registry.
    VERBOSE: Writing refreshed token elements to HKCU\SOFTWARE\Bentley\PWPS_DAB\OIDCToken\https://imsoidc.bentley.com\powershelltokengen2 in registry.
    VERBOSE: Base URL is 'https://es-api.bentley.com'
    VERBOSE: Fetching billing countries...
    VERBOSE: Billing Countries:
    VERBOSE: United Kingdom of Great Britain and Northern Ireland
    VERBOSE: Global
    VERBOSE: Billing country 'United States of America'
    VERBOSE: Data Centers:
    VERBOSE: East US
    VERBOSE: Southeast Asia
    VERBOSE: UK South
    VERBOSE: Australia East
    VERBOSE: Canada Central
    VERBOSE: Japan East
    VERBOSE: Templates:
    VERBOSE: Standard ProjectWise 365 Template
    VERBOSE: Standard ProjectWise Template
    VERBOSE: Template Project:
    Project ID: 00000000-0000-0000-0000-000000000000
    Display Name: 
    Number: 
    Registered: 
    Billing Country: 
    Data Center: 
    Time Zone: 
    Is Template: False
    
    VERBOSE: Will use 'UK South' as data center.
    VERBOSE: Created project:
    Project ID: 14907fc0-41e7-4475-b8de-4c9003eff637
    Display Name: Verbose test
    Number: A12345
    Registered: 2023-03-16T12:00:25.000Z
    Billing Country: United States of America
    Data Center: UK South
    Time Zone: Eastern Standard Time
    Is Template: False
    
    VERBOSE: Provisioning check 1, State: Created
    VERBOSE: Provisioning check 2, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Accepted
    VERBOSE: Component: Copy PW365 Template Forms, Status: InProgress
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: InProgress
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: InProgress
    VERBOSE: Component: Copy Roles From Template, Status: InProgress
    VERBOSE: Component: Copy Document Folders From Template, Status: Accepted
    VERBOSE: Provisioning check 3, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: InProgress
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: Accepted
    VERBOSE: Provisioning check 4, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: Queued
    VERBOSE: Provisioning check 5, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: InProgress
    VERBOSE: Provisioning check 6, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: InProgress
    VERBOSE: Provisioning check 7, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: InProgress
    VERBOSE: Provisioning check 8, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: InProgress
    VERBOSE: Provisioning check 9, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: InProgress
    VERBOSE: Provisioning check 10, State: Started
    VERBOSE: Component: Enable Documents From Template, Status: Succeeded
    VERBOSE: Component: Copy PW365 Template Forms, Status: Succeeded
    VERBOSE: Component: Enable ProjectWise Deliverables Management, Status: Succeeded
    VERBOSE: Component: Add User to Project with Team Member and Administrator Roles, Status: Succeeded
    VERBOSE: Component: Copy Roles From Template, Status: Succeeded
    VERBOSE: Component: Copy Document Folders From Template, Status: InProgress
    VERBOSE: Provisioning check 11, State: Succeeded
    VERBOSE: Removing default WAC...
    VERBOSE: WAC response (raw): {"items":[{"id":"f52a8f2660139eefb02b119861f720a3031ccc4e","url":"https://uks-pwm.bentley.com/ws/v2.8/repositories/Bentley.PW--PWIC-Prod-UKS-DB057/PW_WSG/Project/2f79c6b9-7
    89d-4d6b-aea7-0818f7c749e1","type":"Documents","displayName":"Verbose test","description":"PWIC-Prod-UKS-DB057","workAreaName":"14907fc0-41e7-4475-b8de-4c9003eff637"}],"nextPageToken":null}
    VERBOSE: Found 1 WACs
    VERBOSE: ProjectWise Web Connections URL: https://pwconnectionsapi.bentley.com
    VERBOSE: URI: https://pwconnectionsapi.bentley.com/api/v1/context/14907fc0-41e7-4475-b8de-4c9003eff637/connections
    VERBOSE: Response status code: OK
    VERBOSE: From ProjectWise Web Connections service:
    []
    VERBOSE: ProjectWise Web Connections URL: https://pwconnectionsapi.bentley.com
    VERBOSE: URI: https://pwconnectionsapi.bentley.com/api/v1/context/14907fc0-41e7-4475-b8de-4c9003eff637/connections/
    VERBOSE: Disable payload is: {"disabled":true,"name":"RenamedByPowerShell_FCFPYWDXCCPY"}
    VERBOSE: Response status code: MethodNotAllowed
    VERBOSE: From ProjectWise Web Connections Put: {"type":"https://httpstatuses.io/405","title":"Method Not Allowed","status":405,"traceId":"00-958ec5a2deccc6abfc16006aede62b8f-901865ade12c6390-00"}
    VERBOSE: Drive-Sync status code: MethodNotAllowed
    VERBOSE: From ProjectWise Web Connections Drive-Sync Delete: {"type":"https://httpstatuses.io/405","title":"Method Not Allowed","status":405,"traceId":"00-958ec5a2deccc6abfc16006aede62b8f-901865ade12c6
    390-00"}
    VERBOSE: ProjectWise Web Connections URL: https://pwconnectionsapi.bentley.com
    VERBOSE: URI: https://pwconnectionsapi.bentley.com/api/v1/context/14907fc0-41e7-4475-b8de-4c9003eff637/connections
    VERBOSE: Response status code: OK
    VERBOSE: From ProjectWise Web Connections service:
    []
    VERBOSE: ProjectWise Web Connections URL: https://pwconnectionsapi.bentley.com
    VERBOSE: URI: https://pwconnectionsapi.bentley.com/api/v1/context/14907fc0-41e7-4475-b8de-4c9003eff637/connections
    VERBOSE: ProjectURL: https://decide-pwce-us-ws.bentley.com/ws/v2.8/Repositories/Bentley.PW--thespencergroup-pw.bentley.com~3Athespencergroup-pw-02/PW_WSG/Project/75f98301-4529-4187-9b11-5a186af4fa7d
    VERBOSE: Add payload is: {"url":"https://decide-pwce-us-ws.bentley.com/ws/v2.8/Repositories/Bentley.PW--thespencergroup-pw.bentley.com~3Athespencergroup-pw-02/PW_WSG/Project/75f98301-4529-4187-9b11-5a1
    86af4fa7d","name":"A12345 - Verbose test","description":"thespencergroup-pw.bentley.com:thespencergroup-pw-02","workAreaName":"A12345 - Verbose test","displayLabel":"thespencergroup-pw.bentley.com:thes
    pencergroup-pw-02","disabled":false,"canned":false}
    VERBOSE: Response status code: OK
    VERBOSE: From ProjectWise Web Connections Add: {"id":"88de81b649bf747ed1fbe5448d65f9256c345ecb","canned":false,"type":"Bentley.PW","url":"https://decide-pwce-us-ws.bentley.com/ws/v2.8/Repositories/Bent
    ley.PW--thespencergroup-pw.bentley.com~3Athespencergroup-pw-02/PW_WSG/Project/75f98301-4529-4187-9b11-5a186af4fa7d","name":"A12345 - Verbose test","description":"thespencergroup-pw.bentley.com:thespenc
    ergroup-pw-02","workAreaName":"A12345 - Verbose test","defaultTab":null,"legacyId":null,"displayLabel":"thespencergroup-pw.bentley.com:thespencergroup-pw-02","disabled":false}
    VERBOSE: Created Work Area Connection Id '88de81b649bf747ed1fbe5448d65f9256c345ecb'
    VERBOSE: User-Sync status code: Created
    VERBOSE: Drive-Sync status code: BadRequest
    VERBOSE: From ProjectWise Web Connections Drive-Sync Post: {"id":"88de81b649bf747ed1fbe5448d65f9256c345ecb","canned":false,"type":"Bentley.PW","url":"https://decide-pwce-us-ws.bentley.com/ws/v2.8/Repos
    itories/Bentley.PW--thespencergroup-pw.bentley.com~3Athespencergroup-pw-02/PW_WSG/Project/75f98301-4529-4187-9b11-5a186af4fa7d","name":"A12345 - Verbose test","description":"thespencergroup-pw.bentley.
    com:thespencergroup-pw-02","workAreaName":"A12345 - Verbose test","defaultTab":null,"legacyId":null,"displayLabel":"thespencergroup-pw.bentley.com:thespencergroup-pw-02","disabled":false}
    VERBOSE: ProjectWise Web Connections URL: https://pwconnectionsapi.bentley.com
    VERBOSE: URI: https://pwconnectionsapi.bentley.com/api/v1/context/14907fc0-41e7-4475-b8de-4c9003eff637/connections
    VERBOSE: Response status code: OK
    VERBOSE: From ProjectWise Web Connections service:
    [{"id":"88de81b649bf747ed1fbe5448d65f9256c345ecb","canned":false,"type":"Bentley.PW","url":"https://decide-pwce-us-ws.bentley.com/ws/v2.8/Repositories/Bentley.PW--thespencergroup-pw.bentley.com~3Athesp
    encergroup-pw-02/PW_WSG/Project/75f98301-4529-4187-9b11-5a186af4fa7d","name":"A12345 - Verbose test","description":"thespencergroup-pw.bentley.com:thespencergroup-pw-02","workAreaName":"A12345 - Verbos
    e test","defaultTab":null,"legacyId":null,"displayLabel":"thespencergroup-pw.bentley.com:thespencergroup-pw-02","disabled":false}]
    VERBOSE: Work Area Connection Id: 88de81b649bf747ed1fbe5448d65f9256c345ecb, Name: A12345 - Verbose test, Url: https://decide-pwce-us-ws.bentley.com/ws/v2.8/Repositories/Bentley.PW--thespencergroup-pw.b
    entley.com~3Athespencergroup-pw-02/PW_WSG/Project/75f98301-4529-4187-9b11-5a186af4fa7d
    VERBOSE: Successfully associated the CONNECTED Project Assocation with Work Area 'A12345 - Verbose test'.
    Set-PWWorkAreaConnectionUserSync : Cannot bind parameter 'OIDCToken'. Cannot convert the "eyJhbGciOiJSUzI1NiIsImtpZCI6IkJlbnRsZXlJTVNfMjAyMyIsInBpLmF0bSI6ImE4bWUifQ.eyJzY29wZSI6WyJnbG9iYWxfcm9sZXMiLCJ
    lbWFpbCIsIm9wZW5pZCIsInByb2ZpbGUiLCJvcmdhbml6YXRpb24iLCJmZWF0dXJlX3RyYWNraW5nIiwiY29ubmVjdGlvbnM6bW9kaWZ5I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Y2VyZ3JvdXAuY28udWsiLCJnaXZlbl9uYW1lIjoiTmVpbCIsInNpZCI6InJoZXJ6cG9pYWZRLUpXblRJMTBrdDhIZk9IUS5TVTFUTFVKbGJuUnNaWGt0UkVVLkJkWWkuYTFPa1JJbFVhQ0JIYTNNRlJIVWZVUjhpQiI
    sIm5iZiI6MTY3ODE3OTI5MCwidWx0aW1hdGVfc2l0ZSI6IjEwMDIwNDk0MjEiLCJ1c2FnZV9jb3VudHJ5X2lzbyI6IkdCIiwiYXV0aF90aW1lIjoxNjc4MTc5NTkwLCJuYW1lIjoiTmVpbC53aGl0ZUB0aGVzcGVuY2VyZ3JvdXAuY28udWsiLCJvcmdfbmFtZSI6IkM
    gU3BlbmNlciBMdGQiLCJmYW1pbHlfbmFtZSI6IldoaXRlIiwiZW1haWwiOiJOZWlsLndoaXRlQHRoZXNwZW5jZXJncm91cC5jby51ayIsImV4cCI6MTY3ODk3MTYyM30.VMqu7ERV1gZSSU6cqpZKai8xVyYvsv_8wFpW09u8TqOZyyJo5UhKHNm5eb2-MAoBWSyi9SE
    vfB56iPwOxHpnyDol2GyFwtXyKtP8VXtZDSMjEHOyQ8EaGTsdhRSHcLbER2bT_sxZELKB1muY2Ihdcw9wejuUvD6I59Rg3UJjnVf7nMl9uLNdjrIMGKoy7hcy_TK4z9L9zvXhadsozzRRL1Rrg3GBbLLh3YAoj7kFQieksTSMPu2gtGfU-ls5T1_-BiKF5t1wNTcY3rm
    0l2vf-XnLSCzAfm2yT4SmFKz3KIpBoRsPCkbv2FGdb4qNLcv9Y36SriMW-qksJgIaatlqGw" value of type "System.String" to type "PWPS_DAB.OIDCAuthToken".
    At line:96 char:125
    + ... tedProjectIds $pw365ida   -OIDCToken $oidcToken2.access_token -verbos ...
    +                                          ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-PWWorkAreaConnectionUserSync], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,PWPS_DAB.SetPWWorkAreaConnectionUserSync