-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADGroup: unable to remove trusted domain members from group #583
Comments
It is the function ActiveDirectoryDsc/source/Modules/ActiveDirectoryDsc.Common/ActiveDirectoryDsc.Common.psm1 Lines 1261 to 1336 in 4cbeae1
Would it be so easy to create |
Details of the scenario you tried and the problem that is occurring
DomainA and DomainB are trusting each other with external trusts. Using the ADGroup resource, I can add
DomainA\TestUser
toDomainB\group
, but removing the sameDomainA\TestUser
fromDomainB\group
generates the error:I've tested both using the
Members
andMembersToExclude
properties, with the same result.Verbose logs showing the problem
Suggested solution to the issue
Looking at the resource code with my limited skills it seems to me that we're adding users with the
Add-ADCommonGroupMember
function and we're removing users with the Windows built-in ADRemove-ADGroupMember
cmdlet.Outside ADGroup, I can reproduce the same error using the Windows AD powershell cmdlet, both trying to Add and Remove DomainA\TestUser to/from DomainB\TestGrp. The following commands ran on DomainB domain controller both generate the same error:
Could the same code used in the
Add-ADCommonGroupMember
fuction be used with minor changes to have a workingRemove-ADCommonGroupMember function
? I've tried, but failed with my basic powershell skills.The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
OsName : Microsoft Windows Server 2016 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.3297.amd64fre.rs1_release_1.191001-1045
OsLanguage : en-US
OsMuiLanguages : {en-US}
Name Value
PSVersion 5.1.14393.3053
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3053
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used
ActiveDirectoryDsc version 6.0.0
The text was updated successfully, but these errors were encountered: