Given:
PowerShell 5.1
Azure DevOps 2020
Windows Server 2016 Standard
Is there a way I can output message for each computer that successfully updates the LocalUser?
Invoke-Command -ComputerName Computer1,Computer2 -Credential $credential -ScriptBlock {
$securePassword = ConvertTo-SecureString -String 'P@$$w0rd123' -AsPlainText -Force
Set-LocalUser -Name User1 -Password $securePassword -Verbose
}