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

Cut 4427 disallow main folders path redirection (#150) #151

Merged
merged 6 commits into from
Jan 3, 2025
Merged

Conversation

kmaranionjc
Copy link
Contributor

@kmaranionjc kmaranionjc commented Jan 2, 2025

Issues

What does this solve?

Prevents migration if the user have redirected folder/s (Documents, Desktop, Downloads, etc...) to a network shared drive

Is there anything particularly tricky?

Setting up a network shared folder and redirecting path for Desktop or Documents can be time consuming. There is an alternative to this by changing the path values in the registry:

  1. Login to the user account that you are going to migrate
  2. Open registry and go to the user shell folder: HKEY_USERS:\USERSID\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
  3. Edit the value for Desktop to \\192.168.50.78\SharedFolder\USERNAME\Desktop
image 4. Save, sign out of the user then login to the admin account to run the migration

How should this be tested?

  1. Run Start-Migration as a cmd:
Start-Migration -JumpCloudUserName USERNAME -SelectedUserName AzureAd\Reid.Sullivan -TempPassword "Temp123!Temp123!" -UpdateHomePath $false  -LeaveDomain $true
  • Should throw an error and prevent the migration:
image
  1. Migrate using the GUI (.\Start-JCADMU.ps1)
  • Should throw an error and prevent the migration:
image
  1. Run Start-Migration as a cmd and use -ValidateUserShellFolder $false to skip the user folder validation:
Start-Migration -JumpCloudUserName USERNAME -SelectedUserName AzureAd\Reid.Sullivan -TempPassword "Temp123!Temp123!" -UpdateHomePath $false  -LeaveDomain $true -ValidateUserShellFolder $false
  • This should allow the migration even if the user has a folder that is redirected to a network share location

Screenshots

* folder redirect validation

* default path fix

* functions test

* docs

* ver

* test
@kmaranionjc kmaranionjc added ADMU ADMU Module Release patch Patch version release labels Jan 2, 2025
@kmaranionjc kmaranionjc requested a review from a team as a code owner January 2, 2025 19:02
@kmaranionjc kmaranionjc self-assigned this Jan 2, 2025
Copy link
Contributor

@jworkmanjc jworkmanjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everything makes sense but only because we've spent the time talking about this. The variable names are a bit confusing to read through, and I'm in favor of just testing the redirect directory as a default behavior within Test-UserRegistryLoadState. Just less complexity overall, if there's a use case that I've missed, let me know?

jumpcloud-ADMU/Powershell/Start-Migration.ps1 Outdated Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Outdated Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Outdated Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Outdated Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Outdated Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Show resolved Hide resolved
jumpcloud-ADMU/Powershell/Start-Migration.ps1 Show resolved Hide resolved
@kmaranionjc kmaranionjc requested a review from jworkmanjc January 3, 2025 19:22
@kmaranionjc kmaranionjc merged commit 3bb70f4 into master Jan 3, 2025
9 checks passed
@kmaranionjc kmaranionjc temporarily deployed to PublishToPSGallery January 3, 2025 20:39 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADMU ADMU Module Release patch Patch version release
Development

Successfully merging this pull request may close these issues.

3 participants