Skip to content
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

More flexible work with AD Domains #1377

Open
yuzhaninan opened this issue Aug 15, 2024 · 0 comments
Open

More flexible work with AD Domains #1377

yuzhaninan opened this issue Aug 15, 2024 · 0 comments

Comments

@yuzhaninan
Copy link

Describe the Change

Add-PodeAuthWindowsAd should work with unique attributes for calculating groups and users. For example, by SID or GUID of the object. Support work when the post is carried out on behalf of the domain system (regular workstation). Also have support for working with a forest with several domains, several forests.

Related Issues

A clear and concise description of what the problem is, or a link/reference to the issue.

Additional Context

Something like this

		IF(!$PSBoundParameters.DomainControllers){
			
			IF(!$PSBoundParameters.Domain){
				$Domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().name
			}
			

			If($PSBoundParameters.Credential -ne [System.Management.Automation.PSCredential]::Empty -and $PSBoundParameters.Credential){
				$DomainInfo = [System.DirectoryServices.ActiveDirectory.Domain]::GetDomain([System.DirectoryServices.ActiveDirectory.DirectoryContext]::New(([System.DirectoryServices.ActiveDirectory.DirectoryContextType]::Domain),$Domain,$Credential.UserName,$Credential.GetNetworkCredential().Password))
			}Else{
				$DomainInfo = [System.DirectoryServices.ActiveDirectory.Domain]::GetDomain([System.DirectoryServices.ActiveDirectory.DirectoryContext]::New(([System.DirectoryServices.ActiveDirectory.DirectoryContextType]::Domain),$Domain))
			}

			$DomainController = $DomainInfo.DomainControllers[0].Name
		}
@yuzhaninan yuzhaninan changed the title More flexable work with AD Domains More flexible work with AD Domains Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant