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
<# | |
.SYNOPSIS | |
Converts a URL-encoded ATP Safelink to a real URL. | |
.DESCRIPTION | |
Microsoft doesn't offer a commandlet that converts an Advanced Threat Protection (ATP) SafeLink into the real target URL. This short script uses the .NET UrlDecode function and RegEx to extract it. | |
.PARAMETER safelink | |
A safelinks.protection.outlook.com link that includes the encoded target URL. |
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
#This Qualtrics API call only returns surveys accessible to the user holding the token, not all surveys in the tenant. | |
#Define headers and API endpoint. | |
$headers = @{ | |
"X-API-TOKEN" = yourapitoken | |
} | |
$qualtrics_api_url = "https://yourdatacenter.qualtrics.com/API/v3" | |
$endpoint = "surveys" | |
$uri = $qualtrics_api_url+"/"+$endpoint |
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("all","admins")][String]$type = "all" | |
) | |
#Define connection parameters and API endpoints | |
$headers = @{ | |
"X-API-TOKEN" = yourapitokenhere | |
} | |
$qualtrics_api_url = "https://yourdatacenter.qualtrics.com/API/v3" |
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]$metric_id, | |
[Parameter(Mandatory=$true)][Float]$datapoint | |
) | |
$api_key = YourStatusPageAPIKey | |
$page_id = YourStatusPagePageID | |
$api_base = 'https://api.statuspage.io/v1' | |
$metricURI = $api_base+"/pages/"+$page_id+"/metrics/"+$metric_id+"/data.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
$url = "https://yourdomain.teamdynamix.com/TDWebApi/api" | |
$action = "/auth/loginadmin" | |
$endpoint = $url+$action | |
$request = '{ | |
"BEID": "YourTDXAPIBEID", | |
"WebServicesKey": "YourWebServicesKey" | |
}' | |
$jwt = Invoke-RestMethod -Method Post -Uri $endpoint -Body $request -ContentType "application/json; charset=utf-8" |
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
#API token from https://www.dropbox.com/developers/apps | |
$token = 'Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
#Create initial DfB team members array: | |
$teammembers = Invoke-RestMethod -Uri https://api.dropbox.com/2/team/members/list -Body '{}' -ContentType "application/json; charset=utf-8" ` | |
-Headers @{ Authorization = $token } -Method Post | |
$allDropboxUsers = $teammembers.members.profile | |
#Keep paginating until we get all the account members. | |
while($teammembers.has_more -eq "True"){ |
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
#Specify your Dropbox AD Group (the one you use with the AD Connector) | |
$DropboxADGroupName = "YourDropboxUsersADGroup" | |
#API token from https://www.dropbox.com/developers/apps | |
$token = 'Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
#Get Dropbox Users via the DfB API | |
$allDfBAPIUsers = &DropboxAPI-ListMembers.ps1 | |
$allDfBAPIUsers = $allDfBAPIUsers | where team_member_id | |
$dfBAPIUsersFormatted = $allDfBAPIUsers | Select team_member_id, @{Name="Username";Expression={$_.email.split("@")[0]}}, email |
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
$dfbToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
$ou = "OU=YourOU,DC=domain,DC=com" | |
$groups = Get-ADGroup -SearchBase $ou -Filter * | Sort Name | |
#List Team Folders | |
$headers = @{ | |
Authorization = "Bearer $dfbToken" | |
} | |
$teamFolders = Invoke-RestMethod -Method Post -Uri https://api.dropboxapi.com/2/team/team_folder/list -Headers $headers -ContentType application/json -Body "{}" | |
$teamFolders = $teamFolders.team_folders.Name |
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( | |
[string]$building, | |
[string]$room, | |
[string]$time | |
) | |
$dateTime = $time | Get-Date | |
$dateString = $dateTime.ToString("yyyy-MM-ddThh:mm:ss") | |
#Define API connection parameters |
NewerOlder