Skip to content

Instantly share code, notes, and snippets.

@Santaro255
Created January 10, 2019 09:12
Show Gist options
  • Save Santaro255/16dc20f7b800c07ab13683eebe38641c to your computer and use it in GitHub Desktop.
Save Santaro255/16dc20f7b800c07ab13683eebe38641c to your computer and use it in GitHub Desktop.
Enable "My Computer" icon with powershell script. After running script desktop should be updated by pressing F5.
#HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\ {20D04FE0-3AEA-1069-A2D8-08002B30309D} = 0/show , 1/hide
$path="HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel"
$name="{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
$exist="Get-ItemProperty -Path $path -Name $name"
if ($exist)
{
Set-ItemProperty -Path $path -Name $name -Value 0
}
Else
{
New-ItemProperty -Path $path -Name $name -Value 0
}
@bassuny3003
Copy link

need to -force

and thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment