Remotely Installing app using powershell

Good day,

I have done some research on this and have found many helpful threads on this.  The script runs, but when the install seems to be complete the icon which is created for the app disappears and the app is not showing as installed when i look into my applications list in control panel.  The following is the script, what am i not seeing,  based on what i have read this should work.

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$listpath = [Microsoft.VisualBasic.interaction]::InputBox("Please provide path of PC list txt file,'C:\Temp\pclist.txt'", "PC List Path", "$env:currentpath")
$computers = Get-Content "$listpath"
$SourceFile = [Microsoft.VisualBasic.interaction]::InputBox("Please provide the install path,'\\Server\Install folder\installfile.exe'", "Install Path", "$env:path")
$Install = (split-path $SourceFile -leaf)

foreach ($computer in $computers) {
Copy-Item -Path $SourceFile -Destination "\\$computer\C$\temp" -force
([WMICLASS]"\\$computer\ROOT\CIMV2:Win32_Process").Create("\\$computer\C$\temp\$Install")
Out-File -FilePath c:\temp\installed.txt -Append -InputObject "$computer"
}

Thanks in advance


  • Edited by KaGeLance 10 hours 22 minutes ago
May 21st, 2015 4:51pm

Are you looking at the installer log file to see the errors?
Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 5:50pm

unfortunately it doesn't even generate the log file :(.  When I RDP to the workstation and run the installer manually everything works as it should.  

May 21st, 2015 7:26pm

Have you looked in the event log?

Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 8:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics