From ace82ceb390ad0b295bce5e20ca55ea68be84126 Mon Sep 17 00:00:00 2001 From: TKoziana Date: Sat, 7 Dec 2024 21:17:22 -0500 Subject: [PATCH] Update Get-AuditLogByTimeRange.ps1 Change URL to prod vs dev. --- Segment/Trust Server/Get-AuditLogByTimeRange.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Segment/Trust Server/Get-AuditLogByTimeRange.ps1 b/Segment/Trust Server/Get-AuditLogByTimeRange.ps1 index 162f8b6..03eac48 100644 --- a/Segment/Trust Server/Get-AuditLogByTimeRange.ps1 +++ b/Segment/Trust Server/Get-AuditLogByTimeRange.ps1 @@ -21,7 +21,7 @@ $endtime = [DateTimeOffset]::Parse($humanendtime).ToUnixTimeMilliseconds() $myhome = [Environment]::GetFolderPath('UserProfile') $CsvPath = Join-Path $myhome ("Audit Log-" + $humanstarttime + "-to-" + $humanendtime + ".csv") -$uri = "https://portal-dev.zeronetworks.com/api/v1/audit?_limit=400&_cursor=&_search=&from=" + $starttime + "&to=" + $endtime + "&_filters=&order=desc" +$uri = "https://portal.zeronetworks.com/api/v1/audit?_limit=400&_cursor=&_search=&from=" + $starttime + "&to=" + $endtime + "&_filters=&order=desc" #Get the first 400 audit logs @@ -33,7 +33,7 @@ write-output $s.scrollCursor #Get the remaining audit logs in 400 count batches. while ($s.items.count -ne "0"){ -$uri = "https://portal-dev.zeronetworks.com/api/v1/audit?_limit=400&from=" + $starttime + "&to=" + $endtime + "&_cursor=" + $s.scrollCursor + "&_search=&_filters=&order=desc" +$uri = "https://portal.zeronetworks.com/api/v1/audit?_limit=400&from=" + $starttime + "&to=" + $endtime + "&_cursor=" + $s.scrollCursor + "&_search=&_filters=&order=desc" $s = Invoke-RestMethod -Uri $uri -Method Get -Headers $znHeaders $t += $s.items write-output $s.scrollCursor