Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

[Scopes] Execute command in specific scope

$
0
0

Hello fellow Powershell users,

I am currently looking for a way to execute a command in a specific scope of my choice. While some commands offer a choice in how they do that, many do not. Any ideas on how to do this?

Background:
I occasionally find it useful or necessary to affect items on another scope. With Variables that's not an issue, but with items like Aliases or Functions that's not quite as simple, since the standard provider cmdlets only appear to work within the current scope (And that allscope option on Aliases is a joke - you can remove-item them all day long without affecting them in a parent scope, which es exactly what the documentation suggests should work).

That situation got me thinking, and knowing generally on how to do this would be great.

Cheers,
Fred


There's no place like 127.0.0.1


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>