Tuesday, January 22, 2019

10961 Automating Administration with Windows PowerShell

https://www.microsoft.com/en-us/learning/course.aspx?cid=od10961

About this course

This course provides students with the fundamental knowledge and skills to use Windows PowerShell for administering and automating administration of Windows servers. This course provides students the skills to identify and build the command they require to perform a specific task. In addition, students learn how to build scripts to accomplish advanced tasks such as automating repetitive tasks and generating reports. This course provides prerequisite skills supporting a broad range of Microsoft products, including Windows Server, Windows Client, Microsoft Exchange Server, Microsoft SharePoint Server, Microsoft SQL Server, System Center, and more. In keeping with that goal, this course will not focus on any one of those products, although Windows Server, which is the common platform for all of those products, will serve as the example for the techniques this course teaches.

Audience profile

This course is intended for IT Professionals who are already experienced in general Windows Server and Windows Client administration, and who want to learn more about using Windows PowerShell for administration. No prior experience with any version of Windows PowerShell, or any scripting language, is assumed. This course is also suitable for IT Professionals already experienced in server administration, including Exchange Server, SharePoint Server, SQL Server, System Center, and others.

At course completion

After completing this course, students will be able to:

  • Describe the functionality of Windows PowerShell and use it to run and find basic commands.

  • Identify and run cmdlets for server administration.

  • Work with Windows PowerShell pipeline.

  • Describe the techniques Windows PowerShell pipeline uses.

  • Use PSProviders and PSDrives to work with other forms of storage.

  • Query system information by using WMI and CIM.

  • Work with variables, arrays, and hash tables.

  • Write basic scripts in Windows PowerShell.

  • Write advanced scripts in Windows PowerShell.

  • Administer remote computers.

  • Use background jobs and scheduled jobs.

  • Use advanced Windows PowerShell techniques.

Module 1, “Getting started with Windows PowerShell”

Introductions
Open and configure Windows PowerShell
Help

Module 2, “Cmdlets for administration”

Search for cmdlets

Module 3, “Working with the Windows PowerShell pipeline”

Pipeline

Module 4, “Understanding how the pipeline works,”

Advanced Pipeline

Module 5, “Using PSProviders and PSDrives,”

PSProviders
PSDrives

Module 6, “Querying management information by using CIM and WMI,”

WMI - Windows Management Instrumentation
CIM - Common Information Model

WMI Wildcards
https://itknowledgeexchange.techtarget.com/powershell/wmi-likes-wildcards/

WMI vs CIM
https://blogs.technet.microsoft.com/heyscriptingguy/2016/02/08/should-i-use-cim-or-wmi-with-windows-powershell/

WMI cmdlets PowerShell 1.0 and 2.0 – one of the original 137 cmdlets
CIM cmdlets PowerShell 3.0 – WinRM remotely

Real or Memorex
https://serverfault.com/questions/109154/how-do-i-know-if-im-working-on-a-virtual-machine-or-not

Module 7, “Working with variables, arrays, and hash tables,”

variables
arrays
hash tables

+=
https://powershell.org/2013/09/powershell-performance-the-operator-and-when-to-avoid-it/

Module 8, “Basic scripting,”

create, run, and modify scripts

Module 9, “Advanced scripting,”

Gathering user input, reading input from files, documenting scripts with help information,and handling errors.

Module 10, “Administering remote computers,”

PowerShell remoting technology

Module 11, “Using background jobs and scheduled jobs,”

Jobs

Module 12, “Using advanced Windows PowerShell techniques,”

profilescripts
regular expressions
format operator
Windows PowerShell 5.1 and provide additional capabilities.

Suppress Write_host
https://stackoverflow.com/questions/14470953/powershell-how-to-capture-or-suppress-write-host

icacls
https://ss64.com/nt/icacls.html
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/icacls

NTFSSecurity
https://blogs.technet.microsoft.com/fieldcoding/2014/12/05/ntfssecurity-tutorial-1-getting-adding-and-removing-permissions/

https://blogs.technet.microsoft.com/fieldcoding/2014/12/05/ntfssecurity-tutorial-2-managing-ntfs-inheritance-and-using-privileges/


More PowerShell Fun

Tips and Tricks
https://powershell.org/category/tips-tricks/

Use PowerShell to Create a User in Active Directory
https://blogs.technet.microsoft.com/heyscriptingguy/2012/09/03/use-powershell-to-create-a-user-in-active-directory/

Turning AD User into a Hash Table
https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/turning-ad-user-into-a-hash-table

PowerShell – One Liners – 4 Part Series
https://powershell.org/2017/04/do-anything-in-one-line-of-powershell/

PowerShell Prompt
https://hodgkins.io/ultimate-powershell-prompt-and-git-setup

Pipeline – In Depth
https://www.red-gate.com/simple-talk/sysadmin/powershell/ins-and-outs-of-the-powershell-pipeline/

Blank Spaces
https://kgk.gr/2011/10/16/powershell-clrscr/

ForEach vs. ForEach-Object
https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/08/getting-to-know-foreach-and-foreach-object/