Skip to Main Content
Learn PowerShell Core 6.0
book

Learn PowerShell Core 6.0

by David das Neves, Jan-Hendrik Peters
July 2018
Beginner content levelBeginner
552 pages
13h 18m
English
Packt Publishing
Content preview from Learn PowerShell Core 6.0

Working with external utilities

Sometimes, PowerShell cmdlets are not enough. Although this rarely is the case nowadays, there are times you may need to resort to external utilities. This is especially valid for PowerShell Core on different operating systems with different sets of binaries.

Consider the following example: you are tasked with creating local users on a set of Windows and Linux machines with the least amount of code. You know that all machines have enabled PowerShell remoting:

# Sample 1 - Creating users on Windows and Linux hosts$windowsMachines = 'WindowsHost1', 'WindowsHost2'$linuxMachines = 'LinuxHost1', 'LinuxHost2'$username = 'localuser1'$password = 'P@ssw0rd' | ConvertTo-SecureString -AsPlainText -Force$newCredential ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PowerShell and WMI

PowerShell and WMI

Richard Siddaway

Publisher Resources

ISBN: 9781788838986Supplemental Content