Quantcast
Channel: Directory Services forum
Viewing all articles
Browse latest Browse all 31638

Sending results to a Txt or CSV file

$
0
0

Ran the below Script, not having much luck in getting all the output seen on the Screen into a File.  Any help, greatly appreciated.  Thanks.

$OUS = Get-ADOrganizationalUnit -Filter {name -like "*"} | select -expandproperty distinguishedname
foreach ($OU in $OUS){
$counter = 0
$gpos = Get-GPInheritance -target "$OU" |select -ExpandProperty inheritedgpolinks
foreach ($gpo in $gpos){
$counter++ 
$gponame = $gpo.displayname
"$counter","$gponame","$OU"
}
}


Viewing all articles
Browse latest Browse all 31638

Trending Articles



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