Powershell'de oldukça yeniyim. Burada neyi yanlış yaptığımdan emin değilim. Bir kullanıcının tüm REKLAM gruplarını csv'ye aktarmaya çalışıyorum. Biliyorum kodlaması biraz zor ama basit bir şey yapmaya çalışıyorum.
Import-Module ActiveDirectory
$UserName = “pball“
$ReportPath = “C:\Input\EricsStuff\userADgroups.csv“
Get-ADPrincipalGroupMembership $Username | select name, groupcategory, groupscope | export-CSV C:\Input\EricsStuff\userADgroups.csv
# Export to :
# C:\Input\EricsStuff\userADgroups.csv
Özellikle Hata şu şekildedir :
Get-ADPrincipalGroupMembership : An unspecified error has occurred
At C:\Input\EricsStuff\ExportUserGroups.ps1:7 char:1
+ Get-ADPrincipalGroupMembership $Username | select name, groupcategory ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (pball:ADPrincipal) [Get-ADPrincipalGroupMembership], ADException
+ FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.GetADPrincipalGroupMemb
ership