2020-07-02 10:26:51, Error [0x080000] There was an error while calling CreateProfile. Error: 0x80070005
2020-07-02 10:26:51, Error [0x000000] Error 2147942405 creating profile: Win32Exception: There was an error while calling CreateProfile.: Access is denied. [0x80070005] class UnBCL::String *__cdecl Mig::COnlineWinNTPlatform::CreateProfileForUserPrivate(class UnBCL::String *,class UnBCL::String *,class UnBCL::String *,class UnBCL::String *,int,class UnBCL::String **,class UnBCL::String **)
2020-07-02 10:26:51, Error [0x000000] Error creating profile for user Domain\User (source user Domain\User)
2020-07-02 10:26:51, Info [0x000000] Failed.[gle=0x00000091]
2020-07-02 10:26:51, Info [0x000000] A Windows Win32 API error occurred
Windows error 2147942405 description: Access is denied.[gle=0x00000091]
2020-07-02 10:26:51, Error [0x0802f5] CMediaManager::Close: m_pSelectedTransport->Close(1) failed with Exception Win32Exception: Device was open with readonly access.: Access is denied. [0x00000005] void __cdecl Mig::CMediaManager::CloseTransport(int)
void __cdecl Mig::CUNCTransport::Close(int).[gle=0x00000091]
2020-07-02 10:26:51, Error [0x000000] MigCloseCurrentStore caught exception: Win32Exception: Device was open with readonly access.: Access is denied. [0x00000005] void __cdecl Mig::CMediaManager::CloseTransport(int)
void __cdecl Mig::CUNCTransport::Close(int)[gle=0x00000091]
2020-07-02 10:26:51, Info [0x000000] USMT Completed at 2020/07/02:10:26:51.224[gle=0x00000091]
2020-07-02 10:26:51, Info [0x000000] ----------------------------------- USMT ERROR SUMMARY -----------------------------------
2020-07-02 10:26:51, Info [0x000000] * USMT error code 71:
2020-07-02 10:26:51, Info [0x000000] +-----------------------------------------------------------------------------------------
2020-07-02 10:26:51, Info [0x000000] | A Windows Win32 API error occurred
2020-07-02 10:26:51, Info [0x000000] | Windows error 2147942405 description: Access is denied.
this seems to be only occurring on devices that are 1803, have 0 issues restoring client data using the below script on 1909 devices
Here's the Restore Script we are using
Start function Restore
function Restore{
$OldPCName = $BackupPCDropDownBox.Text
$BackupPath = LocationSelection
$USMTPath = USMT64Path -BackupPath $BackupPath
$loadstateFile = $USMTPath + '\loadstate.exe'
$BackupPath = "$BackupPath\USMT_Store"
$PCRestorePath = $BackupPath + '' + $OldPCName
$InstalledPrinterFile = $PCRestorePath + '\InstalledPrinters.csv'
if((Test-path $PCRestorePath) -eq $false)
{
$outputBox.AppendText("No folder associated with $OldPCName found in $BackupPath" + "r
n")
Return
}
Set-Location $BackupPath
Set-Location $USMTPath
$USMTarglist = @(
"$PCRestorePath"
"/l:$PCRestorePath\load.log"
'/i:MST-MigUser.xml'
'/i:MST-MigApp.xml'
'/uel:180'
'/v:13'
'/nocompress'
)
#run loadstate to restore user data
$outputBox.AppendText("Restoring data from PC $OldPCName to PC $LocalPCName ..." + "`r`n")
$outputBox.AppendText("Restoring user data, please wait..." + "`r`n")
$Process = Start-Process $loadstateFile -ArgumentList $USMTarglist -Verb runas
#Restore Printers
RestorePrinters
#Running SCCM client action cycles
Invoke-CMClient
#check loadstate process, once it's complete, output a message
Start-Sleep 1
Do
{
$loadstateProcess = Get-Process loadstate -ErrorAction SilentlyContinue
if($loadstateProcess -eq $null)
{
$outputBox.AppendText("User data have been restored." + "`r`n")
}
}While($loadstateProcess)
#Move files from C:\Cardio to C:\ProgramData\Cardio
RestoreCardio
#Update SPOK database
#updateSPOK -OldPCName $OldPCName
$outputBox.AppendText("********Restore Complete********" + "`r`n")
}
end function Restore