invoke-command

    0热度

    1回答

    使用用户登录名和计算机名的特定输入我想删除远程计算机上该用户的临时Internet文件。我几乎可以使它工作,但是当我尝试将文件路径作为变量传递时,它将失败,并且为空,或者不包含用户名。我已经Google搜索并试图自己修复几个小时。 我已经玩了一段时间的PowerShell,但我的'脚本'是我定义变量和管道命令。除此之外的任何事情都可能会让我感到困惑,尽管如此,任何帮助都不胜感激。以下是我到目前为止

    0热度

    1回答

    这是代码: $remotelastexitcode = Invoke-Command -ComputerName $fdt_server -Credential $Cred -ScriptBlock { Param($Rjava_path, $Rfdt_path, $Rfdt_log_folder, $Rfdt_log_filename) Invoke-Expression

    0热度

    1回答

    我想知道如何使用Invoke-Command传递参数以在脚本内使用以远程运行。 enter code here Param( [string]$cname = (Read-Host "Computer Name?") , [string]$event = (Read-Host "What event?") , [string]$eventfilter = (Read-Host "What k

    0热度

    1回答

    我奋力调用存储在远程服务器 $out = "c:\temp\test.txt" $sessions = New-PSSession -ComputerName "COMPUTER01" $cmd = 'C:\Program Files\tool\bin\sc.bat' $arg1 = "list files >> $out" Invoke-Command -Session $session

    0热度

    1回答

    $cs = New-PSSession -ComputerName MACHINE -Credential DOMAIN\admin Copy-Item -Path C:\Scripts\smart -Destination C:\smart -ToSession $cs msiexec /i "C:\Smart\SMART.msi" NB_PROD_KEY=NC-2ADA2-F9RKE-AK

    1热度

    1回答

    我正在用Server 2016和少数Windows 10客户端构建一个新网络。我已在所有客户端上成功运行Enable-PSRemoting。从服务器我运行: Invoke-Command -ComputerName $computer -Scriptblock {'test'} 导致 [电脑]连接到具有以下错误消息出现故障的远程服务器:访问被拒绝。 + CategoryInfo:OpenErr

    1热度

    3回答

    我完全是PowerShell的新手。 我想要做的就是使用命名参数在远程计算机上调用.exe。 $arguments = "-clientId TX7283 -batch Batch82Y7" invoke-command -computername FRB-TER1 { Start-Process -FilePath "C:\Program Files (x86)\Acorne\LoadDen.

    1热度

    1回答

    除了这里给出的响应:Powershell Enter Session find path bug,我在脚本中打了另一面墙,我无法解决。下面的脚本返回错误: The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of

    1热度

    2回答

    我想在一个CSV或TXT结果从下面的PowerShell命令列出: Show_Proxy.ps1: Invoke-Expression "netsh winhttp show proxy" Server_Name.txt: Server01 Server02 Server03 $ServerList = Get-Content C:\temp\Server_Names.txt I

    0热度

    1回答

    我正尝试使用此脚本在远程计算机上安装Python。如果我直接在服务器上运行这个文件。这是Python_Pip_Proxy_PyWinAuto.ps1文件。有用。 Set-ExecutionPolicy -ExecutionPolicy Unrestricted Write-Host("Hi") $installer="C:\temp\python-3.6.2.exe" & $installe