Forum Discussion
joemclain
Oct 05, 2022Brass Contributor
Manipulating the registry via Intune push
Our goal is simple: Manipulate the registry as part of application deployment or PowerShell script. Use case: When we install our VPN client, there are a raft of registry updates that need to be ...
AZTEK91
Mar 05, 2023Copper Contributor
I am in the exact situation you were in, but the difference is I cannot seem to make it work. Do you have a PS1 script I can test in intune, please?
- joemclainMar 06, 2023Brass ContributorHere's the contents of a .ps1 file for you:
reg.exe import TestFile.reg /reg:64
_______________________________
If you save all of your registry updates to TestFile.reg and put the above line in your TestReg.ps1 file, you can then run:
powershell.exe -ExecutionPolicy Bypass -File .\TestReg.ps1
The configuration of the .reg file is crucial. I don't know your level of experience with them but if you're new to it, the easiest thing to do is make your changes through RegEdit.exe on a test machine and then export that registry key. Open the .reg file and delete anything you don't want included in your import and you'll be left with a properly configured .reg file that contains only the things you want changed. Run the script and it'll import the registry settings from the .reg file using the 64-bit flag in the reg.exe app.- LopezRosadoOct 02, 2023Copper Contributor
Hello joemclain
I'm dealing with something similar.
You have already made the script. I have a question, The installation commands within Intune are these: powershell.exe -ExecutionPolicy Bypass -File .\TestReg.ps1 or how did you place them?