Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

powershell to run on multiple machines in textfile

$
0
0

hello all,

i am working on script to install msi on different machines

Powershell
$list=get-content"c:\windows\temp\systems.txt"Foreach($systemin$list){if((gwmiwin32_operatingsystem|selectosarchitecture).osarchitecture-eq"64-bit"){msiexec.exe/qn/I"\\server\test.msi}else{ msiexec.exe /qn /I "\\server\test32.msi}}

the script is installing on machine i ma running from. its not taking the test input, am i missing anything?

thanks


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>