Using Get-PASDiscoveredAccounts #495
Unanswered
krmatthe23
asked this question in
Q&A
Replies: 1 comment 2 replies
-
https://cyberark.my.site.com/s/article/CPMScanner-How-to-increase-the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am attempting to write a script that will retrieve a list of Pending Accounts. Get-PASDiscoveredAcounts does the work. But, in spite of the published limits I keep getting the same 20K objects back from the request. I have tried iterating through a for loop and increasing the offset with each iteration but it seems to be ignoring both the offset and limit parameters.
Our environment is:
On-Prem
PAS v12.6
Using psPAS module 6.0.4 via Powershell 7
The loop is as follows:
for ($i=0; $i -le 200000; $i = $i + 1000){
Write-Host("The Current offset is - " + $i)
Get-PASDiscoveredAccount -limit 1000 -offset $i -platformtype "Windows Server Local" | Export-Csv -Path $datafile -Append -Force
Get-PASDiscoveredAccount -limit 1000 -offset $i -platformtype "Windows Domain" | Export-Csv -Path $datafile -Append -Force
}
My guess is that I missed something very obvious in the documentation an am using the parameters incorrectly. But, I'm not seeing it. So more eyes are better.
Beta Was this translation helpful? Give feedback.
All reactions