Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell – Show File Extensions

Posted on August 30, 2016 By David Kittell
function ShowFileExtensions() 
{
    # http://superuser.com/questions/666891/script-to-set-hide-file-extensions
    Push-Location
    Set-Location HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
    Set-ItemProperty . HideFileExt "0"
    Pop-Location
    Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work.
}

ShowFileExtensions
function HideFileExtensions() 
{
    # http://superuser.com/questions/666891/script-to-set-hide-file-extensions
    Push-Location
    Set-Location HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
    Set-ItemProperty . HideFileExt "1"
    Pop-Location
    Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work.
}

HideFileExtensions

Reference: http://superuser.com/questions/666891/script-to-set-hide-file-extensions

All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Mac OSX Terminal – Get Stored Wireless (Wi-Fi) Password

Posted on January 18, 2017June 6, 2025

Addition to Find & Scan Wireless Networks the additional line will require a password but then display the stored password for the defined router name. # List all Wi-Fi – Older macOS /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s # Newer macOS networksetup -listpreferredwirelessnetworks en0 # Get Stored Password To Wi-Fi security find-generic-password -ga "Router_Name"…

Read More

LDAP Dates Converted

Posted on July 25, 2013October 26, 2015

Dates that look like 127524839567199000 (pwdLastSet, accountExpires, lastLogonTimestamp, etc.) IF( B16>0 ,B16/864000000000 – 109205 ,"" ) Example: 130186556607343750 converts to 40921.80861 40921.80861 in Excel with cell formatting of Date/Time will show as January 13th, 2012 7:24 PM Dates that look like 20050210223453.0Z (whenChanged) DATEVALUE( CONCATENATE( (LEFT(TRIM(B9),4)) ,"-" ,(RIGHT(LEFT(TRIM(B9),6),2)) ,"-" ,RIGHT(LEFT(TRIM(B9),8),2)…

Read More

C# ASPX Phone Number Validation

Posted on January 9, 2015October 26, 2015

<asp:TextBox ID="RequestorPhone" runat="server" MaxLength="20" /> <asp:RequiredFieldValidator runat="server" ControlToValidate="RequestorPhone" Display="Dynamic" ErrorMessage="Phone # is required" /> <asp:RegularExpressionValidator ID="revPhone" runat="server" ControlToValidate="RequestorPhone" Display="Dynamic" ErrorMessage="Phone # is invalid" ValidationExpression="^(?:(?:+?1s*(?:[.-]s*)?)?(?:(s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])s*)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))s*(?:[.-]s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})s*(?:[.-]s*)?([0-9]{4})(?:s*(?:#|x.?|ext.?|extension)s*(d+))?$" /> Credit: fatcat1111 @ stackoverflow.com Originally Posted on January 9, 2015Last Updated on October 26, 2015 All information on this site is shared with the intention…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • Front Page
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes