In this video, we will push a registry key from Intune with the help of a PowerShell script. We will rename explorer.exe's 'This PC' to match the device's Computer Name.
This shows a lot of useful things, and you will learn a bit more about Windows Registry, Intune Scripts, PowerShell and a lot more!
This is useful in real-world scenarios when you need to modify computer registry values.
Script Code used in the video below:
Rename 'This PC' to the computers Computer Name
Author: John Bryntze 4th of July
Version 1.0
variables
$JBNComputerName = $env:COMPUTERNAME
try {
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}' -Name "(Default)" -Value $JBNComputerName -Force
Write-host "We successfully renamed 'This PC' to the computer name"
}
catch {
Write-Warning $._Exception.Message
exit 1
}
Негізгі бет Push registry key with Intune - PowerShell script to rename 'This PC' to devices Computer Name
Пікірлер: 31