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 PowerShell Scripting
  • Table Of Contents Toc
Mastering PowerShell Scripting

Mastering PowerShell Scripting - Fourth Edition

By : Chris Dent
4 (19)
close
close
Mastering PowerShell Scripting

Mastering PowerShell Scripting

4 (19)
By: Chris Dent

Overview of this book

PowerShell scripts offer a convenient way to automate various tasks, but working with them can be daunting. Mastering PowerShell Scripting takes away the fear and helps you navigate through PowerShell's capabilities.This extensively revised edition includes new chapters on debugging and troubleshooting and creating GUIs (online chapter). Learn the new features of PowerShell 7.1 by working with parameters, objects, and .NET classes from within PowerShell 7.1. This comprehensive guide starts with the basics before moving on to advanced topics, including asynchronous processing, desired state configuration, using more complex scripts and filters, debugging issues, and error-handling techniques. Explore how to efficiently manage substantial amounts of data and interact with other services using PowerShell 7.1. This book will help you to make the most of PowerShell's automation features, using different methods to parse data, manipulate regular expressions, and work with Windows Management Instrumentation (WMI).
Table of Contents (26 chapters)
close
close
24
Other Books You May Enjoy
25
Index

Assignment operators

Assignment operators are used to give values to variables. The assignment operators that are available are as follows:

  • Assign: =
  • Add and assign: +=
  • Subtract and assign: -=
  • Multiply and assign: *=
  • Divide and assign: /=
  • Remainder and assign: %=

As with the arithmetic operators, add and assign may be used with strings, arrays, and hashtables. Multiply and assign may be used with strings and arrays.

Assign, add and assign, and subtract and assign

The assignment operator (=) is used to assign values to variables and properties; for example, it may be used to assign a value to a variable:

$variable = 'some value' 

Or, the PowerShell console window title (or Windows Terminal tab title) might be changed by assigning a new value to the WindowTitle property:

$host.UI.RawUI.WindowTitle = 'PowerShell window' 

The add and assign operator (+=) operates in a similar manner to the...

Visually different images
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 PowerShell Scripting
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options 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