Index

Symbols

$Error variable 694, 695

-and operator 109

-as operator 116

*-Csv commands 226, 227

-isnot operator 117

-is operator 117

-join operator 125

.NET Regex type 262, 264

-not (or !) operator 110

-or operator 109

-replace operator 106, 107

-Skip command

using 659

-split operator 107, 108

-xor operator 109

A

Abstract Syntax Tree (AST) 225, 634

searching 641, 642, 643

using 638, 639, 640

visualizing 640, 641

acceptance testing

performing, considerations 650

access 286

Access Control Entries (ACEs) 287

adding 292

filesystem rights 292, 293

registry rights 293, 294

removing 290, 291

access control entry (ACE)

adding 326, 327

Access Control Lists (ACLs) 286

numeric values 294, 295

access mask 290

access modifier 62

Action parameter 437, 438, 439

Adapted Type System (ATS) 60

add and assign operator (+=) 98

addition operators 94

Add-Member command 65

Alias attribute 505

aliases 16, 17, 18

alternation 255

restricting 256

anchors 247, 248

any character (.) 243

argument completers 553, 554

Argument Completer attribute 554, 555

Register-ArgumentCompleter, using 555, 556

registered argument completers, listing 557

ArgumentTypeConverterAttribute type 208, 209, 210, 211

arithmetic operators 93, 94

precedence 94

array 147

clearing 154

creating 148

elements, adding 149, 150

elements, removing 152

elements, removing by index 153, 154

elements, removing by value 154

elements, selecting 150, 151

element value, changing 152

jagged arrays 155, 156

multi-dimensional arrays 155, 156

variables, filling 155

with type 148, 149

array operator

used, for breaking up lines 517, 518

array parameter 174

arrays 223

assembly 188, 189, 190

assertions 652, 653

reference link 652

assign and divide operator 99

assignment operators 97

add and assign operator (+=) 98

assign 97

multiply and assign operator 99

subtract and assign operator (-=) 99

ASSOCIATORS OF

using 317, 318

ATS and ETS, Microsoft

reference link 61

audit 287

authentication

working with 380

B

background operator 432

background operators 129, 130

badssl site

URL 371

Base64 230

working with 230, 231

begin block 507

BeginInvoke methods 440, 442

binary and (-band) operator 111

binary exclusive or (-bxor) operator 112

binary not (-bnot) operator 112, 113

binary operators 110

binary and (-band) operator 111

binary exclusive or (-bxor) operator 112

binary not (-bnot) operator 112

binary or (-bor) operator 111

shift left (-shl) operator 113, 114, 115

shift right (-shr) operator 113, 114, 115

binary or (-bor) operator 111

bit field 283

Boolean 185, 186

break keyword 177, 178, 182

avoiding in loop 183, 184

breakpoints 726

built-in help system, PowerShell 5

About_* help files 14

Get-Help command 7

Save-Help command 11, 12

updatable help 6, 7

updatable help, supporting modules 6

Update-Help command 13

Byte-Order Mark (BOM) 119

URL 119

C

call operator (&) 122

Cascading Style Sheet (CSS) 335

reference link 335

casting

supporting 589, 590, 591

casting, to Void

example 515

catch block 695, 696, 697

nesting 707, 708

CertificatePolicy property 373

certificate provider 32

certificates

formatting 273, 274

chaining method 224, 225

chain of trust 372

character class 250

character class subtraction 253

negated character class 252

ranges 251, 252

shorthand character classes 253

Unicode category class 253, 254

character class subtraction 253

chocolatey

URL 55

Chocolatey Server

reference link 617

Chocolatey.Server package 55

CIM objects

mocking 674, 675, 676

CIM sessions 422

Get-CimSession 423

New-CimSession 422

using 423

class 193

constructors 576, 577, 578

creating 575

Hidden modifier 580

methods 578, 579

properties 576

Static modifier 580, 581

classes 627

classes, for implementing parameter 592

