start powershell in the same window with start-process -verb runas

How can I start powershell with admin rights in the same window?
when I do:
start-process powershell -verb runas
it opens in another window.....
I try with -nonewwindow parameter but then I go trough msdn to read more 
about and found that it has a different meaning....
the process run but I can not see it, with get-process I realize that is 
actually running



-- 
Michael Soza
Estudiante Ingenier�a Civil Inform�tica
Universidad de Concepci�n 

0
Michael
2/26/2010 10:20:04 PM
windows.powershell 690 articles. 0 followers. Follow

1 Replies
1972 Views

Similar Articles

[PageSpeed] 58

Start process by definition will spawn a new instance of PowerShell that will 
be in a new window.  I don't think you can do what you are asking
-- 
Richard Siddaway
All scripts are supplied "as is" and with no warranty 
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Michael Soza" wrote:

> How can I start powershell with admin rights in the same window?
> when I do:
> start-process powershell -verb runas
> it opens in another window.....
> I try with -nonewwindow parameter but then I go trough msdn to read more 
> about and found that it has a different meaning....
> the process run but I can not see it, with get-process I realize that is 
> actually running
> 
> 
> 
> -- 
> Michael Soza
> Estudiante Ingeniera Civil Informtica
> Universidad de Concepcin 
> 
0
Utf
2/27/2010 11:24:01 AM
Reply:

Similar Artilces:

Starting up on start-up help!
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Hello all, <br><br>I'm new here so Hello. I just have a question to see if anyone can help here. I just recently bought a new MacBook Pro, and I got the Microsoft Office for it too. Well, I recently noticed that on start up, entourages My Day keeps opening up. Well when I right click the menu, I check off the box where it says to start on login. <br><br>Well here is the problem. Everytime I uncheck it, it still keeps opening up on start up. <br><br>Anyone know why?...

Need advice to start off a project
Hello! I have never really used Excel much but I have had an idea which could make some of the work I do a lot easier. I know Excel is powerful but I don't know the best way to approach it so can anyone out there help me? I make visits to places and record what kind of visit it was on a spreadsheet with the values in each cell being the date. At the bottom there is a summary box which shows, on each date, how many visits I made of each type. At the moment this is done manually but I am sure it can be done automatically only how? On a different sheet I would then like to have a summary of...

Worksheet displays a blank, gray window
When opening an existing Excel spreadsheet, the spreadsheet does not display, but shows only a blank window. I can see the spreadsheet in Full Screen, but when I try to go back to a window view, I can't see it. Only occurs on certain spreadsheets. Others display fine. Once the problem occurs on a spreadsheet, the problem remains constant, i. e., I can't ever display that spreadsheet again. What was changed? Try Window|Arrange|Tiled and resize by hand. It sounds like it's just off the visible screen. David Houston wrote: > > When opening an existing Excel spread...

Input window
I am trying to create a popup window that will allow users to input information and have it transfer to certain fields with the work book. For example: If the user wants to update account information or agent information, all the user has to do is click a button at the top of the page and have the window open up and be filled out. From there the information will be pasted into the appropriate fields in the workbook. I read the discussion threads on popup windows but that only displays a certian message which was helpfu. Any suggestions is greatly appreciated. Mike F. Mike: What yo...

Entourage created multiple Main Idently windows
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: pop When I opened Entourage this morning, there were 118 Main Identity windows. It's very strange,because I did not do this. Each window has a black background border behind it. I have closed all these windows several times, but the application keeps crashing and, when I relaunch it, the same 118 main identity windows are there. On 1/28/10 5:35 PM, in article 59bb1cf6.-1@webcrossing.JaKIaxP2ac0, "sandy189@officeformac.com" <sandy189@officeformac.com> wrote: > When I opened ...

Cannot start Outlook 2002
My computer is usualy connected to an MS Exchange server at work. However I'd like to use Outlook at home with another e-mail account. When I try to start Outlook I get an error message : Cannot connect to exchange server. So I click work offline. Then, get another error message: Cannot start Outlook. Could not open information store. The the program quits. Anyone know a work around? Thanks. Create a new profile for your home account. Then set Outlook to prompt for profile. Select your home profile and Outlook will not try to connect to Exchange. --� Milly Staples [MVP - Outlook...

