Skip to content

Commit 2557353

Browse files
committed
add getresources.ps1 and getstatusassignments.ps1
1 parent 72c79ec commit 2557353

File tree

4 files changed

+45
-4
lines changed

4 files changed

+45
-4
lines changed

getprojectscsom.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#>
55

66

7-
# Get list of projects using OData/CSOM ReST API
7+
# Get list of projects using CSOM ReST API
88
param
99
(
1010
# SharepointOnline project site collection URL
@@ -17,6 +17,5 @@ param
1717
Set-SPOAuthenticationTicket $siteUrl
1818
Set-DigestValue $siteUrl
1919

20-
"CSOM"
2120
# Get list of projects using CSOM ReST API
2221
Get-ReSTRequest $SiteUrl "ProjectServer/Projects"

getprojectsodata.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#>
55

66

7-
# Get list of projects using OData/CSOM ReST API
7+
# Get list of projects using OData ReST API
88
param
99
(
1010
# SharepointOnline project site collection URL
@@ -18,5 +18,4 @@ Set-SPOAuthenticationTicket $siteUrl
1818
Set-DigestValue $siteUrl
1919

2020
# Get list of projects using OData ReST API
21-
"OData"
2221
Get-ReSTRequest $SiteUrl "ProjectData/Projects"

getresources.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<#
2+
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3+
See LICENSE in the project root for license information.
4+
#>
5+
6+
7+
# Get list of resources using CSOM ReST API
8+
param
9+
(
10+
# SharepointOnline project site collection URL
11+
$SiteUrl = $(throw "SiteUrl parameter is required")
12+
)
13+
# Load ReST helper methods
14+
. .\ReST.ps1
15+
16+
# Set up the request authentication
17+
Set-SPOAuthenticationTicket $siteUrl
18+
Set-DigestValue $siteUrl
19+
20+
# Get list of projects using CSOM ReST API
21+
Get-ReSTRequest $SiteUrl "ProjectServer/EnterpriseResources"

getstatusassignments.ps1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<#
2+
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3+
See LICENSE in the project root for license information.
4+
#>
5+
6+
7+
# Get list of resources using CSOM ReST API
8+
param
9+
(
10+
# SharepointOnline project site collection URL
11+
$SiteUrl = $(throw "SiteUrl parameter is required"),
12+
$ResourceId = $(throw "ResourceId paramter is required")
13+
)
14+
# Load ReST helper methods
15+
. .\ReST.ps1
16+
17+
# Set up the request authentication
18+
Set-SPOAuthenticationTicket $siteUrl
19+
Set-DigestValue $siteUrl
20+
21+
# Get list of projects using CSOM ReST API
22+
Get-ReSTRequest $SiteUrl "ProjectServer/EnterpriseResources('$($ResourceId)')/Assignments"

0 commit comments

Comments
 (0)