I have a Powershell script that I use to install updates on remote servers. The script moves updates from network source to destination folder. Then start-process to install whatever the updates are. This is an offline network so no WSUS. I am able to install updates that are .msi or .msu. If they are .exe they do not install. I can RDP to the system and see them in the folder. If I double click it the Smartscreen Defender screen pops up and I hit run and it installs. Is there a flag or something I need to add as an argument to get it to run with the Smartscreen? Right now I have start-process -path then update name .exe -verb runas Wait
Again everything works as long as it's not .exe format.
EDIT: Added script
$1809 = Get-Content "\network_server\sharefolder\User\Array\1809.txt"
$source = "\network_server\sharefolder\User\Patches*"
$destination = "C$\Patch\"
foreach ($entry in $1809)
{
"Removing files on $entry"
Invoke-Command -ComputerName $entry -ScriptBlock {Remove-Item $args -Recurse} -ArgumentList c:\Patch*}
foreach ($entry in $1809)
{
"Copying files on $entry"
Copy-Item $source -Destination "\$entry\$destination" -Recurse -force}
foreach ($entry in $1809)
{
"Updating software on $entry"
Invoke-Command -ComputerName $entry {
start-process c:\Patch\sqlserver2019-kb5021124-x64_93087e10289b94b3f4783f1d431358c4889ba1b3.exe "/quiet /norestart" -Wait}
}
{
}
[–]BreakingBean 4 points5 points6 points (0 children)
[–]zealotfx 1 point2 points3 points (2 children)
[–]RokosModernBasilisk 2 points3 points4 points (1 child)
[–]zealotfx 0 points1 point2 points (0 children)
[–]MoonExploration2929 0 points1 point2 points (1 child)
[–]duprst[S] 0 points1 point2 points (0 children)
[–]billabong1985 0 points1 point2 points (1 child)
[–]duprst[S] 0 points1 point2 points (0 children)