Hubbard in Homelab, System Administration Tasks, Windows 10, Windows Server Learn how to update Windows 10 using PowerShell commands. How To Update Windows 10 Using PowerShell Commands By Alexander C.# ingest the hostname and credentials from LM device properties $hostname = '#SYSTEM.HOSTNAME#' $userid = '#THIS.USER#' $passwd = '#THIS.PASS#' # build a credential object $secure_passwd = ConvertTo-SecureString ` -String $passwd -AsPlainText -Force $user_credential = New-Object ` -typename ` ($userid, $secure_passwd) # initiate a session to the remote host $session = New-PSSession ` -ComputerName $hostname ` -Credential $user_credential.