Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Real nested Powershell interpreter

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 09-25-2007   #1 (permalink)
ivo.looser
Guest


 

Real nested Powershell interpreter

Hi Together

I try to make an extended Interpreter for my personal Administration
to load some global Methods and execute them as i need.

I did so far created a script with the following content. (just typed
from mind, maybe no working as except)

#scriptname start.ps1

function global:getsubdirs()
{
params(
$folder = 'c:\'
)
}

$loopingplease = $true

while($loopingplease)
{

$command = Read-host "Type Command:"
if($command -eq "exit")
{
$loopingplease = $false

}
else
{
Invoke-Expression $command
}
}

##End of Script

Know when i execute a long running "Invoke-expression" and stop it
with CTRL-C i goes directly to the Base Powershell Command Prompt.

But will still stay in my own prompt.

Is it possible to do?

Thanks in Advance.
Ivo Looser


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Problem with Command Interpreter the wharf rat Vista General 0 05-21-2008 03:50 PM
Re: Problem with Command Interpreter propman Vista General 0 05-21-2008 03:23 PM
Re: Problem with Command Interpreter propman Vista General 0 05-21-2008 03:10 PM
Brainf*** Compiler and Interpreter in Powershell Peter Schneider [MVP] PowerShell 0 04-08-2007 12:06 PM
Brain**** Compiler & Interpreter in Powershell Peter Schneider [MVP] PowerShell 0 04-08-2007 04:14 AM


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com 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 2005-2008