Delete a Team Drive. This example deletes the Team Drive having id = 0ANKf-53y-eUWUk9PVA.
[Reflection.Assembly]::LoadFile("C:\myAssemblies\ChilkatDotNet2.dll")
$rest = New-Object Chilkat.Rest
# Provide a previously obtained OAuth2 access token.
$oauth2 = New-Object Chilkat.OAuth2
$oauth2.AccessToken = "OAUTH2_ACCESS_TOKEN"
$rest.SetAuthOAuth2($oauth2)
$success = $rest.Connect("www.googleapis.com",443,$true,$true)
if ($success -ne $true) {
$($rest.LastErrorText)
exit
}
$sbResponse = New-Object Chilkat.StringBuilder
$success = $rest.FullRequestNoBodySb("DELETE","/drive/v3/teamdrives/0ANKf-53y-eUWUk9PVA",$sbResponse)
if ($success -ne $true) {
$($rest.LastErrorText)
exit
}
if ($rest.ResponseStatusCode -ne 204) {
$("Received error response code: " + $rest.ResponseStatusCode)
$("Response body:")
$($sbResponse.GetAsString())
exit
}
$("Example Completed.")