Results 1 to 4 of 4

Thread: Powershell using if statement with not?

  1. #1
    Join Date
    Jun 2008
    Posts
    97

    Powershell using if statement with not?

    Hi,
    I want to know if we can use the if statement with the not operator in windows Powershell.

  2. #2
    Join Date
    May 2008
    Posts
    32

    Re: Powershell using if statement with not?


  3. #3
    Join Date
    May 2008
    Posts
    19

    Re: Powershell using if statement with not?

    Here is what you want to do with If statement & not operator!

    http://blog.flaphead.dns2go.com/arch...8/14/3509.aspx

    Hope this helps!

  4. #4
    Join Date
    May 2008
    Posts
    115

    Re: Powershell using if statement with not?

    btw... when your using if() blocks it ALWAYS evaulates to $true or $false...
    if $true then {} happens. if $false the Else{} happens. You dont need -eq

    so
    if($result){"it was true"}else{"it was false"}

Similar Threads

  1. What is Windows PowerShell
    By Antonio1 in forum Windows Software
    Replies: 3
    Last Post: 12-11-2009, 06:30 PM
  2. Unable to download powershell 1.0
    By dnice in forum Operating Systems
    Replies: 3
    Last Post: 26-06-2009, 01:18 PM
  3. Replies: 4
    Last Post: 25-02-2009, 08:52 PM
  4. Powershell zip or unzipp files?
    By Halloween in forum Operating Systems
    Replies: 4
    Last Post: 17-02-2009, 09:29 PM
  5. Create a script using Powershell
    By Connect_Me in forum Software Development
    Replies: 4
    Last Post: 07-02-2009, 05:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,271,569.76507 seconds with 17 queries