I try to rename “this computer” bye the computer name of the computer
I tried this script
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT CD HKCR:\ $value = $env:Computername New-ItemProperty -Path 'Local Settings\MuiCache\30\701D4D14' -Name "@C:\\Windows\\system32\\windows.storage.dll,-9216" -Value $value -PropertyType DWORD -Force CD C:\ Remove-PSDrive -Name HKCR
But I always get an error
New-ItemProperty : Impossible de convertir la valeur «DESKTOP-V20NJPA» en type «System.UInt32». Erreur: «Le format de la chaîne d'entrée est incorrect.» Au caractère C:\Users\bios\Desktop\test.ps1:10 : 1 + New-ItemProperty -Path 'Local Settings\MuiCache\30\701D4D14' -Name $n ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (HKEY_CLASSES_RO...che\30\701D4D14:String) [New-ItemProperty], PSInvalidCastExcep tion + FullyQualifiedErrorId : System.Management.Automation.PSInvalidCastException,Microsoft.PowerShell.Commands.NewItemProp ertyCommand
This key is used for a canadien french language, the error sais unable to convert the value «DESKTOP-V20NJPA» in type «System.UInt32». Error: «the input string format is incorrect»