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

Workgroup and Domain Join - Is this intended? #150

Open
SBolt11 opened this issue May 7, 2024 · 7 comments
Open

Workgroup and Domain Join - Is this intended? #150

SBolt11 opened this issue May 7, 2024 · 7 comments

Comments

@SBolt11
Copy link

SBolt11 commented May 7, 2024

Good Morning,

When I was rifling through the scripts for MDT PSD, there was one part that stood out in the PSDConfigure.ps1 script.

Line 53 to 56, regarding domain join:

Fix issue if Domainjoin value is blank as well as joinworkgroup
if($tsenv:JoinDomain -eq "" -or $tsenv:JoinDomain -eq $null){
$tsenv:JoinWorkgroup = "WORKGROUP"
}

Should this not say that if($tsenv:JoinDomain -eq "" -or $tsenv:JoinDomain -eq $null -or $tsenv:JoinWorkgroup = "" -or $tsenv:JoinWorkgroup = $null){$tsenv:JoinWorkgroup = "WORKGROUP"}

?

E.g., if I put Workgroup value to be something other than Workgroup, I want it to stay as what I put, not go back to Workgroup.

Thanks,

SBolt11

@PowerShellCrack
Copy link
Contributor

That is a good point. I can see this probably wouldn't matter what you put into the Wizard for join Workgroup. I would expand it to further ensure it checks all prereqs for join domain properties.

# Check if domain variables are not null
# Fix issue if Domainjoin value is blank as well as joinworkgroup
if ([string]::IsNullOrEmpty($tsenv:JoinDomain) -or
    [string]::IsNullOrEmpty($tsenv:DomainAdmin) -or
    [string]::IsNullOrEmpty($tsenv:DomainAdminDomain) -or
    [string]::IsNullOrEmpty($tsenv:DomainAdminPassword)) {
    # If $tsenv:JoinWorkGroup is not null or empty, set it to WORKGROUP
    if ([string]::IsNullOrEmpty($tsenv:JoinWorkGroup)) {
        $tsenv:JoinWorkGroup = "WORKGROUP"
    }
}

@SBolt11
Copy link
Author

SBolt11 commented May 8, 2024

Thanks @PowerShellCrack that looks good. I just wanted to point it out as I noticed and it might help others.

@PowerShellCrack
Copy link
Contributor

right. I will mention it to the team and see if we can get it changed in the next release. I may use -and instead of -or though

@GeoSimos
Copy link
Collaborator

@PowerShellCrack can we close this issue?

@PowerShellCrack
Copy link
Contributor

I added this to the updated PSD development code, but it is still under review.

@SBolt11
Copy link
Author

SBolt11 commented May 29, 2024

Thanks both, sorry to leave you an issue to review. From my side, feel free to close, we all know what it's like having a long list! For what it's worth, what you have all made is brilliant, I just hope the little pokes here and there by the community make it better overall :-)

@PowerShellCrack
Copy link
Contributor

IMO, I would keep it open for tracking; I think this is a valid issue. And we appreciate the contributions from the community; this is why this project has been so great is because of all of you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants