Werbung

Herkunft

Kurzinformation

Creates a PSDrive for special folders in the system.

Syntax

<# .Synopsis Creates a PSDrive for special folders in the system. .Description The Mount-SpecialFolder function creates a Windows PowerShell drive (PSDrive) for a specified special folder or all special folders in the system. The Mount-SpecialFolder function is run automatically when you import the FileSystem module. To see the PSDrives in your session, type "get-psdrive". .Parameter Folder Mounts only the specified special folders. Enter the name of a special folder or a name pattern, such as *desktop*. By default, Mount-SpecialFolder creates a PSDrive for every special folder in the system. .Parameter PassThru Returns an object that represents the new PSDrives. By default, this function does not generate any output. .Example Mount-SpecialFolder .Example Mount-SpecialFolder –folder SendTo –PassThru .Notes To get a list of the special folders on your system, type "[Enum]::GetValues([System.Environment+SpecialFolder])". .Link http://blogs.msdn.com/powershell/archive/2008/12/13/explore-your-environment.aspx .Link http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx .Link Get-PSDrive .Link New-PSDrive .Link Remove-PSDrive #> param( [String]$Folder="*", [Switch]$PassThru) process { $null = $psBoundParameters.Remove("PassThru") $null = $psBoundParameters.Remove("Folder") [Enum]::GetValues([Environment+SpecialFolder]) | Where-Object { $_ -like $Folder }| ForEach-Object { $NewDriveParameters = $psBoundParameters + @{ Name = $_ PSProvider = "FileSystem" Root = [Environment]::GetFolderPath($_) Scope = "Global" } New-PSDrive @NewDriveParameters -ErrorAction SilentlyContinue | Where-Object { $PassThru } } }

Beschreibung

The Mount-SpecialFolder function creates a WindowsPowerShell drive (PSDrive) for a specified specialfolder or all special folders in the system.

The Mount-SpecialFolder function is run automaticallywhen you import the FileSystem module. To see the PSDrivesin your session, type "get-psdrive".

Links

Liste aller Commandlets Mehr über die Windows PowerShell

Bücher zur PowerShell

Buchcover Windows PowerShell 5.0 - Das Praxishandbuch (1. Auflage 2016/5. Auflage Gesamtreihe) Windows PowerShell 5.0 - Das Praxishandbuch (1. Auflage 2016/5. Auflage Gesamtreihe)
Autoren: Dr. Holger Schwichtenberg
erschienen 2016, 996 Seiten, 49,99 €
ISBN: 3446446435
Bestellung: Amazon.de oder im Buchhandel über ISBN 3446446435

Schulungen/Seminare

Offene Seminare zur PowerShell
In-House-Seminare zur PowerShell