• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Hiding output in powershell?

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2007] >> Management >> Hiding output in powershell? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Hiding output in powershell? - 21.Apr.2009 5:04:20 PM   
vishnu_cute05

 

Posts: 12
Joined: 25.Mar.2009
Status: offline
Hi,
  How to hide the output in powershell?? for eg.. if i run new-mailbox and complete the cmdlet it finally gives output.. i want to hide it from the console.
To hide errors we can use $erroractionpreference="silently continue".In the similiar way is there any way to hide output.
Post #: 1
RE: Hiding output in powershell? - 21.Apr.2009 5:16:46 PM   
alaa_elmahdy

 

Posts: 10
Joined: 27.Aug.2008
Status: offline
Hello,

To do so you need to use VBS .

Check this

Http://blog.integrii.net/?p=45

And this

Http://blog.sapien.com/index.php/2006/12/26/more-fun-with-scheduled-powershell/

Thanks
Alaa Elmahdy

(in reply to vishnu_cute05)
Post #: 2
RE: Hiding output in powershell? - 22.Apr.2009 2:35:50 AM   
ShayL

 

Posts: 6
Joined: 18.May2008
Status: offline
You can supress command output by:

1. cast the command to void:
  [void] (new-mailbox ...)

2. Assign the command to null (fastest):
 $null = new-mailbox ...

3. Pipe the command to out-null
  new-mailbox ... | out-null

_____________________________

Shay Levy
Windows PowerShell MVP
http://PowerShay.com
PowerShell Toolbar: http://tinyurl.com/PSToolbar
Twitter: http://twitter.com/ShayLevy

(in reply to vishnu_cute05)
Post #: 3
RE: Hiding output in powershell? - 22.Apr.2009 12:38:42 PM   
vishnu_cute05

 

Posts: 12
Joined: 25.Mar.2009
Status: offline
Thanks a lot shayl..

(in reply to ShayL)
Post #: 4
RE: Hiding output in powershell? - 22.Apr.2009 1:50:49 PM   
alaa_elmahdy

 

Posts: 10
Joined: 27.Aug.2008
Status: offline
thanks shay realy good ,was searching for alternate solution for the vbs.

(in reply to vishnu_cute05)
Post #: 5

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2007] >> Management >> Hiding output in powershell? Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter