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

Active Directory Module for Windows Powershell Output Results as Excel document.

$
0
0

My current issue is that i am trying to find all expired accounts under my OU in Active Directory. The current script i have runs great but i dont know how to be more specific or to get the results to Output to a file such as an excel document.

Current Script:

Search-ADAccount -AccountExpired

That runs and finds all users. I have other options the script i tried running is:

Search-ADAccount -AccountExpired -SearchBase"OU=(My OU),DC=(My Domain),DC=(local)" -SearchScope SubTree

That Script will not run the same as the first one. It results in a >> Prompt i was unsure what the "local" part was and left it as is. So my question is can anyone provide me with the script i'm looking for?


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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