Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Title Page
Copyright and Credits
Learn PowerShell Core 6.0
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Current PowerShell Versions
Technical requirements
Historical background
Overview of different versions of Powershell
PowerShell Editions 
Windows PowerShell 5.1
PowerShell Core 6
PowerShell Open Source
Downloading the source code
Developing and contributing
The goals of PowerShell Core 6
Dependencies and support
Compatibility
Cross-platform remoting
Azure Cloud Shell
Features of PowerShell in Cloud Shell
Future of PowerShell
Summary
Questions
Further reading
PowerShell ISE Versus VSCode
Introduction to currently available tools
Recap
PowerShell ISE
Visual Studio Code
Introduction
Download
Installation
First start
Basics
ISE versus VSCode
Summary
Questions
Further reading
Basic Coding Techniques
Comments
Regions
Types
Variables
Commands and parameters
Approved verb list
PSDrives and PSProviders
PowerShell's scripting language
Script blocks
Operators
Pipeline operator
Type operators
Arithmetic operators
Assignment operators
Comparison operators 
Logical operators
Split and join operators
Bitwise logical operators
Replace operator
Unary operators
Language constructs
Indentation
If...ElseIf, and Else
Switch
Loops
for loop
do loop
while loop
foreach loop
break and continue loops
Error handling
Non-terminating
Terminating errors
Remoting
Types of remoting
Summary
Questions
Further reading
Advanced Coding Techniques
Technical requirements
Working with credentials
Working with external utilities
Pipeline and performance
Performance
Parallel execution
Working with APIs
Creating a REST endpoint
Create
Read
Update
Delete
Interacting with a RESTful API
Working with events
Object events
WMI events
Engine events
Remote events
Custom formatting
Custom type extensions
Summary
Questions
Further reading
Writing Reusable Code
Best practice guidelines
Code layout
Brace placement
Naming conventions
Aliases and parameter names
Readability
Function design
Output
Cmdlet output
Conveying messages
Compatibility
Comments
Header or disclaimer
Functions
Script blocks
Function declaration
The parameter attribute
Parameter sets
Pipeline input
Cmdlet binding attribute
Scopes
Dot-sourcing code
Help files
Help-driven development
Code signing
Possible solutions
Digital certificates
Public key Infrastructure
Self-signed certificates for testing
Preventing changes and execution
Proving that changes were made
Modules
Module architecture
Combining multiple functions
The module manifest
Managing complexity
Deployment and upgrade
Version control
Changelog
Recovery
Revert
Checkout
Reset
Branching
Merging
Possible solutions
TFS
Git
SVN
PSScriptAnalyzer
Summary
Questions
Further reading
Working with Data
Registry
Files
CSV
XML
CLIXML
JSON
Classes 
Summary
Questions
Further reading
Understanding PowerShell Security
Current situation around PowerShell
Is PowerShell a vulnerability?
Principle of Least Privilege
The community
Version 5
Evergreen
Secure coding
Remoting
Double hop 
ExecutionPolicy
Bypassing the ExecutionPolicy
Executing PowerShell without PowerShell.exe
Constrained language mode
 AppLocker
How the Constrained Language Mode is enforced
Windows Defender Application Control
Obfuscation
Logging
AMSI
Prioritizing technical security controls
Summary
Questions
Further reading
Just Enough Administration
Technical overview
Session authoring
Role capabilities
Merging role capabilities
Cmdlet visible in one role
Cmdlet visible in multiple roles
Validation is used in one role
Validation is used in multiple roles
ValidateSet and ValidatePattern are mixed
Session configurations
Language mode and session type
Transcripts
Accounts
Connecting users
Virtual account
Group-managed service account
User drive
Deploying session configurations
Individual activation
Distributed activation
Desired State Configuration
Use cases
Summary
Questions
Further reading
DevOps with PowerShell
What is DevOps?
WinOps
DevSecOps
Why DevOps
Traceability
Reliability
Speed
Test-driven development
Continuous integration
Continuous deployment
Challenges of DevOps
The value of PowerShell
Summary
Questions
Further reading
Creating Your Own PowerShell Repository
Package management
Centralization
Interacting with repositories
Knowledge management
Documentation with PlatyPS
PowerShell repository
Setup
Modules
Signing
Version control
PowerShellGet
Execution
Dedicated user
JEA
Deploying and upgrading
PowerShellGet
End user updates
Automatic updates
JEA servers
Summary
Questions
Further reading
VSCode and PowerShell Release Pipelines
Configuration
Interface
Extensibility
Preparing for a release pipeline
Working with different hosts
Plaster
Creating templates
Packaging templates
PSScriptAnalyzer
Pester
Mock
Mock .NET calls
Describe
Context
It
Running tests
Git
Centralized workflow
Forking workflow
CI tools
Bringing it all together
Summary
Questions
Further reading
PowerShell Desired State Configuration
Introducing DSC
Why Desired State Configuration?
Configurations
Local Configuration Manager – LCM
Push
When to use
Pull
When to use
Security
Resources
Built-in resources
Community
Custom
Composite
DSC Core
Summary
Questions
Further reading
Working with Windows
Retrieving the latest PowerShell version
WMI CIM
Delivery Optimization
Retrieving all log events and files for update issues
Turning off energy-saving mechanisms
Verifying installed updates
Working with apps
EventLog
ETL parsing
Convert-PPTX to PDF
Summary
Questions
Further reading
Working with Azure
Azure 101
Resource groups
Tags
Resources
PowerShell in Azure Cloud Shell
The Azure drive
Resource group deployment
Finding templates
Resources
Parameters and variables
Functions in templates
Individual deployments
Summary
Questions
Further reading
Connecting to Microsoft Online Services
Office 365
Exchange Online
Using some cmdlets
SharePoint Online
Microsoft Teams
Summary
Questions
Further reading
Working with SCCM and SQL Server
System Center Configuration Manager
Logging
PowerShell App Deployment Toolkit
SQL Server
Working with the SqlServer module
The SQL Provider
Connecting to SQL instances
Running manual queries
Working with availability groups
Masterkeys, encryption, and credentials
Working with the dbatools module
Discovering SQL instances
Connecting to SQL instances – the SqlInstance parameter
Running manual queries
PowerShell to SQL
Navigating the module
Backup, restore, and test
Deploying maintenance insight tools
Migrations made easy
Working with the Reporting Services module
Connecting to the Reporting Services server
Administrating the service
Managing the data in the service
Working with content
Navigating the structure
Exporting content
Importing content
Configuring SSRS servers
Working with the dbachecks module
Configuration
Feel the power
Summary
Questions
PowerShell Deep Dives
Creating XAML GUIs with PSGUI
Scalable DSC configuration
The problem
The setup
Configuration data
Configurations
Build
ConvertFrom-String
LINQ
OpenFileDialog
Username to Security Identifier (SID)
SHiPS
PSDefaultParameterValues and PSBoundParameters
PSDefaultParameterValues
PSBoundParameters
ConvertTo-Breakpoint
Summary
Questions
Further reading
PowerShell ISE Hotkeys
Keyboard shortcuts for editing text
Keyboard shortcuts for running scripts
Keyboard shortcuts for customizing the view
Keyboard shortcuts for debugging scripts
Keyboard shortcuts for Windows PowerShell tabs
Keyboard shortcuts for starting and exiting
References
VSCode Hotkeys
Default keyboard shortcuts
Basic editing
Rich languages editing
Navigation
Editor/Window management
File management
Display
Search
Preferences
Debug
Tasks
Extensions
References
Assessments
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Other Books You May Enjoy
Leave a review - let other readers know what you think
← Prev
Back
Next →
← Prev
Back
Next →