< Back

Hide-DriveLetter

Tue Jan 14, 2020 1:10 am

NAME Hide-DriveLetter



SYNOPSIS

Hides a drive letter from Windows Explorer.





SYNTAX

Hide-DriveLetter [[-DriveLetter] <String[]>] [<CommonParameters>]





DESCRIPTION

Hides a drive letter from Windows Explorer. Windows Explorer must be restarted for all changes to take effect.





PARAMETERS

-DriveLetter <String[]>

The drive letter to hide.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String[]







OUTPUTS

System.Object







NOTES









Example 1



PS C:\\> Hide-DriveLetter -DriveLetter C -Verbose

VERBOSE: Hidding Drive Letter [C]

VERBOSE: Please restart explorer for changes to take effect

PS C:\\> Stop-Process -Name explorer -Verbose -Force

VERBOSE: Performing the operation "Stop-Process" on target "explorer (xxxx)".



This example hides the "C" drive and then restarts explorer to show the changes immediately.



RELATED LINKS

Github https://github.com/dchristian3188/HideW ... orerDrives