PowerShell for Windows Admins

Jul 30 2013   3:28PM GMT

drive letter functions

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Have you ever looked at the functions available to you in PowerShell?

Get-ChildItem function:

shows the list of functions currently available in your PowerShell session.

function: is a PowerShell drive. Other drives are available:

£ Get-PSDrive

Name Used (GB) Free (GB) Provider Root
—- ——— ——— ——– —-
Alias Alias
C 103.58 129.21 FileSystem C:\
Cert Certificate \
D .03 .06 FileSystem D:\
E FileSystem E:\
Env Environment
F FileSystem F:\
Function Function
Variable Variable

These drives are created by PowerShell providers – functionality that exposes data stores as if they were file systems. Other providers include AD, SQL Server and IIS if you have those installed.

The function drive enables you to work directly with functions. You can view their details:

£ get-command c: | fl *

PSPath : Microsoft.PowerShell.Core\Function::C:
PSDrive : Function
PSProvider : Microsoft.PowerShell.Core\Function
PSIsContainer : False
HelpUri :
ScriptBlock : Set-Location C:
CmdletBinding : False
DefaultParameterSet :
Definition : Set-Location C:
Options : None
Description :
Verb :
Noun :
HelpFile : System.Management.Automation.dll-Help.xml
OutputType : {}
Name : C:
CommandType : Function
Visibility : Public
ModuleName :
Module :
RemotingCapability : PowerShell
Parameters : {}
ParameterSets : {}

In this case the information is minimal because all the function does is set your location to the c: drive.

The important part is that you can investigate functions as you will see later

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: