I am trying to open an HTML file to a client "ClientA" that is locally copied to a folder "C:\1.html" remotely by executing the bellow powershell command
$Username = 'username'
$Password = 'password'
$pass = ConvertTo-SecureString -AsPlainText $Password -Force
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList
$Username,$pass
Invoke-Command -ComputerName ClientA -ScriptBlock { Invoke-Expression -
Command:"cmd.exe /c 'C:\1.bat'" } -credential $Cred
The "1.bat" batch has the bellow lines
START iexplore -k "C:\1.html"
I get no error on execution... but the file is not opening to the remote client! Any ideas?
Thanks!