Which drive stores variables other than environment variables?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

Which drive stores variables other than environment variables?

Explanation:
In PowerShell, PS drives map to different data stores. Env: contains environment variables, Registry: provides access to the Windows registry, and Function: holds defined function definitions. The drive that stores PowerShell variables (anything you define with Set-Variable, New-Variable, or the automatic/session variables) is the Variable: drive. You can inspect it by switching to Variable: (cd Variable:) and listing its contents, or reference variables with Get-Variable. Function: stores functions, not general variables, so it isn’t the place for variable storage.

In PowerShell, PS drives map to different data stores. Env: contains environment variables, Registry: provides access to the Windows registry, and Function: holds defined function definitions. The drive that stores PowerShell variables (anything you define with Set-Variable, New-Variable, or the automatic/session variables) is the Variable: drive. You can inspect it by switching to Variable: (cd Variable:) and listing its contents, or reference variables with Get-Variable. Function: stores functions, not general variables, so it isn’t the place for variable storage.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy