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