JordanT Posted June 2, 2022 Posted June 2, 2022 Hello, Trying to figure out a way to update abode via pulseway most of our computers are win10 and some win11 or is there a plugin that will work if a script isn't possible ? Is there also an automated script to return all the accounts that haven't logged in for X amount of days then delete those user accounts without having to do "Connect-AzureAD" as I don't want to put Azure creds online Regards, Jordan
Mark G38 Posted June 3, 2022 Posted June 3, 2022 I wrote and used this often (before using a 3PP solution). The only thing is I couldn't find a static link to Adobe Reader DC when I wrote this, so I simply downloaded the latest version, and hosted it in AWS S3 and pulled it from there. So feel free to find a static URL or do the same I did. Function New-FileDownload { param( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$Url, [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$Destination ) $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($Url, $Destination) if (Test-Path -LiteralPath $Destination) { Write-Verbose "File downloaded Successfully" return $true } else { Write-Verbose "File download Failed" return $false } } $AppName = "Adobe Acrobat Reader DC" $InstallStatus = Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -eq $AppName } if ($InstallStatus) { Write-Output "$($AppName) already installed." Exit 0 } $AdobeURL = "ENTER YOUR URL TO AdobeReaderDC.exe" $Destination = "$($env:temp)\adobeinstall.exe" $FileDownload = New-FileDownload -Url $AdobeURL -Destination $Destination if ($FileDownload) { Write-Output "Download succeeded, beginning Adobe Reader install..." Start-Process "$($Destination)" -ArgumentList "/sAll /rs /msi EULA_ACCEPT=YES" -Wait -NoNewWindow $InstallStatus = Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -eq $AppName } if ($InstallStatus) { Write-Output "$($AppName) successfully installed." Exit 0 } else { Write-Output "$($AppName) failed to install." Exit 1 } } else { Write-Output "Failed to download installation file. Exiting." Exit 1 } JordanT 1
JordanT Posted June 6, 2022 Author Posted June 6, 2022 On 6/4/2022 at 4:12 AM, Mark G38 said: I wrote and used this often (before using a 3PP solution). The only thing is I couldn't find a static link to Adobe Reader DC when I wrote this, so I simply downloaded the latest version, and hosted it in AWS S3 and pulled it from there. So feel free to find a static URL or do the same I did. Function New-FileDownload { param( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$Url, [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$Destination ) $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($Url, $Destination) if (Test-Path -LiteralPath $Destination) { Write-Verbose "File downloaded Successfully" return $true } else { Write-Verbose "File download Failed" return $false } } $AppName = "Adobe Acrobat Reader DC" $InstallStatus = Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -eq $AppName } if ($InstallStatus) { Write-Output "$($AppName) already installed." Exit 0 } $AdobeURL = "ENTER YOUR URL TO AdobeReaderDC.exe" $Destination = "$($env:temp)\adobeinstall.exe" $FileDownload = New-FileDownload -Url $AdobeURL -Destination $Destination if ($FileDownload) { Write-Output "Download succeeded, beginning Adobe Reader install..." Start-Process "$($Destination)" -ArgumentList "/sAll /rs /msi EULA_ACCEPT=YES" -Wait -NoNewWindow $InstallStatus = Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -eq $AppName } if ($InstallStatus) { Write-Output "$($AppName) successfully installed." Exit 0 } else { Write-Output "$($AppName) failed to install." Exit 1 } } else { Write-Output "Failed to download installation file. Exiting." Exit 1 } Thank you this will work perfectly Mark G38 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now