diff --git a/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 new file mode 100644 index 0000000..c6e5cbc --- /dev/null +++ b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsDNSP.ps1 @@ -0,0 +1,27 @@ +function Get-WebrootStatisticsDNSP { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-console-gsm-gsmKey-sites-siteId-statistics-dnsp + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $siteId + ) + + if($siteId) + { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/sites/$($SiteId)/statistics/dnsp" + } else { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/statistics/dnsp" + } + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 new file mode 100644 index 0000000..1cebbcb --- /dev/null +++ b/WebrootUnity/Public/Console/GSM/Statistics/Get-WebrootStatisticsEndpointProtection.ps1 @@ -0,0 +1,28 @@ +function Get-WebrootStatisticsEndpointProtection { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-console-gsm-gsmKey-sites-siteId-statistics-endpointprotection + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $siteId + ) + + if($siteId) + { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/sites/$($siteId)/statistics/endpointprotection" + } else { + $url = "https://unityapi.webrootcloudav.com/service/api/console/gsm/$($keyCode)/statistics/endpointprotection" + } + + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 new file mode 100644 index 0000000..bdbf5a8 --- /dev/null +++ b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusDNSP.ps1 @@ -0,0 +1,35 @@ +function Get-WebrootEndpointStatusDNSP { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-status-site-dnsp-keyCode_machineId_modifiedSince_batchSize_continuation + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $machineId, + $returnedInfo, + $modifiedSince, + [int]$batchSize, + $continuation, + [switch]$All + ) + + $url = "https://unityapi.webrootcloudav.com/service/api/status/site/dnsp/$($keyCode)?machineId=$($machineId)&returnedInfo=$($returnedInfo)&modifiedSince=$($modifiedSince)&batchSize=$($batchSize)&continuation=$($continuation)" + + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + if($All){ + while($Obj.ContinuationURI){ + Connect-WebrootUnity + $Obj = Invoke-RestMethod -Method Get -uri $Obj.ContinuationURI -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + } + } + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 new file mode 100644 index 0000000..f05dfd3 --- /dev/null +++ b/WebrootUnity/Public/SkyStatus/Get-WebrootEndpointStatusGSMDNSP.ps1 @@ -0,0 +1,35 @@ +function Get-WebrootEndpointStatusGSMDNSP { + #https://unityapi.webrootcloudav.com/Docs/en/APIDoc/Api/GET-api-status-gsm-dnsp-keyCode_machineId_modifiedSince_batchSize_continuation + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + $KeyCode, + $machineId, + $returnedInfo, + $modifiedSince, + [int]$batchSize, + $continuation, + [switch]$All + ) + + $url = "https://unityapi.webrootcloudav.com/service/api/status/gsm/dnsp/$($KeyCode)?machineId=$($machineId)&returnedInfo=$($returnedInfo)&modifiedSince=$($modifiedSince)&batchSize=$($batchSize)&continuation=$($continuation)" + + + Connect-WebrootUnity + + try{ + $Obj = Invoke-RestMethod -Method Get -Uri $url -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + if($All){ + while($Obj.ContinuationURI){ + Connect-WebrootUnity + $Obj = Invoke-RestMethod -Method Get -uri $Obj.ContinuationURI -ContentType "application/json" -Headers @{"Authorization" = "Bearer $($WebrootAuthToken.access_token)"} + $Obj.QueryResults + } + } + } + catch{ + Write-Error "Error: $($_)" + } + +} \ No newline at end of file diff --git a/WebrootUnity/WebrootUnity.psd1 b/WebrootUnity/WebrootUnity.psd1 index 87f6047..1402443 100644 Binary files a/WebrootUnity/WebrootUnity.psd1 and b/WebrootUnity/WebrootUnity.psd1 differ