$User =
$Pswd =
$Computer =
$plink = \plink.exe"
$plinkoptions = " -v -batch -pw $Pswd"
$cmd1 = '/usr/sbin/vdf -h'
$remoteCommand = '"' + $cmd1 + '"'
$command = $plink + " " + $plinkoptions + " " + $User + "@" + $computer + " " + $remoteCommand
$msg = Invoke-Expression -command $command
$msg
No comments:
Post a Comment