Users Online

· Guests Online: 24

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

Software Installation on Multiple Servers

Software Installation on Multiple Servers

 

 

 

$servers = gc C:\provide path
$source = "\\source_server\Treesize" ### share the folder in which the installation file is present ##
$tempath ="\\source_server\Treesize"
$destination = "c$"
foreach ($server in $servers) 
{
$session = New-PSSession -ComputerName $server
if(test-connection -Cn $server -quiet){
Copy-Item $source -Destination \\$server\$destination -Recurse -Force
if(Test-Path -path $tempath){  
Invoke-command -session $session -ScriptBlock {C:\treesize\TreeSizeFreeSetup.exe /uninst /silent /restart}
Write-Host -ForeGroundColor Green "Installation successful on $server"
  }  
  }
  else
  {
    Write-Host -ForeGroundColor red "Installation failed on $server"
 }
 }


Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.91 seconds
10,799,401 unique visits