Powershell and Project Server Programmin

Welcome Forums General PowerShell Q&A Powershell and Project Server Programmin

This topic contains 0 replies, has 1 voice, and was last updated by  Guhanath Rajendran 3 years, 2 months ago.

  • Author
  • #35030

    Topics: 1
    Replies: 0
    Points: 0
    Rank: Member

    I have written powershell script to connect to Microsoft Project server 2010 via web service call.
    I was able to get the list of the projects with all information. There is a method called ReadProjectEntities which takes 3 parameters(Guid, Task_Resource_Types, DataStoreEnum) to read project tasks and hours. I have written the code as below

    $pwaUrl = “https:///”
    $pwaPSUrl_Projectasmx = "/_vti_bin/PSI/Project.asmx?wsdl"
    $svcPSUrl = $pwaUrl + $pwaPSUrl_Projectasmx

    $myCred = Get-Credential

    $svcPSProxy = New-WebServiceProxy -uri $svcPSUrl -credential $myCred
    echo "proxy created"

    [System.Enum]$pwaDataStoreEnum = $svcPSProxy.DataStoreEnum # this not returning as enum.
    echo "Enum " $pwaDataStoreEnum.GetType() // this gives error.

    #equivalent method in ASPX page with C# code is below

    MyProjectWebReference.ProjectDataSet readProjDs = projectSvc.ReadProjectEntities(guid, PROJECT_ENTITY_TYPE_TASK_AND_RESOURCE, MyProjectWebReference.DataStoreEnum.WorkingStore);

    I even tried to Load Office.Project.Server.Library dll and use DataStoreEnum but that too failed. Anyone have thought about it or any suggestions?

    MSDN says DataStoreEnum is used from WebSvcProject but this wasn't easy in powershell. COuld be a simple thing but I have submitted this question in multiple forums but could not get any answer.


The topic ‘Powershell and Project Server Programmin’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort