PowerShell Installing software remotely on Multiple Computers
In this video you will be able to install software remotely. You have to ensure that you identify the silent installer switch to use in Script. You can get it on Google as always. I am giving the script which is working 100 % for me and I have shown you demo in this video.
Script is as below. copy and paste it in PowerShell ISE and use it.
===========================================================
$Servers = Get-content "C:\Scripts\livePCs.txt"
$Folder= "c:\Software\AcroRdrDC2100520060_en_US.exe" , "c:\Software\7z1900-x64.msi"
Foreach ($Server in $Servers) {
$Test = Test-Path -path "\\$Server\c$\Temp\"
If ($Test -eq $True) {Write-Host "Path exists, hence installing softwares on $Server."}
Else {(Write-Host "Path doesnt exists, hence Creating foldet on $Server and starting installation") , (New-Item -ItemType Directory -Name Temp -Path "\\$Server\c$")}
Echo "Copying Files to C:\Temp\"
Copy-Item $Folder "\\$Server\c$\Temp\"
echo "Second Part :- Installing Software on $Server"
Invoke-Command -ComputerName $Server -ScriptBlock {(&cmd.exe /c "c:\Temp\AcroRdrDC2100520060_en_US.exe" /sAll /sr) ,
(&cmd.exe /c MSIEXEC /I "c:\Temp\7z1900-x64.msi" /qn) , (Remove-Item -path "C:\Temp\AcroRdrDC2100520060_en_US.exe" , "C:\Temp\7z1900-x64.msi" -ErrorAction Ignore)
}
}
============================================================
Видео PowerShell Installing software remotely on Multiple Computers канала Swapnil Infotech
Script is as below. copy and paste it in PowerShell ISE and use it.
===========================================================
$Servers = Get-content "C:\Scripts\livePCs.txt"
$Folder= "c:\Software\AcroRdrDC2100520060_en_US.exe" , "c:\Software\7z1900-x64.msi"
Foreach ($Server in $Servers) {
$Test = Test-Path -path "\\$Server\c$\Temp\"
If ($Test -eq $True) {Write-Host "Path exists, hence installing softwares on $Server."}
Else {(Write-Host "Path doesnt exists, hence Creating foldet on $Server and starting installation") , (New-Item -ItemType Directory -Name Temp -Path "\\$Server\c$")}
Echo "Copying Files to C:\Temp\"
Copy-Item $Folder "\\$Server\c$\Temp\"
echo "Second Part :- Installing Software on $Server"
Invoke-Command -ComputerName $Server -ScriptBlock {(&cmd.exe /c "c:\Temp\AcroRdrDC2100520060_en_US.exe" /sAll /sr) ,
(&cmd.exe /c MSIEXEC /I "c:\Temp\7z1900-x64.msi" /qn) , (Remove-Item -path "C:\Temp\AcroRdrDC2100520060_en_US.exe" , "C:\Temp\7z1900-x64.msi" -ErrorAction Ignore)
}
}
============================================================
Видео PowerShell Installing software remotely on Multiple Computers канала Swapnil Infotech
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
My PowerShell Scripts - Systems AdministrationPsexec.exe: A Powerful tool for IT AdminsDeploy applications with the PowerShell Application Deployment ToolkitPowershell script installed software list for Remote Computers [AskJoyB]Learn and use PowerShell with just three commands - OLDPowerShell RemotingPowerShell S2E8 (Install software remote)Powershell App Deployment Toolkit - 004 - Basic Install .exeHow to Deploy Software (MSI Packages) Via Group Policy (GPO) | Windows Server 2019Optimizing Visual Studio Code for Powershell Development by Justin GrotePowerShell For Beginners Full Course | PowerShell Beginner tutorial Full CourseQuiet Installation for multiple programs with a batch-scriptInstalling software remotely on Multiple "Workgroup" ComputersPowerShell to Invoke Commands to multiple Servers computersHow to Create, Manage, and Deploy Applications in Microsoft SCCM (EXE and MSI Installs)15 Recap with a Script - Powershell Script to install any software silentlyTransfer Apps & Programs From One Computer To AnotherPowerShell Get-Uptime Single and Multiple ComputersWindows 10 How To Install Software RemotelyWhat IS the Powershell App Deployment Toolkit? Here's a quick look.