Created
December 20, 2016 02:11
-
-
Save spjeff/33c94e0e7fd68f4ba62d849e2503c332 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create Task or Bucket for Office 365 Planner | |
function O365Login() { | |
} | |
function CreateTask($row) { | |
# https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/task | |
$endpointUri = $global:tenant += "_api/plannerEndpoint" | |
Invoke-WebRequest $url $row | |
} | |
function CreateBucket($row) { | |
# https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/bucket | |
$endpointUri = $global:tenant += "_api/plannerEndpoint" | |
Invoke-WebRequest $url $row | |
} | |
function Main() { | |
Start-Transcript | |
# Authentication | |
O365Login | |
# Task | |
Write-Host "TASK" | |
Import-Csv "task.csv" |% {CreateTask $_} | |
# Bucket | |
Write-Host "BUCKET" | |
Import-Csv "bucket.csv" |% {CreateBucket $_} | |
Stop-Transcript | |
} | |
Main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment