Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - What is the default scope value?

Reply
 
Old 10-01-2008   #1 (permalink)
RickB


 
 

What is the default scope value?

I have this function - which works.

function mine {get-variable -scope global|do-stuff}

But now, I sometimes need to process all the variables.

function mine ($scope = 'global'){{get-variable -scope $scope|do-
stuff}

What value can I pass that will cause get-variable to return the same
list I get when omitting -scope?

My System SpecsSystem Spec
Old 10-02-2008   #2 (permalink)


Vista Ultimate 32bit
 
 

Re: What is the default scope value?

You pseudo example is hurting my head. Can you post an example we could try?
My System SpecsSystem Spec
Old 10-02-2008   #3 (permalink)


Vista Ultimate 32bit
 
 

Re: What is the default scope value?

Of if you are asking about the default value for the -scope parameter of Get-Variable, it is LOCAL.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Dot-sourcing and scope PowerShell
Scope of Err Variable VB Script
Is this a bug in the scope? PowerShell
Variable scope PowerShell
Powershell and scope PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46