PowerTip: Mini-Scripting Games 2014 Answer 5

Doctor Scripto

Summary: Here is the answer to the final question in Mini-Scripting Games 2014.

Hey, Scripting Guy! Question You created a constant variable in your Windows PowerShell console. Now, when you attempt to delete the variable,
           you get an error message. How can you remove a constant variable?

Hey, Scripting Guy! Answer A constant variable is created by using the New-Variable cmdlet, for example:

New-Variable c "c" -Option Constant

   After a variable is created as a constant, it cannot be removed until the console (or ISE) is closed and reopened.


Discussion is closed.

Feedback usabilla icon