万本电子书0元读

万本电子书0元读

顶部广告

Learn PowerShell Core 6.0电子书

售       价:¥

8人正在读 | 0人评论 9.8

作       者:David das Neves,Jan-Hendrik Peters

出  版  社:Packt Publishing

出版时间:2018-07-26

字       数:61.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Enhance your skills in expert module development, deployment, security, DevOps, and cloud Key Features *A step-by-step guide to get you started with PowerShell Core 6.0 *Harness the capabilities of PowerShell Core 6.0 to perform simple to complex administration tasks *Learn core administrative concepts such as scripting, pipelines, and DSC Book Description Beginning with an overview of the different versions of PowerShell, Learn PowerShell Core 6.0 introduces you to VSCode and then dives into helping you understand the basic techniques in PowerShell scripting. You will cover advanced coding techniques, learn how to write reusable code as well as store and load data with PowerShell. This book will help you understand PowerShell security and Just Enough Administration, enabling you to create your own PowerShell repository. The last set of chapters will guide you in setting up, configuring, and working with Release Pipelines in VSCode and VSTS, and help you understand PowerShell DSC. In addition to this, you will learn how to use PowerShell with Windows, Azure, Microsoft Online Services, SCCM, and SQL Server. The final chapter will provide you with some use cases and pro tips. By the end of this book, you will be able to create professional reusable code using security insight and knowledge of working with PowerShell Core 6.0 and its most important capabilities. What you will learn *Get to grips with Powershell Core 6.0 *Explore basic and advanced PowerShell scripting techniques *Get to grips with Windows PowerShell Security *Work with centralization and DevOps with PowerShell *Implement PowerShell in your organization through real-life examples *Learn to create GUIs and use DSC in production Who this book is for If you are a Windows administrator or a DevOps user who wants to leverage PowerShell to automate simple to complex tasks, then this book is for you. Whether you know nothing about PowerShell or just enough to get by, this guide will give you what you need to go to take your scripting to the next level. You’ll also find this book useful if you’re a PowerShell expert looking to expand your knowledge in areas such as PowerShell Security and DevOps.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部