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
######Howto use script | |
# 1. Create config.ini file | |
# 1a. Config.ini file example at following URL: https://gist.github.com/HawaiiRyan/b610f6d5427afa9609cee145affed912 | |
# 2. Update -path location in the line where variable/object $WS1Env is declared | |
# 3. Ensure $addy, $b64, $apikey are referencing the correct environment. | |
# 3a. UAT environment is used in this example | |
#Set Verbosity Preference | |
$VerbosePreference = "Continue" |
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
$logpath = "C:\Hawaii\Kauai\workspaceone\tools\logs" | |
If(!(test-path $logpath)) | |
{ | |
New-Item -ItemType Directory -Force -Path $logpath | |
} | |
$applog = "$logpath\HouseBought$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).csv" | |
$addy = "https://kauai.ryanpringnitz.com" | |
$apiKey = "z/Model337ltuYugOcE2snK/ModelYnot?d4vHlN4hd=" | |
$b64 = "SWNhbmhhelRlc2xhP1RoaXNQYXNzd29yZGlzSm9rZWJ1dFJlYWxseSxJd2FudEFUZXNsYQ==" |
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
###Force commuincation to only occur with TLS 1.2 | |
Write-Verbose -Message "Forcing TLS 1.2 Cipher...." | |
[Net.ServicePointManager]::SecurityProtocol = | |
[Net.SecurityProtocolType]::Tls12 | |
Write-Verbose -Message "TLS 1.2 Ciper Successfully Enforced" | |
$filepath = Get-Location | |
$WS1Env = Get-Content -Path $filepath\tools\config.ini | Select -Skip 1 | ConvertFrom-StringData | |
$logPath = $WS1Env.logpath |
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
####ini file info | |
#Modify the value to the right of the equal symbol | |
#Example | |
#DEVEnvironment=https://molokai.ryanpringnitz.com | |
#### | |
#The data in the ini file can be referenced in the Powershell object $WS1Env | |
#Example with variable $WS1Env used | |
#$WS1Env.UATEnvironment | |
#This will be available for use as a string in the array | |
#### |
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
mode=explicit,broadcast=false,action=android.intent.action.MAIN,package=com.internal.commercialrealestateservices,class=com.internal.commercialrealestateservices.MainActivity |
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
#Set Verbosity Preference | |
$VerbosePreference = "Continue" | |
#Require TLS 1.2 for communication | |
[Net.ServicePointManager]::SecurityProtocol = | |
[Net.SecurityProtocolType]::Tls12 | |
#Workspace ONE Environment Address, Authentication, and Headers | |
$addy = "https://ws1.ryanpringnitz.com" |
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
{ | |
"DeviceId": [ | |
53, | |
54, | |
55, | |
56, | |
57, | |
58, | |
59, | |
61, |
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
curl -X POST | |
--header 'Content-Type: application/json' | |
--header 'Accept: application/json;version=1' | |
--header 'Authorization: Basic aWNhbmhhelRlc2xhcGx6' | |
--header 'aw-tenant-code: e/A6xyuU02ytaNjoecj2jnW/mq24on7lYHd9vZlP0h=q' | |
'https://ws1.ryanpringnitz.com/API/mam/apps/public/223/devices' |
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
curl -X POST | |
--header 'Content-Type: application/json' | |
--header 'Accept: application/json;version=1' | |
--header 'Authorization: Basic aWNhbmhhelRlc2xhcGx6' | |
--header 'aw-tenant-code: e/A6xyuU02ytaNjoecj2jnW/mq24on7lYHd9vZlP0h=q' | |
-d '{ \ | |
"DeviceId":66 \ | |
}' 'https://ws1.ryanpringnitz.com/API/mam/apps/public/223/install' | |
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
#Workspace ONE UEM Environment Address / Authentication | |
$addy = "https://ws1.molokaibank.com" | |
$b64 = Get-Content -Path "c:\creds\b64.txt" | |
$apiKey = "apikey" | |
$b64EncodedAuth = "$b64" | |
#Header | |
$content = "application/json" | |
$authHeader = "Basic " + $b64EncodedAuth | |
$header = @{"Authorization" = $authHeader; "aw-tenant-code" = $apiKey; "Accept" = $content; "Content-Type" = $content} |