CUT-4044 - Check/ Remove 'System' attribute from NTUSER.DAT
What does this solve?
In rare cases a user's NTUSER.DAT file could have a system file attribute and depending on how the ADMU was run this would prevent the tool from migrating the user. The NTUSER.DAT file doesn't need the system attribute, in most cases it's just created with hidden and archive attributes. This release removes the system attribute before attempting migration.
Is there anything particularly tricky?
How should this be tested?
To test the functionality of this release, a user who's set to be migrated should have their NTUSER.DAT file modified such that it has a system attribute. Previously if a user had this attribute on this file they would fail migration due to the insufficient access to this file.
The easiest way to set a user's NTUSER.DAT file to have the system attribute would be to use one of the new functions included in this release.
Import the start-migration functions by dot-sourcing the start-migration file: . \path\to\start-migration.ps1
Modify the user's NTUSER.DAT file you wish to migrate to set their registry hive to have the system attribute
The system attribute should be added to the NTUSER.DAT file.
Migrate the user as usual, migration should occur without error.
Screenshots
Here we can see the successful migration of a user who previously had the system attribute set, the logs will show their attribute status before and after migration.
In this screenshot we can see that the user ChetAtkins is set to be migrated and that they have the system attribute on their NTUSER.DAT file.
Issues
What does this solve?
In rare cases a user's
NTUSER.DAT
file could have asystem
file attribute and depending on how the ADMU was run this would prevent the tool from migrating the user. The NTUSER.DAT file doesn't need thesystem
attribute, in most cases it's just created withhidden
andarchive
attributes. This release removes thesystem
attribute before attempting migration.Is there anything particularly tricky?
How should this be tested?
To test the functionality of this release, a user who's set to be migrated should have their
NTUSER.DAT
file modified such that it has asystem
attribute. Previously if a user had this attribute on this file they would fail migration due to the insufficient access to this file.The easiest way to set a user's NTUSER.DAT file to have the
system
attribute would be to use one of the new functions included in this release.start-migration
functions by dot-sourcing the start-migration file:. \path\to\start-migration.ps1
system
attributeSet-FileAttribute -ProfilePath "C:\Users\username\NTUSER.DAT" -Attribute "System" -Operation "Add"
Screenshots
Here we can see the successful migration of a user who previously had the
system
attribute set, the logs will show their attribute status before and after migration.In this screenshot we can see that the user
ChetAtkins
is set to be migrated and that they have thesystem
attribute on their NTUSER.DAT file.