argument-transformation attribute classes 592, 593, 594

ValidateSet, classes 598, 599

validation attribute classes 594

cleanup block 506, 509, 510, 511

closures 495

CmdletBinding attribute 498, 499

common parameters 499

properties 500

ShouldContinue method 501, 503, 504, 505

ShouldProcess method 500, 501, 502, 503

cmdlet development guidelines, PowerShell

reference link 492

command breakpoint

setting 726, 727, 728

commands

discovering 16

mocking 661, 662, 663

commands, mocking 661, 662, 663

parameters, filtering 664, 665

comma operator 123

comma-separated value (CSV) 226

Comma-Separated Value (CSV) files 88

comment-based help 518, 519

Common Information Model (CIM) 422

Common Information Model (CIM) cmdlets 305

associated classes 312

classes, obtaining 306

instances, creating 309, 310

instances, obtaining 305, 306

methods, calling 307, 308, 309

properties 304

working, with sessions 310, 311

community-created PowerShell Practice and Style repository

reference link 492

Compare-Object command 84, 85, 86

comparing 84

comparison operators

and arrays 101

case sensitivity 101

-contains 104

equal to (-eq) 102

greater than (-gt) 103

-in 104

less than (-lt) 103

-like operator 103

not equal to (-ne) 102

-notlike operator 103

null value 101

using 100

conditional parameters 564, 565

conditional testing

about 657

Set-ItResult command, using 658

-Skip command, using 659

Confirm 25, 26, 27, 28

ConfirmPreference 25, 26, 27, 28

constructor 197, 198, 199

Contains method 222

Context keyword

tests, describing with 652

continue keyword 177, 178, 183

avoiding in loop 183, 184

using 709, 710

ConvertFrom-Csv command 89

ConvertFrom-Json command 363, 364

AsHashtable 365, 366

NoEnumerate 366

ConvertFrom-String command 229

ConvertFrom-StringData command 227

converting 86

Convert-String command 228

ConvertTo-Csv command 87, 88

ConvertTo-Html command 333, 334, 336

ConvertTo-Json command 360, 361

AsArray 362

EnumsAsStrings 362

EscapeHandling 362

ConvertTo-XML command 342

