1

What are the PowerShell built-in drives called and where do I find a list of them?

When I say drives (because I don't know what they're really called), I'm refering to something like these as examples

dir function:
dir variable:

I am specifically looking for how to dir the list of local variables or global variables in a PowerShell session.

I have done this before but can't remember what the drive names were just now.

Thanks.

1
  • 1
    Do you mean Get-PSDrive? Feb 10, 2016 at 17:15

3 Answers 3

2

What are the PowerShell built-in drives called and where do I find a list of them?

To read more about providers, run Get-Help about_Providers in PowerShell or use online reference: about_Providers.

To get list of available providers use Get-PSProvider.

I am specifically looking for how to dir the list of local variables or global variables in a PowerShell session.

Use Get-Variable:

Get-Variable -Scope Local
Get-Variable -Scope Global
Get-Variable -Scope Script
0

gdr

For your second question: get-childitem -path variable: | ft *

0

Specifically, I was looking for the way to do the following.

ls Variable:

rm Variable:

I realise that ls and rm are aliases for Get-ChildItem and Remove-Item respectively, but I find the aliases easier to remember.

Thanks for the help all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.