This repository is a collection of custom scripts designed to streamline and enhance the management of applications via Microsoft Intune.
This repository contains various custom scripts for automating and simplifying tasks within Microsoft Intune. Each script is accompanied by a brief overview, usage instructions, and other relevant details. Contributions and improvements are welcome!
intune-scripts-toolbox/
├── scripts/
│ ├── 7zip-detection.ps1
│ └── ... (other scripts)
└── README.md
Each script file in the scripts/
directory is intended for use in Intune deployment scenarios. Detailed information about each script is provided below.
-
Overview:
This PowerShell script is intended for use as a custom detection rule when deploying 7-Zip as a Win32 app via Microsoft Intune. In scenarios where standard detection rules fall short—particularly when needing to verify specific version details for instances where older versions of 7-Zip have been previously deployed—this script provides a tailored solution to accurately detect the installed version. -
Usage:
- Prepare your 7-Zip installer (EXE or MSI) by wrapping it into an
.intunewin
package. For detailed instructions on this process, please refer to Microsoft Learn documentation. - In the Intune portal, when configuring the Win32 app deployment, choose to use a custom detection script under the detection rules section.
- Upload this script as your detection method to ensure that the correct version of 7-Zip is identified on target devices.
- Optionally specify a different version using the
-ExpectedVersion
parameter (defaults to24.09
). - The script searches for
7z.exe
first inC:\Program Files\7-Zip
and then inC:\Program Files (x86)\7-Zip
.
- Prepare your 7-Zip installer (EXE or MSI) by wrapping it into an
-
Note:
This script addresses the limitation of standard detection rules, which may not capture version details effectively if a previous version of 7-Zip was installed. Customize the script further as needed to suit your environment's specific requirements.
Feel free to add new scripts following the structure above.
-
Overview: Retrieves Azure AD users created within the last 24 hours and exports the results to
daily_new_users.csv
. -
Usage: Execute
daily-new-users.ps1
in a PowerShell session where the Microsoft Graph module is available. The account running the script must have theUser.Read.All
permission. Specify an output file with-OutputPath
if desired, for example:.\daily-new-users.ps1 -OutputPath .\report.csv
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Add your script along with a corresponding entry in the README.
- Submit a pull request for review.
Please follow the existing code style and documentation format.
This project is licensed under the MIT License.