C Sharp (C#) programming guide

reference link 197

current script 689, 701

custom script analyzer rules

AST-based rules 645, 646

custom rule, creating 645

token-based rules 647, 648

D

Data Protection API (DPAPI) 91

dates

comparing 239

modifying 235, 236, 237, 238

parsing 234, 235

dates and times

manipulating 234

DateTime parameters 238, 239

Debuggex

URL 246

debugging 713

in console 726

in Visual Studio Code 730

debugging, in Visual Studio Code 730

call stack, viewing 733, 734

debugger, using 731, 732

launch configurations, launching 734, 736, 737

WATCH window, using 737, 738

decrement operator (--) 124

default values 497

Describe keyword

tests, describing with 652

Desired State Configuration (DSC) 334, 599, 600

development strategies 713

discretionary access control list (DACL) 325

Discretionary Access Control List (DACL) 286

Dispatcher

using 485, 486, 487, 488

Distributed Component Object Model (DCOM) 304

Distributed Management Task Force (DMTF) 304

division operator 96

DockPanel control

using 463, 464, 465, 466

Document Type Definition (DTD) 337, 339

Domain-Specific Language 648

Domain-Specific Language (DSL) 334

DontShow property 527, 528

double-hop problem 420

credentials, passing 421

CredSSP 421

do until loop 181

do while loop 181

drive letters

functions 34

drives 33, 34, 279

DSC resources 622, 624

Dynamic Link Library (DLL) 46

dynamicparam block 506

dynamic parameters

about 558, 559

RuntimeDefinedParameterDictionary, using 561

RuntimeDefinedParameter object, creating 559, 560, 561

using 561, 562, 564

E

elseif statement 172

else statement 172

end block 508, 509

EndInvoke method 442, 443

EndsWith method 222

Enter-PSSession command 413

entries

copying 291

enumerating 66

enumeration 192, 627

automatic value assignment 569, 570

defining 567, 568

enum 568, 569

Flags attribute 571, 572, 573, 574

underlying types 568, 569

using, to convert value 574, 575

ValidateSet 570

enumerations 627

ErrorAction 704, 705, 706

error actions 686, 687

Get-Error command 688

errors

catching 694

inconsistent handling 701, 703

raising 689

records 689, 690

rethrowing 698, 699, 700, 701

testing for 653, 654, 655

error types 683

non-terminating error 684

terminating error 685, 686

escape character () 244, 245

EventArgs parameter 437, 438, 439

Event commands 435, 436

event handling 472, 473

buttons and click event 474, 475

ComboBox and SelectionChanged 476

elements programmatically, adding 476, 477, 478

ListView, sorting 478, 480, 482

Event parameter 437, 438, 439

events

reacting to 434

existing items

testing 280

Export-Clixml command 90

Export-Csv command 86, 87, 88

exporting 86

Export-PSSession 414

Extended Type System (ETS) 60

Extensible Application Markup Language (XAML) 454, 455

Extensible Markup Language (XML) 337

attributes 338

ConvertTo-XML command 342

elements 338

namespaces 338

schemas 339

Select-Xml command 339, 340

F

file attributes

adding 283, 284, 285

removing 283, 284, 285

file catalog commands 297

New-FileCatalog command 298

Test-FileCatalog command 298, 299, 300, 301

File Integrity Monitoring (FIM) 297

file parameter 174

filesystem 283

filesystem rights 292, 293

filtering 66

finally block 695, 696, 697

nesting 707, 708

Find-Module command 51

fluent interface 202, 203

force parameter 29, 30

foreach loop 178, 179

ForEach-Object command 66, 67

Begin parameter 67

End parameter 67

MemberName parameter 70

Parallel parameter 68, 69

positional parameters 68

ForEach parameter

using 657

for loop 179, 180, 181

format (-f) operator 123, 124

functions 493

G

Get

implementing 601

Get-Command 9

Get-Content command 377

Get-Error command 688

Get-EventSubscriber command 436

Get-Help

examples 521, 522

Get-Help command 7, 8

Detailed switch parameter 10

examples 9

Full switch parameter 11

parameters 10

syntax 8, 9

Get-Item command 278

Get-ItemProperty 283

Get-Job command

using 428, 429

Get-Member command 60

Get method

implementing 601

Get-Module command 44

Get-PSSession command

using 408, 409

Get-Unique 75

Get-WSManInstance 399

Global Assembly Cache (GAC) 190

greedy quantifier 249

Grid control

using 458, 459, 460, 461

grouping 79, 255

Group-Object command 79, 80, 81, 82

groups

named capture groups 258, 259

non-capturing groups 260, 261

purpose 255

repeating 256

H

hard link 281

hashing 297

Hashtables 156

creating 157

elements, adding 157, 158, 159

elements, changing 157, 158, 159

elements, removing from 160

elements, selecting 159

enumerating 160

HelpMessage property 529

HTML 333

ConvertTo-Html command 334

multiple tables 334

special characters 336, 337

style, adding 335

HTTP over Secure Sockets Layer (SSL) 371

Hypertext Transfer Protocol (HTTP) 370

methods 370

I

IComparable interface

implementing 586, 587, 588, 589

if statement 172

assignment 172

Import-Clixml command 90, 91

Import-Csv command 88

Import-Module command 45

importng 86

Import-PSSession 413

Import-Xaml function 483

increment operator (++) 124

IndexOf method 219, 220

inheritance

about 581, 582

and constructors 582, 583, 584

methods, calling in parent class 585

inheritance flags 289

InitialSessionState object 446, 447

functions, adding 449

snap-ins, adding 447

using 449

variables, adding 447, 448

InModuleScope command 677, 678

InputObject variable 544, 545

input pipeline 542

input validation

about 530

PSReference parameters 541, 542

PSTypeName attribute, using 530, 531, 532

Insert method 219

Install-Module command 51

interfaces

working with 585

Internet Information Services (IIS) 55

Invoke-Command

AsJob parameter 411

Disconnected sessions 411, 412

local functions and remote sessions 410

splatting, using with ArgumentList 410, 411

using 409

using variable scope 412

Invoke methods 440, 442

Invoke-RestMethod command 375

Invoke-WebRequest 370, 371

IP addresses 268, 269, 270

IsReadOnly property 283

item properties 283

Get-ItemProperty 283

IsReadOnly property 283

Set-ItemProperty 283

items 280

creating 281, 282

deleting 281, 282

invoking 282

iteration, with Pester

ForEach parameter, using 657

styles 655

TestCases parameter, using 655, 656

It keyword

using 652

J

JavaScript Object Notation (JSON) 360, 367

ConvertFrom-Json command 363, 364

ConvertTo-Json command 360, 361

JEA documentation

reference link 424

jobs 431

batching 433, 434

working with 427, 428

JSON serialization 361

junction link 281

Just Enough Administration (JEA) 424

role capabilities 426

session configuration file 424, 425

L

label 184, 185

Language Integrated Query (LINQ) 354

large byte values 231, 232

LastIndexOf method 219, 220

Last-In, First-Out (LIFO) 168

layout 457

DockPanel control, using 463, 465, 466

Grid control, using 458, 459, 460, 461

Margin 466, 468

Padding 466, 468

StackPanel control, using 461, 463

lazy quantifier 249

line break

adding, after operator 516

adding, after pipe 516

line breakpoint

setting 729, 730

LINQ to XML

namespaces 356, 357

lists

copying 291

literal characters 242

Local Configuration Manager (LCM) 605

locating elements 468, 469, 470, 471, 472

logical operators

about 109

-and operator 109

-not (or !) operator 110

-or operator 109

-xor operator 109

long lines

working with 516

look-ahead 261

look-behind 261

loop 178

break keyword 182

continue keyword 183

foreach loop 178, 179

for loop 179, 180

while loop 182

loops

do until loop 181

do while loop 181

M

Margin 466, 468

match operator 105, 106

MD5 hashing 297

Measure-Object command 79, 82, 83, 84

measuring 79

Media Access Control (MAC) addresses 267, 268

members 60, 197

constructor 197, 198, 199

methods 201, 202

properties 199, 200

static methods 203, 204

static properties 205, 206

member types, MSDN

reference link 60

MessageData parameter 437, 438, 439

methods 201, 202

using 63, 64

methods, HTTP 1.1 specification

reference link 370

mocking

using 661

Mock keyword 661

mocks

overriding 665, 666, 667

module

creating 610

Export-ModuleMember command, using 611, 612, 613, 614

publishing, with Publish-Module command 617, 618

root module 610, 611

ModuleBuilder 622, 624

module content

dot sourcing 620, 621

merging 621, 622

module manifests

about 614, 615

Test-ModuleManifest 616

Update-ModuleManifest command 616, 617

modules 44

finding 49

Get-Module command 44, 45

Import-Module command 45

initializing 628, 629

installing 49

Remove-Module command 46

removing 628, 629

module scope

about 624

accessing 625, 626

multi-file module layout 619

multiple instances

running 444

multiplication operator 96

multiply and assign operator 99

N

named block 511

named blocks

code, placing outside 719, 720

pipeline, without process 721

using 719

named capture groups 258, 259

namespace 193

naming elements 468, 469, 470, 471, 472

negated character class 252

nesting functions 494, 495

netstat command 270, 272, 273

New-FileCatalog command 298

New-PSSession command

using 408

New-WebServiceProxy command 386

Nexus OSS

reference link 617

non-capturing groups 260, 261

non-local commands

mocking 667, 668, 669

Non-local scoped variables 140

non-standard output 58

non-terminating errors 684, 685

raising 690, 691

raising, with WriteError method 692

notmatch operator 105, 106

nouns 15

NtfsSecurity module 286

NuGet repositories 55

null

output, assigning to 514

statement, assigning to 514

null coalescing assignment operator 127

null coalescing operator 125, 126

null conditional operator 127, 128

null input

accepting 543, 544

numbers

manipulating 231

numeric scopes 141, 142, 143

numeric values

in Access Control Lists (ACLs) 294, 295

O

OAuth 382

access token, requesting 384

application, creating 382

authorization code, obtaining 382

browser issues 383

HTTP listener, implementing 383, 384

token, using 384

object pipeline 59, 60

object properties

accessing 61

objects

mocking 670

objects, mocking

methods, adding to PSCustomObject 670, 671

.NET types, disarming 671, 672, 673, 674

OnRemove event 630, 631

operator usage 716

assignment, instead of equality 716

negated array comparisons 718

-or, using 717

Out-Null command 513, 514

output

assigning, to null 514

managing 512, 513

Out-String command 336

ownership 295, 296

P

Padding 466, 468

PadLeft options 220, 221

PadRight options 220, 221

paging

working with 378, 379, 380

param block 496

Parameter attribute

about 523, 524, 525

DontShow property 527, 528

HelpMessage property 529

position 525, 526, 527

positional binding 525, 527

ValueFromRemainingArguments property 528

parameter filters

applying 664, 665

parameter help 520, 521

parameters 18, 496

common parameters 23, 24

Confirm 24

cross-referencing 498

mandatory parameters 19

mandatory positional parameters 19

optional parameters 18, 19

optional positional parameters 19

sets 22, 23

switch parameters 20

values 21, 22

WhatIf 24

parameter set 8

parameter sets

defining 550, 552, 553

parameter types 496

parser modes 39

argument modes 39

expression modes 39, 40

parsing 370

PassThru parameter 30

permissions, in WMI

access control entry (ACE), adding 326, 327

security descriptor, obtaining 324, 325, 326

security descriptor, setting 327, 328

shared directory, creating 323

sharing 323

working with 323

Pester

AfterAll block 661

AfterEach block 661

assertions 652

BeforeAll block 661

BeforeEach block 661

Discovery phase 659

phases 659, 660

Run phase 659

testing methodologies 650

testing with 648, 649, 650

using, for iteration 655

using, in scripts 678, 679

pipeline 58

pipeline chain operators 128, 129

positive look-ahead 261, 262

power 627

power of 10 232

PowerShell 3

ArgumentTypeConverterAttribute type 208, 209, 210, 211

built-in help system 5

command naming 15

editors 3, 4, 5

PSModulePath 47

Reflection in 206

TypeAccelerators type 207, 208

PowerShell 7

experimental features 40, 41

Windows PowerShell modules, using in 48, 49

PowerShell classes 627

PowerShell development

issues 714

PowerShell development, issues

dash characters 714, 715

issue, with variables 721

named blocks usage 719

operator usage 716

PowerShell Gallery 49, 50

reference link 50

PowerShellGet

installation link 50

PowerShellGet 3.0 52, 53

repositories 53

version ranges 54

PowerShell instance

creating 439, 440

PowerShell remoting

enabling 398

on Linux 414, 415

over SSH 415

PowerShell remoting and permissions 402

by script 403, 404, 406

GUI, using 402, 403

PowerShell remoting, over SSH

connecting, from Linux to Windows 417, 419, 420

connecting, from Windows to Linux 416, 417

PowerShell Remoting Protocol (PSRP) package 397

PowerShell repositories 54

print working directory (PWD) 277

private functions 611

private variables 143

process block 507

ProGe

reference link 617

propagation flags 289

properties 199, 200

property set 76

providers 31, 32

creating 280

drives 279

Get-Item command 278

in operating systems 30

navigating 277, 278

Windows-specific providers 31

working with 275, 276

PSDataCollection object 442, 443

PSKoans module

reference link 225

PSLocal repository

removing 618

PSMemberTypes Enum

reference link 197

PSModulePath

in PowerShell 46, 47

PSScriptAnalyzer module 492, 493

configurable rules 635, 636

suppressing rules 636, 637

using 634, 635

PSScriptAnalyzer repository instructions, for suppressing rules

reference link 493

PSSessions 408

Enter-PSSession command 413

Export-PSSession 413

Get-PSSession command, using 408, 409

Import-PSSession 413

Invoke-Command, using 409

items, copying between sessions 414

New-PSSession command, using 408

PSTypeName attribute

using 546

public functions 611

Publish-Module command

used, for publishing module 617

Q

quantifiers 244, 248, 249, 250

greedy quantifier 249

lazy quantifier 249

R

ranges 251, 252

Receive-Job command

using, to retrieve data from job 429

redirection operators 117

streams, redirecting to standard output 120

used, for redirecting output to null 121

used, for redirecting to file 118, 120

redirection, to null

example 514

Reflection 206

in PowerShell 206

regex parameter 175

Register-ObjectEvent 435, 436

registry rights 293, 294

registry values

manipulating 285

regular expression-based operators 104

match operator 105, 106

notmatch operator 105, 106

-replace operator 106, 107

-split operator 107, 108

regular expression (regex)

any character (.) 243

basics 241, 242

characters 242

debugging 246

escape character () 244, 245

literal characters 242, 243

non-printable characters 246

operators 242

optional characters 246

options 265, 266

quantifiers 244

reference link 247

regular expression (regex), examples 267

certificates, formatting 273, 274

IP addresses 268, 269, 270

MAC addresses 267, 268

netstat command 270, 272, 273

remainder operator 97

Remove-Job command

using 428, 429

Remove method 219

Remove-Module command 46

Replace method 217

Representational State Transfer (REST)

authentication 380

basic authentication, using 381

Invoke-RestMethod command 375

paging 378, 379, 380

requests, with arguments 376, 377, 378

simple requests 375, 376

working with 375

Requires statement 494

reserved characters 124

reserved variables 725, 726

resource

using 603, 604, 605, 606

responsive interfaces 482, 483

Dispatcher, using 485, 486, 487, 488

Import-Xaml function 483

Runspace 483

return keyword 511, 512

role capabilities 426

root module 610

rule protection 287, 288

Runspace 483

RunspacePool object

using 444, 446

RunspacePool objects

using 449

runspace pools

using 439

runspaces

using 439

Runspace-synchronized objects

using 450, 451

S

Save-Module command 52

scope modifier

using 431

scope modifiers 140

scopes

and variables 138, 139

script block 495

script block cases 175, 176

script blocks 493

scripts 493

nesting functions 494

Requires statement 494

using statements 493, 494

ScriptsToProcess property 629, 630

security descriptor definition language (SDDL) 329, 330, 331

selecting 71

Select-Object command 71

calculated properties 72, 73

ExpandProperty parameter 74

property sets 76

Unique parameter 75, 76

Select-Xml command 339

namespaces 340, 341

Send-MailMessage command 336

session configuration file 424, 425

Set-ItemProperty 283

Set-ItResult command

using 658

Set method

implementing 602

Set-WSManQuickConfig 400, 401, 402

SHA1 297

shift left (-shl) operator 113, 114, 115

shift right (-shr) operator 113, 114, 115

shorthand character classes 253

Should keyword

using 652

side-by-side versioning 618, 619

Simple Object Access Protocol (SOAP) 398

working with 385

SMB repository

creating 54

snap-ins 55

SOAP, in PowerShell 7 391

enumerations, discovering 391, 392

methods, discovering 391, 392

methods, executing 393, 394, 395

WSDL document, obtaining 391

SOAP, in Windows PowerShell 386

methods 386, 387

methods, and enumerations 387, 388, 389

methods, and SOAP objects 389

New-WebServiceProxy command 386

services, overlapping 390

SOAP service

finding 385

Software Development Kits (SDKs) 190

software testing

URL 650

sorting 71

Sort-Object command 71, 76, 77, 78, 79, 89

splatting 34

and positional parameters 38, 39

conditional use, of parameters 37

used, for avoiding long lines 35, 36, 37

used, for avoiding repetition 38

using 35

Split method 215, 216, 217

SSL errors

bypassing, in Windows PowerShell 372

capturing 373, 375

StackPanel control

using 461, 462

standard output (stdout) 58

Start-Job command

using 428, 429

StartsWith method 222

statement

assigning, to null 514

static analysis 633, 634

custom script analyzer rules 644

PSScriptAnalyzer module, using 634, 635

tokenizer 644

static methods 203, 204

new method 204, 205

static properties 205, 206

streams 58

StringBuilder type, methods

reference link 201

string method 222, 224

strings

Base64, working with 230, 231

chaining method 224, 225

Contains method 222

ConvertFrom-String command 229

ConvertFrom-StringData command 227, 228

converting 226

converting, into numeric values 233

Convert-String command 228

*-Csv commands 226, 227

EndsWith method 222

indexing into 214

IndexOf method 219, 220

Insert method 219

LastIndexOf method 219, 220

manipulating 213

PadLeft options 220, 221

PadRight options 220, 221

Remove method 219

Replace method 217, 218

Split method 215, 216, 217

StartsWith method 222

Substring method 214, 215

ToLower method 221

ToTitleCase method 221

ToUpper method 221

TrimEnd method 218

Trim method 218

TrimStart method 218

Structured Query Language (SQL) 312

style 492, 493

Substring method 214, 215

subtract and assign operator (-=) 99

subtraction operators 94, 95

switch statement 173

array parameter 174

break keyword 177, 178

continue keyword 177, 178

file parameter 174

regex parameter 175

script block cases 175, 176

wildcard parameter 175

symbolic link 281

System Access Control List (SACL) 287

System.Collections.Generic.Dictionary 164

creating 164

elements, adding 165

elements, changing 165

elements, removing 167

elements, selecting 166

enumerating 166

System.Collections.Generic.List 161, 162

creating 162

elements, adding 162

elements, removing 164

elements, selecting 162, 163, 164

element values, changing 164

System.Collections.Generic.Queue 167

creating 167

elements, adding 167

elements, elements 168

enumerating 167

System.Collections.Generic.Stack 168

creating 168

elements, adding 169

elements, removing 169

enumerating 168, 169

System.Math

using 232

System.Xml.Linq namespace 354

attribute values, modifying 357, 358

documents, creating 355, 356

documents, opening 354

element, modifying 357, 358

nodes, adding 358

nodes, removing 359

nodes, selecting 355

schema validation 359

System.Xml namespace 342

T

target type 145

Tee-Object command 91

terminating errors 685, 686

raising 693

raising, with ThrowTerminatingError method 693, 694

ternary operator 125

TestCases parameter

using 655, 656

Test-Driven Development (TDD) 633

Test-FileCatalog command 298, 299, 300, 301

Test method

implementing 602

tests

describing 651

describing, with Context keyword 651

describing, with Describe keyword 651

ThreadJob module 432

throw keyword 704, 705, 706

ThrowTerminatingError method

using 693, 694

ToLower method 221

ToTitleCase method 221

ToUpper method 221

transaction 296, 297

trap

about 708

using 708, 709

TrimEnd method 218

Trim method 218

TrimStart method 218

trusted hosts 407

try block 695, 696, 697

nesting 707, 708

type 191

type accelerator 196, 197

TypeAccelerators type 207, 208

type conversion 143, 144, 145, 146

typed numeric values 146, 147

type operators 116

-as operator 116

-isnot operator 116, 117

-is operator 116

types 144, 145, 146

U

Unicode categories, documented on Microsoft Docs

reference link 254

Unicode category class 253, 254

Uniform Resource Identifier (URI) 341, 375

unit test 633

unit testing

performing, considerations 651

Unregister-Event commands 436

Update-Module command 52

UseBasicParsing parameter 370

User Account Control (UAC) 406

User Interfaces (UI)

designing 454

displaying 455, 456, 457

using assembly 195, 196

using keyword 194

using module 628

using namespace 194, 195

using statements 493, 494

V

validation attribute classes 594

ValidateArgumentsAttribute 595, 596

ValidateEnumeratedArgumentsAttribute 596, 598

validation attributes

about 532

Allow attributes 540

AllowEmptyCollection attribute 540

AllowEmptyString attribute 540

AllowNull attribute 540

ValidateCount attribute 534

ValidateDrive attribute 534

ValidateLength attribute 535

ValidateNotNull attribute 533

ValidateNotNullOrEmpty attribute 533

ValidatePattern attribute 536, 537

ValidateRange attribute 537

ValidateScript attribute 538

ValidateSet attribute 539

ValidateUserDrive attribute 535

ValueFromPipeline 542, 543

using, for multiple parameters 545, 546

ValueFromPipelineByPropertyName 547, 548, 549

ValueFromRemainingArguments property 528

values

capturing 257, 258

variable breakpoints

using 728, 729

variable commands 134

Clear-Variable command 135

Get-Variable command 135

New-Variable command 136

Remove-Variable command 136

Set-Variable command 137

variable issues 722

strict mode 722, 723, 724

variable provider 137, 138

variables 724

accessing 139, 140

creating 132, 133

naming 132, 133

objects assigned 133, 134

statements, assigning to 100

type, assigning 724

verbs 15

reference link 15

Visual Studio Code (VS Code) 3

Extension installer 4

reference link 3

W

Wait-Job command 430

web requests 370

HTTP methods 370, 371

HTTPS 371

Web Services Description Language (WSDL) 391

WhatIf 28, 29

WhatIfPreference 28, 29

Where-Object command 67, 70

while loop 182

wildcard parameter 175

Windows Management Instrumentation (WMI) 329, 330, 331

classes 304

commands 304

working with 303

Windows permissions 286

access 286

Access Control Entries (ACEs), removing 290, 291

audit 287

entries, copying 291

inheritance flags 289

lists, copying 291

propagation flags 289

rule protection 287, 288

Windows PowerShell

SSL errors, bypassing 372

Windows PowerShell modules

using, in PowerShell 7 48, 49

Windows Presentation Foundation (WPF) 454

Windows remoting

and SSL 399, 400

WMI cmdlets

properties 304

WMI permissions 328

access mask 328, 329

security descriptor, obtaining 328

WMI Query Language (WQL) 312

associated classes 316

ASSOCIATORS OF, using 317, 318

comparison operators 314

FROM parameter 313

logic operators 314

object paths 317

SELECT parameter 313

sequences and wildcards character, escaping 313, 314

values, quoting 315, 316

WHERE parameter 313

WMI type accelerators 319

associated classes 322

classes, obtaining 320

instances, creating 322

instances, obtaining 319

methods, calling 320, 321, 322

working, with dates 319, 320

WriteError method

using 692

Write-Host 118

WS-Management 398

Get-WSManInstance 399

PowerShell remoting and permissions 402

PowerShell remoting, enabling 398

trusted hosts 407

User Account Control (UAC) 406

Windows remoting and SSL 399, 400

WSMan drive 399

WSMan drive 399

X

XML commands 337

XmlDocument 344

XML documents

attributes, removing 348, 349

attribute values, modifying 347

creating 346, 347

elements, adding 348

elements, modifying 347

elements, removing 348, 349

namespaces 345

nodes, copying between 349, 350

schema, inferring 352, 353

schema validation 350, 351

XML type accelerator 342, 343

XPath 339, 344

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.104.248