Wednesday, March 9, 2016

Greatest PowerShell Ever Written - Show File Extensions!


I regularly log on to servers where I need to change explorer settings.  This function has saved me years.

It sets the explorer optiona to what I like.  Including showing file extensions.

function Set-Windows-File-Explorer-Folder-Options()
{
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
Set-ItemProperty $key Hidden 1
Set-ItemProperty $key HideFileExt 0
#This one can be dangerous Set-ItemProperty $key ShowSuperHidden 1

    Set-ItemProperty $key HideDrivesWithNoMedia 1
    Set-ItemProperty $key DontPrettyPath 1
    Set-ItemProperty $key NavPaneExpandToCurrentFolder 1
    Set-ItemProperty $key NavPaneShowAllFolders 1
}

Set-Windows-File-Explorer-Folder-Options


No comments:

Post a Comment