WINDOWS LIVE MAIL 0x800CCCOF
WINDOWS LIVE MAIL 0x800CCCOF I have used Live Mail for say a year pulling without any problem 3 different yahoo.co.uk email addresses. Recently I keep getting intermittently this error. 0x800CCCOF Sometimes on one account sometimes on 2 sometimes on all three yahoo.co.uk. I do not gett this error when only synchronizing (send/receive) talktalk.net e mail address. If I patiently synchronize (send/receive) several times I will eventually be able to get the messages but it can take many attempts over say 15 minutes. So it is irritating and feels somewhat unreliable. I use the payi...

Exchange Services Do not Start After a Restart #2
I have a SBS 2003 Running and for some reason some of my Exchange Service do not start after a restart. System Attendand tries to start shuts down unexpectedly. I can go to services right after logging in and start the services and they start with no problem. Right before the error that service did not start, I get this warning: "A service process other than the one launched by the Service Control Manager connected when starting the Microsoft Exchange System Attendant service. The Service Control Manager launched process 2448 and process 3688 connected instead. Note that if this se...

Macro or Lookup? Not sure where to start.
I have created two worksheets: 1) Auction Items Item# Table# Location# ItemDescription WinBid are the headers of the data. 2) Bidders Bidder# FirstName LastName I would like to be able to create a macro or something that will allow me to enter the item#, bidder# and winning bid price and have a sheet filled with. ie. Item# 2 (Handcrafted Table) Bidder# 12 (John Doe) Winning Bid $250 Can excel pull from two sheets and created another sheet with all the final details? I am a little new to excel (version 2000) it is the only tool/application available to us at this time. If anyone can poi...

How do I synchronize 3 windows mails
I have Windows Mail built into my Vista, Windows Live Mail built into my program list, and Windows Live Mail accessed through the internet that somehow becomes Bell, which also has Sky Drive. Each gets part of my incoming mail, but only part of it even though they all have the same incoming mail address. When I try to link to an RSS feed my Vista windows mail opens up automatically but I can find no place there to put the link. I also cannot get any newsgroups there. I currently access newsgroups using Windows Live Mail in the programs list. I can put RSS feeds on a lis...

Windows Mobile 5.0 and Money06 client.
Has anyone been able to get the MS Money 2006 client (mnyppc06.exe) to work on Mobile 5.0? I would *love* to be able to get accurate financial info on my mobile device on a whim. The install runs fine, I am prompted on the device for the install, and then it fails with a message on the device, saying the install failed. Am I doomed? Windows Mobile 5 is not supported I am afraid. -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. I do not respond to any emails that I have not specifically asked for. ...

Close various modules/codes windows
Whenever, I open the VBE (Alt+F11) I find most of the code windows already opened and have to close each and everyone by entering Ctrl+F4 and finally opening a single module on which I seek to work upon. Any guidance, help and relevant idea by u experts in this regard shall highly be obliged. -- Thanx in advance, Best Regards, Faraz --How many open VBA projects do you see in Project Explorer? --Check out whether you have any projects getting opened during startup. If so remove them from your Book.xlt in XLSTART XLSTART folder usually located at C:\Documents and Setti...

Remainders Window
When I log into version 9, I see a Remainders window. Is there any way to turn that off? I don't ever want to see it. Thanks! Mary Fetsch Hi Mary. You are referring to Reminders window right? Turn off the Reminder forms security under System series on the Security window for the user that you would lilke the Reminders turned off. ---Darryl Bajaro "Mary Fetsch" wrote: > When I log into version 9, I see a Remainders window. Is there any way to > turn that off? I don't ever want to see it. > > Thanks! > > Mary Fetsch Thanks, Darryl! "Dar...

Problem with scroll bars on Database window?
If I open say a form from the database window, amend it and then save it when I try to scroll the database window the vertical scroll bar doesn't move I have to click on say Reports then go back to Forms and then it moves. The same thing happens in any of the objects in the Database window, if I open close a report the same thing happens. Has anyone else experienced this problem? Tony I've noticed it with several different versions of both Access and Excel. In my case, I just move the window slightly using the mouse and the database becomes responsive again. I think this is m...

Outlook starting problem
"Cannot start Microsoft Outlook. A dialog box is open. Close it and try again." ...

Excel Closing all windows on Alt+F4
Is there anywhy to make it so that excel does not close all excel windows when you press alt+F4? I have often done this and it is very annoying and sometimes does not prompt for you to save changes. Hi that's the purpose of ALT & F4 ... and AFAIK this is one that can't be changed as it's a windows shortcut not excel specific .. however, i'm concerned that you say that Excel sometimes does not prompt you to save changes ?!? ... can you elaborate on this a bit more? Cheers JulieD "Starfltcdrjr" <Starfltcdrjr@discussions.microsoft.com> wrote in messag...

