mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 18:55:53 +03:00
[GH-ISSUE #83] Can't access local AD #30
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @panki27 on GitHub (Aug 16, 2023).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/83
Originally assigned to: @panki27 on GitHub.
Hi, I've tried running Set-OutlookSignatures for the first time.
The script throws an error while trying to access the on-prem AD. I believe this is happening because the forest name is identical to the domain name.
Output (sorry for the German verbose message - I don't think there's a way to easily change this, other than changing entire OS language...):
The issue is here:
github.com/GruberMarkus/Set-utlookSignatures@dfae4b37a8/src_Set-OutlookSignatures/Set-OutlookSignatures.ps1 (L1170)Debugging the
$LookupDomainsToTrustsvariable shows that it already containscontoso.com, which is then being added a second time, which leads to the above exception.I was able to work around it like this:
But I'm not sure if this is the best approach. If you think it is, let me know and I'll create a PR.
@GruberMarkus commented on GitHub (Aug 16, 2023):
Deutsch ist überhaupt kein Problem. But let's stick to English, to make it easier for other users to follow this issue.
You are right with your assumption and your sample code would work. I will consider integrating the code in the next hotfix release - but we must find the root cause first: Why does Set-OutlookSignature detect this specific trust anyhow?
Please open the Active Directory Domains and Trusts MMC snap-in and check, if the root domain contoso.com has configured a trust to itself. If yes, than this is something you should investigate (I have never seen such a configuration, and ad-hoc can't imagine why this would be neccessary).
@panki27 commented on GitHub (Aug 16, 2023):
Hi Markus,
I've checked this by opening the properties of the root domain
contoso.comand checking the list of outgoing and incoming trusts.There is no reference to
contoso.com, only to the child domainsa.contoso.com,b.contoso.comand so on.But thank you for this hint, I'll keep investigating.
@panki27 commented on GitHub (Aug 16, 2023):
After using several Powershell cmdlets, I can confidently say there is no "special" trust relation from the parent domain to itself (which would be really weird, indeed).
My guess is that this happens because forest name == domain name, which is against M$ best practice. So I really can't fault your script here!
@GruberMarkus commented on GitHub (Aug 16, 2023):
Nonetheless, the code change you proposed makes sense and I will integrate it in the next hotfix release (which will very likely be released until the end of this week).