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

commenting lines

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-09-2007   #1 (permalink)
IT Staff
Guest


 

commenting lines

What is the special character to comment out lines ?

in *.vbs , the comment line is '

so what is for *.ps1 ?



My System SpecsSystem Spec
Old 01-09-2007   #2 (permalink)
Keith Hill [MVP]
Guest


 

Re: commenting lines


"IT Staff" <jkklim@hotmail.com> wrote in message
news:%23zfLShGNHHA.536@TK2MSFTNGP02.phx.gbl...
> What is the special character to comment out lines ?
>
> in *.vbs , the comment line is '
>
> so what is for *.ps1 ?


It is the # character - comments out until end of line.

--
Keith


My System SpecsSystem Spec
Old 01-10-2007   #3 (permalink)
RichS
Guest


 

RE: commenting lines

There isn't a way to comment a block of lines directly in PowerShell - need
to use a here string. See the post "Commenting out a Block"

--
Richard Siddaway

Please note that all scripts are supplied "as is" and with no warranty


"IT Staff" wrote:

> What is the special character to comment out lines ?
>
> in *.vbs , the comment line is '
>
> so what is for *.ps1 ?
>
>
>

My System SpecsSystem Spec
Old 01-10-2007   #4 (permalink)
Sung M Kim
Guest


 

RE: commenting lines

"IT Staff" wrote:

> What is the special character to comment out lines ?
>
> in *.vbs , the comment line is '
>
> so what is for *.ps1 ?


As other has mentioned, comment character is "#" but it's just for
commenting out oneline.

There is no block comment characters in PowerShell v.1.0
but there is a useful Newsgroup post for a walk-around.

http://www.microsoft.com/communities...1-21b2f3bf21a7



My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
XPS PRinting and Commenting Similar to PDF Abilities Mills Architect Vista print fax & scan 0 04-24-2007 12:26 AM
Lines on Emails David Williams Vista mail 2 02-28-2007 09:19 AM
Commenting out a block John Smith PowerShell 5 12-29-2006 08:20 AM
Lines! ta Vista hardware & devices 2 07-04-2006 01:21 PM
treeview with lines Benoist.Demeure Avalon 0 03-14-2006 07:29 AM


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

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 47 48 49 50 51