https://store.rg-adguard.net/
We will see the setup files according to the relevant application versions and the setups of the software that must be on the device for the application to work. (If the device is up to date, it will be sufficient to distribute only the setup of the application we are looking for. In other cases, you can download the current version to install the software as well.)
Since our script is for files with .appx, .appxbundle, .msix and .msixbundle extensions, you can download files with these extensions.
In some cases, when we click directly, the package may not download. If this happens, you can try opening the download link in an incognito tab and download it.
3- After downloading the necessary files, we can prepare our script.
You can prepare the .ps1 file by pasting the following powershell commands into the text file and then changing the extension of the text file to .ps1. (If the commands are corrupted while editing, you can copy-paste them again and save them.
powershell.ps1 content;
# Get all .appx, .appxbundle, .msix and .msixbundle files in current directory
$packages = Get-ChildItem -Path $PWD -Filter .appx -Recurse
$packages += Get-ChildItem -Path $PWD -Filter .msix -Recurse
# Loop for each .appxbundle file
foreach ($package in $packages) {
$packagePath = $package.FullName
# Run Add-AppxPackage command and wait for it to complete
$process = Start-Process -FilePath "powershell.exe" -ArgumentList "-Command", "Add-AppxPackage -Path '$packagePath'" -PassThru -NoNewWindow
$process.WaitForExit()
}
4- After downloading and preparing the script file, it will be useful to first manually test that the application and the .ps1 file are working.
For testing, you can keep the .ps1 and installation file under the same file on a device and check by running Powershell as admin. (You can also open Powershell and run the relevant .ps1 file.
There may be a restriction policy for execution on Powershell. You can activate it using the command below.
Set-ExecutionPolicy RemoteSigned
Afterwards, you can trigger our .ps1 file and check whether it has been installed or not.
An example of the setup in the testing process;
5- After seeing that the application setup file and script have been installed, you can proceed to the distribution-installation phase via EPC.
Endpoint Central By following the path Software Deployment > Packages > Add Package, we can upload our relevant .ps1 file and the setup files of our applications. (You can upload more than 1 application. The script will install all of them.)
You can then distribute the packages to users using Install/Uninstall Windows Software ( User Configuration) .
You can check the screenshot below for the relevant installation processes.
Do not forget to update the name 'test'(.ps1) in the Installation Command field according to your .ps1 file.
powershell.exe -ExecutionPolicy RemoteSigned -File test.ps1