Whenever I delete my user profile using Remove-CimInstance or Advanced System Properties and then log on to the same PC again, my profile will be created as a local profile instead of a roaming profile.
This means that any settings made on that PC will not be synchronised back to the user profile directory on the network share and are lost when I log on elsewhere.
When I log on to another PC of the domain, the profile is created as a normal roaming profile.
What causes the profile to be created as a local profile on this particular PC instead of a roaming profile?
Win32_UserProfile
The Win32_UserProfile looks like this
AppDataRoaming : Win32_FolderRedirectionHealth
Contacts : Win32_FolderRedirectionHealth
Desktop : Win32_FolderRedirectionHealth
Documents : Win32_FolderRedirectionHealth
Downloads : Win32_FolderRedirectionHealth
Favorites : Win32_FolderRedirectionHealth
HealthStatus : 3 (Not Applicable)
LastAttemptedProfileDownloadTime :
LastAttemptedProfileUploadTime :
LastBackgroundRegistryUploadTime :
LastDownloadTime :
LastUploadTime :
LastUseTime : 27.09.2024 12:19:24
Links : Win32_FolderRedirectionHealth
Loaded : True
LocalPath : C:\\Users\\username
Music : Win32_FolderRedirectionHealth
Pictures : Win32_FolderRedirectionHealth
RefCount :
RoamingConfigured : False
RoamingPath :
RoamingPreference :
SavedGames : Win32_FolderRedirectionHealth
Searches : Win32_FolderRedirectionHealth
SID : S-1-5-21-1234567890-123456789-123456789-1234
Special : False
StartMenu : Win32_FolderRedirectionHealth
Status : 0 (The status of the profile is not set.)
Videos : Win32_FolderRedirectionHealth
PSComputerName :
via Win32_UserProfile class reference and
gcim -ClassName Win32_UserProfile | ?{ $_.LocalPath -like "$env:USERPROFILE" }
ProfileList registry entry
And the Windows Registry entry from the ProfileList is
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1234567890-123456789-123456789-1234]
"ProfileImagePath"=hex(2):... (C:\Users\username)
"Flags"=dword:00000000
"FullProfile"=dword:00000001
"State"=dword:00000304
"Sid"=...
"Guid"=...
"LocalProfileLoadTimeLow"=dword:a21ef567
"LocalProfileLoadTimeHigh"=dword:01db0f24
"ProfileAttemptedProfileDownloadTimeLow"=dword:00000000
"ProfileAttemptedProfileDownloadTimeHigh"=dword:00000000
"ProfileLoadTimeLow"=dword:00000000
"ProfileLoadTimeHigh"=dword:00000000
"NextLogonCacheable"=dword:00000001
State 0x00000304 (772) means
004 = PROFILE_NEW_LOCAL
Using a new local profile.
100 = PROFILE_ADMIN_USER
Using administrator profile.
200 = DEFAULT_NET_READY
Default net profile is available & ready.