$Tempdate=(Get-Date).AddDays(-1) $date= Get-Date $Tempdate -Format "MM/dd/yyyy HH:mm:ss" $cred = Get-Credential $computer = "192.168.000.00" In