Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to exclude hidden users$ from query results.

$
0
0

Hi All

I am trying to use the following code to total enabled users BUT no include the hidden accounts. I have tried using the SamAccountName, SamAccountType, Name and nothing seems to be working for me. I am running ISE as Administrator with a high priviledge account. Please help :)

get-aduser -filter * -Properties * | where { $_.sAMAccountType -ne "805306370"} | select enabled, SamAccountName, manager, whencreated | export-csv C:\test.csv


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>