Powershell ile radius kullanıcı iplerini çıkartmak

$all = @()
$time = 0
$users = get-aduser -filter * -Properties ‘msRADIUSFramedIPAddress’ | ? { $_.msRADIUSFramedIPAddress -ne $null }
foreach( $user in $users)
{

$IP = DigitToStrIPAddress($user.msRADIUSFramedIPAddress)
$result = new-object psobject
$result | add-member noteproperty sAMAccountName $user.SamAccountName
$result | add-member noteproperty IP $IP

$all += $result

}
$all | export-csv c:\resultsssss.csv -encoding UTF8

No Comments

Post a Comment