Running CHKDSK at start up
Is there a way to run chkdsk f/r on all five drives on one PC at start up? PC runs Windows XP Pro SP3. This way all drives would be checked and errors fixed, if necessary, in one go, at start up on this machine. We intend to do this on this heavily used PC from time to time - we do not need the desired chkdsk functionality to kick in at every boot! Regards and TIA. Avatar -------- "Avatar" <Avatar@re.birth> wrote in message news:hrb4n2$53i$1@news.eternal-september.org... > Is there a way to run chkdsk f/r on all five drives on one PC at start up? ...

Starting a new paragraph within a cell
How do you create a line break within a cell? For example, if wanting to list 2 or more items it looks better if each one is printed under the other as a list. Or in a comment column when needing to start a new paragraph, again within the cell. Hi. You can press Alt + Enter to create a line break within a cell. Kath firman wrote: > How do you create a line break within a cell? For example, if wanting to list > 2 or more items it looks better if each one is printed under the other as a > list. Or in a comment column when needing to start a new paragraph, again > within th...

How do I add consecutive numbers but start over at a break in the.
add consecutive numbers but start over at a break in them. I'm trying to calculate consecutive days of attendance. ...

Can't Start Any Program
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel It has been two weeks since I can open an Office Program. Please HEEELP! This is my word error report: Microsoft Error Reporting log version: 2.0 Error Signature: Exception: EXC_BAD_ACCESS Date/Time: 2009-09-09 19:04:02 -0400 Application Name: Microsoft Word Application Bundle ID: com.microsoft.Word Application Signature: MSWD Application Version: 12.2.0.090605 Crashed Module Name: CoreFoundation Crashed Module Version: unknown Crashed Module Offset: 0x00075354 Blame Module Name: CoreFoundation Blame Module Version: unk...

CD does not start
After installing XP on a new disk everything appeared normal. I was able to install a few applications from their cds. Then I attempted to install an application from a downloaded file, but it did not work. So I installed MS frame works and windows installer. Then I was able to install the application from the downloaded file. When I attempted to install another application from its cd (with autorun), nothing happened, namely it fail to start. If I force the setup.exe from Explorer, the error message shows up: "the application configuration is incorrect". Thinking for...

To resize the font on the buttons in MFC GUI, Windows CE
I have a GUI written in MFC for a Windows CE device. However I need to resize some of the buttons and their corresponding text. I can't figure out how to change font size. The following code fragments did not help: Trial 1: *CFont fnt2; fnt2.CreateFont(10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, L"MS Shell Dlg"); m_btnForceAnalog.SetFont(&fnt2); fnt2.Detach(); Trial 2: LOGFONT lf; memset(&lf,0,sizeof(LOGFONT)); lf.lfHeight = 5; // Request a 100-pixel-height font // D...

Money 2007 tries to update on each start
On each start up, Money 2007 advises that in order to run properly an update to Money 2007 is necessary. When I click OK it downloads files and again I click to start the upgrade. After a few minutes the update completes and a dialog box advises that I should restart Money and if it will not open properly I should restart my computer. I do so and all seems to be OK, but on starting money the update dialog box is back. I checked the Money folder and the update log shows that the update completed. So how do I stop the annoying update dialog box from displaying on each start? "GWL&qu...

Get login name using email address with Powershell
Hi, I have the email address of 150 user with their email address in an excel sheet that I need to get their windows login name using Powershell Help please Hello Clarkent83, > Hi, > > I have the email address of 150 user with their email address in an > excel sheet that I need to get their windows login name using > Powershell > > Help please > If it's a csv file with one email address per line, and you have Exchange 2007 or 2010: $users = Import-Csv <csv file> $outUsers = @() Foreach ($user in $users) { $outUsers += Get-M...

Outlook 2007 won't start, message, can't start microsoft office o.
I run Windows 7 and Outlook 2007 just quit working. The error message is: Cannot start Microsoft Office Outlook. Cannot open the Outlook window. I have had a similar problem because I keep my pst file on a network share so I can use it with my roaming profile, and sometimes the network share goes awol.... To reset the outlook window run 'outlook.exe /resetnavpane' at the command prompt. "Tony Wybrow" wrote: > I run Windows 7 and Outlook 2007 just quit working. The error message is: > Cannot start Microsoft Office Outlook. Cannot open the Outlook w...