This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][String]$markdownFilePath, | |
[String]$parentFolderID | |
) | |
$token = 'Bearer xxxyourapptokenherexxx' | |
#You'll need to use the Dropbox Business API to get the Team Member's ID. | |
$teamMemberID = "xxxxxx" |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][String]$emailAddress | |
) | |
#API token from https://www.dropbox.com/developers/apps | |
$token = 'Bearer YourTeamMemberInformationAppTokenHere' | |
$body = '{"members":[{".tag":"email","email":"'+$emailAddress+'"}]}' | |
$headers = @{ |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][String]$subject, | |
[Parameter(Mandatory=$true)][String]$description, | |
[Parameter(Mandatory=$true)][String]$requesterID, | |
[Parameter(Mandatory=$true)][String]$assignedGroupID, | |
[String]$tag | |
) | |
#Zendesk API Connection Headers Referencing System Environmental Variables for username and API token. | |
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($ZendeskAPI_Username):$($ZendeskAPI_Token)"));} |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][Int32]$ticketID, | |
[Parameter(Mandatory=$true)][ValidateSet('open', 'pending', 'on-hold', 'solved')][String]$ticketStatus | |
) | |
#Zendesk API Connection Headers Referencing System Environmental Variables for username and API token. | |
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($ZendeskAPI_Username):$($ZendeskAPI_Token)"));} | |
#Zendesk API: Update Ticket | |
$uri = "https://yourdomain.zendesk.com/api/v2/tickets/$ticketID.json" |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][Int32]$ticketID | |
) | |
#Zendesk API Connection Headers Referencing System Environmental Variables for username and API token. | |
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($env:ZendeskAPI_Username):$($env:ZendeskAPI_Token)"));} | |
$ticketsURI = "https://yourdomain.zendesk.com/api/v2/tickets/$ticketID.json" | |
$ticket = Invoke-RestMethod -Uri $ticketsURI -Method Get -Headers $headers -ContentType "application/json" |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][String]$userID | |
) | |
#Zendesk API Connection Headers Referencing System Environmental Variables for username and API token. | |
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($env:ZendeskAPI_Username):$($env:ZendeskAPI_Token)"));} | |
$userURI = "https://yourdomain.zendesk.com/api/v2/users/$userID.json" | |
$user = Invoke-RestMethod -Uri $userURI -Method Get -Headers $headers -ContentType "application/json" | |
$user = $user.user |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][Int32]$ticketID, | |
[Parameter(Mandatory=$true)][String]$body, | |
[Parameter(Mandatory=$true)][ValidateSet('rich', 'html')][String]$body_type, | |
[Parameter(Mandatory=$true)][ValidateSet('private', 'public')][string]$scope, | |
[String][ValidateSet('assignee', 'apiuser')]$author | |
) | |
if($body_type -eq "html"){ | |
$zd_body_type = "html_body" |
This file contains hidden or 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
param( | |
[ValidateSet('admin', 'agents', 'allagents', 'endusers', 'allusers')][String]$role | |
) | |
#Zendesk API Connection Headers Referencing System Environmental Variables for username and API token. | |
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($env:ZendeskAPI_Username):$($env:ZendeskAPI_Token)"));} | |
#GET ALL ZENDESK USERS | |
$allUsers = @() |
This file contains hidden or 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
#Download all admin and agent user objects from Zendesk. | |
$agents = &ZendeskAPI-GetZendeskUsers.ps1 "allagents" | |
#Trim agent list. | |
$agents = $agents | where email -like "*@yourdomain.com" | sort email | |
#Connect to Exchange Online. Use your own script here or swap this line out with the connection commands supplied by Microsoft. | |
#There's no reason this won't work with Exchange On-Prem AFAIK. We just use Exchange Online, so the comments reference it. | |
&ConnectToExchangeOnline.ps1 |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)][Int32]$ticketID, | |
[Parameter(Mandatory=$true)][Int32]$fieldID, | |
[Parameter(Mandatory=$true)][string]$fieldValue | |
) | |
#Zendesk API Connection Headers Referencing System Environmental Variables for username and API token. | |
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($env:ZendeskAPI_Username):$($env:ZendeskAPI_Token)"));} | |
#Zendesk API: Update Ticket |
OlderNewer