Som celkom nový powershell. Nie ste istí, čo robím zle. Snaží exportovať všetky jedného používateľa REKLAMNÉ skupiny do CSV. Viem, že je to trochu ťažké kódované, ale len snaží urobiť niečo jednoduché.
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
Konkrétne Chyby, je :
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