We've come across the issue that when the win32 app relaunches as a 64-bit process it crashes and doesn't even create the folder "$($env:ProgramData)\Microsoft\RenameComputer".
In order to solve that we've changed the Intune install command from:
powershell.exe -noprofile -executionpolicy bypass -file .\RenameComputer.ps1
to:
%windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File RenameComputer.ps1
We've come across the issue that when the win32 app relaunches as a 64-bit process it crashes and doesn't even create the folder "$($env:ProgramData)\Microsoft\RenameComputer".
In order to solve that we've changed the Intune install command from:
powershell.exe -noprofile -executionpolicy bypass -file .\RenameComputer.ps1
to:
%windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File RenameComputer.ps1