Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Windows PowerShell Scripting
  • Table Of Contents Toc
Mastering Windows PowerShell Scripting

Mastering Windows PowerShell Scripting

By : Brenton J.W. Blawat
4.4 (16)
close
close
Mastering Windows PowerShell Scripting

Mastering Windows PowerShell Scripting

4.4 (16)
By: Brenton J.W. Blawat

Overview of this book

If you are a system administrator who wants to become an expert in controlling and automating your Windows environment, then this book is for you. Prior knowledge of PowerShell's core elements and applications is required for this book.
Table of Contents (16 chapters)
close
close
15
Index

Comparison operator basics

When you are using comparison operators, you are creating expressions that evaluate to either True or False. In programming, this is known as Boolean. In the simplest form, you are asking PowerShell to evaluate similarities or dissimilarities between two items. Based on the findings from that expression, it will return True or False. When the whole expression returns False, PowerShell doesn't continue to process items in the statement. When the whole expression returns True, PowerShell will proceed forward into the statement and execute the code within the statement.

Of the many built-in variables that PowerShell has, there are two built-in Boolean variables. These two variables are $True and $False. When you call $True, it implies that the value is Boolean and is set to True. When you call $False, it implies that the value is Boolean and is set to False.

A script that shows how to use basic comparison operators would look like this:

$TrueVariable = $True
...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Windows PowerShell Scripting
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon