Showing posts with label Endpoint Manager. Show all posts
Showing posts with label Endpoint Manager. Show all posts

Monday, February 13, 2023

PAckaging EXEs in Intune using the Win32 Content Prep Tool (Intunewin Files)

 

Deploying .EXE applications via Intune requires you to use the Microsoft Win32 Content Prep Tool to configure the app as a intunewin file that you can then upload into Intune to be deplyoed.

You can also use this method to package other executables or even PowerShell scripts.

DEFINE YOUR SOURCE AND DESTINATION FOLDERS

Before you begin, setup a local folder on your C: drive for the application like below. 

  • Create an Input folder to hold your .exe file and any resources you need packaging alongside it. 
  • Create an Output folder for the final package you will create to upload into Endpoint Manager. 

The Win32 Content Tool can sit in the root folder.

Python will be used as an example which is in the Input folder. 

PACKAGING THE APPLICATION

Open PowerShell in the directory of your app, in the example case it's C:\App\Python. You can open PowerShell quickly under File then Open Windows PowerShell to open it in the current directory. 

Run the IntuneWinAppUtil.exe tool which will ask for the source folder (Your input folder), the setup file (your exe file) and the output folder path. Say No to the Specify Catalog Folder option.

It will take a few seconds to complete the process. 

It will then package that exe you defined in the source folder into an intunewin file within the Output folder. 

UPLOADING THE PACKAGE TO INTUNE

On Endpoint Manager, you want to select Add under the Applications section then pick the app type, Windows app (Win32). 

Upload the intunewin file.

Set the meta data for the app, the name, a description, publisher and a category. 

You need to define the install and uninstall commands. This varies from app to app so do a bit of Googling to find out how to install it via the command line silently. You can include a PowerShell script in your package and reference that as the uninstall if you wanted to be creative for tricky software.

The ones below are from the Python website, some apps provide details on silent installs if it's not the typical /q or /quiet. 

Set the requirements the devices must meet to allow the software to be installed. This can allow you to fine tune where the application can be installed to prevent incompatible devices getting the software.

Detection rules is how Intune can tell if the app is installed or not. The example below checks if a file exists in C:\Windows that is installed during the setup of Python.

You can fly through the rest. You need to then target the application towards a user group or device group. Anything set under Required will force the software to install. I have set it to a user group under the Available for enrolled devices which allows any users in said group to see the application in the Company Portal app and download it if they wish to do so.

Friday, July 15, 2022

Endpoint Manager OMA-URI Settings - Restrict Parts of the Settings App

This blog covers how you can control what users can and can't see in the settings app in Windows through Endpoint Manager.

RESTRICTING PARTS OF THE SETTINGS APP

You can use the device restrictions template to block whole sections of the settings app in Windows such as the Devices section. But what if you wanted users to only access the bluetooth page under the Devices section? This is where OMA-URI settings come in to let you get that fine grain control over what users can access.

The OMA-URI we are using here is the ./Device/Vendor/MSFT/Policy/Config/Settings/PageVisibilityList which allows you to filter down what you want your users to see.

Now when settings this up, you have two options:

  • Show Only
    • The pages and sections you define are shown, but everything else is hidden.
    • If you put only show the System > About page then that's all the users will see.
  • Hide
    • Hide will only hide the pages you define in your Configuration Profile.
    • If you say hide the VPN option under Network then every option in settigns will be shown but VPN.

To decide which option to use, depends on what you want blocking. Do you want to hide 90% of the settings options? Then use show only. If you only want to hide a few options then it'll be easier to use the Hide option.

CREATING THE OMA-URI CONFIGURATION PROFILE

Set up a new Configuration Profile and you want to use the Custom template to allow you to create a OMA-URI entry. For this entry, I have my setup below as an example
  • The Name can be anything you want.
  • OMA-URI is ./Device/Vendor/MSFT/Policy/Config/Settings/PageVisibilityList
  • The value is your pages you want to block which is covered below.

BUILDING YOUR OMA-URI VALUE

The value starts with either showonly: or hide: depending on which one you want to choose. After that you need to use the URI name of the page you want to either hide or show then use the semicolons ; to separate them. Below is the URI values, you don't need to include the ms-settings part like shown in the configuration above. 

These tables were taken from the Microsoft Docs site linked below

Launch the Windows Settings app - UWP applications | Microsoft Docs


Friday, February 4, 2022

Automating Autopilot Deployments via Dynamic Device Groups

This covers automating the process of assigning Autopilot deployment profiles, apps and policies to Intune devices.

SETTING UP YOUR ENDPOINT GROUPS

When importing devices into Endpoint Manager, you need to place the device in a group within Azure AD for it to pick up an Autopilot deployment profile then pick up any apps and policies you targeted towards that group after enrollment. 

If it's one or two devices, it's not much work importing the devices then manually adding them to the group but it isn't going to be fun adding 50+ devices to a group. Here's were dynamic device groups come in handy. You can build dynamic groups based on the Group Tag field of Autopilot Devices. 

When generating the hardware ID of a device, you can set the Group Tag at the same time. You can use this tag to automate which group it joins in Azure AD once you've imported them. The rule below is used to match devices with specific Group Tags. The property is "devicePhysicalIds" with the value being "[OrderID]:TAG" replacing TAG with your group tag.

In my example I have used "Marketing" as my Group Tag. This particular group may be for Marketing devices that gets Marketing specific policies and apps. I could have a second dynamic device group for a different department that has different software and policy requirements, using a different Group Tag for them.

This can simplify the build process of devices to just, gather the hardware IDs whilst setting a Group Tag at the same time, importing your CSV file and then going through the OOBE once they have all been imported and have an Autopilot deployment profile assigned.

ASSIGNING A GROUP TAG WHEN GATHERING THE HARDWARE ID

The PowerShell cmdlet to generate the hardware ID has a parameter of -GroupTag followed by a value for your Group Tag such as "Marketing". If you're doing multiple then also use the -Append parameter to append each individual device to the next row of the CSV.

Monday, January 24, 2022

Adding Additional Local Administrators on Azure AD Joined Devices for Endpoint/Intune

 This covers how to define additional users as local admin on Azure AD joined devices.

CREATING AN AZURE AD GROUP FOR YOUR ADMIN USERS

Within Azure Active Directory, you need to create a group that will be used to define which users should be added to the local administrators groups for AzureAD joined devices, important if your environment is built upon Intune/Endpoint Manager.

The group needs to have the 'Azure AD roles can be assigned to the group' set as YES. This is so AzureAD can assign the local device administrator role to the users in that group.

SETTING THE GROUP AS LOCAL ADMINISTRATORS ON AZUREAD DEVICES

Within the Azure Portal under Devices, select the 'Device Settings' section then at the bottom is 'Additional local administrators on all Azure AD joined devices' where you define additional local administrators.

The link should open the screen shown below. You can use the 'Add Assignment' to add your AzureAD group to be used as local administrators on all Azure AD joined devices.

Once you have set your group with the assignment, you should be able to log into an Azure AD joined device and automatically be added as a local administrator.

Sunday, October 3, 2021

Setting Up Autopilot in Endpoint Manager

This guide covers creating Autopilot deployment profiles, Azure AD groups and importing Windows devices into Endpoint Manager for Autopilot configuration.

HOW AUTOPILOT WORKS

Autopilot will automate the process of enrolling a device into Endpoint Manager, deploying any security policies, installing your desired apps and setting up the device configuration, all within the intial setup period. User log in with their Azure AD credentials to access their enterprise data and resources.

Autopilot uses deployment profiles, these let you detail how the device is enroll whether it's self-deploying (Enrolls without needing a user to log in) or user driven (User logs in before it enrolls). 

These deployment profiles need to be linked to the devices you want it to apply to, this is where the Azure AD group comes into play. Once you have imported your Windows devices, you will need to add them to the group that is associated with your deployment profile. When you boot up the device, it will realise it is has an Autopilot profile assigned and then begins to follow that during the OOBE.

CREATING A GROUP FOR YOUR DEVICES

In Azure AD, create a security group which will be used by Endpoint Manager for your deployment profile. Later on when we import the device, we can add it to the Azure AD group.

This group can be used for targeting your configuration policies, app deployments, conditional access, etc.

CREATING AN AUTOPILOT DEPLOYMENT PROFILE

Under the Windows enrollment section, there is an option named 'Deployment Profiles' where you can create your profile. Simply create a new profile and follow through the wizard. 



You will get the option of User Driven or Self-Deploying.

  • User Driven - The device is associated with a user, during the OOBE the user needs to log in with their Azure AD credentials. Once they log in, it will enroll into Endpoint and apply the security configurations, install the user's applications and setup it up ready for them to use.
  • Self-Deploying - The device will enroll into Endpoint but won't require a user to log in. It will then display the Windows log in screen and during the first log in it will apply the security and device configuration.

I use the self-deploying profile in production but it's a matter of what better fits your enviornment. 

Follow through the rest of the setup, selecting your desired options, setting the default language and device name. Device name can use the value %SERIAL% to use the serial in the name or %RAND:4% for random numbers with the number representing how many random numbers (4 in this case)

Finally under the 'Included' groups, select your Azure AD group created for your devices.



IMPORTING YOUR WINDOWS DEVICE INTO ENDPOINT MANAGER

You can automate this by having your vendor provide you with the Hardware IDs of your new laptops which you can import into Endpoint so they can be unbox on delivery and will go striaght into the Autopilot process and enroll.

In this example, I will show you how to manually get the Hardware IDs and import the device into Intune.

You need to boot up the laptop and open Command Prompt. If you are in the OOBE then press Shift+F10 to open it up. Once open, enter 'PowerShell' to start PowerShell. Enter the command below.

New-Item -Type Directory -Path "C:\HWID"

Set-Location -Path "C:\HWID"

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned

Install-Script -Name Get-WindowsAutoPilotInfo

Get-WindowsAutoPilotInfo -OutputFile AutoPilotHWID.csv

This will generate a CSV in the C:\HWID directory. Run the command 'explorer.exe' to open Windows Explorer and copy this CSV to a pendrive. Back in Endpoint under 'Windows Enrollment > Autopilot > Devices' you want to select the 'Import' option then upload your CSV. 

Once it has imported, you will need to add it to your Azure AD group. Under the Autopilot Devices menu, your device will get an Assigned status under the 'Profile Status' column which means the Autopilot Deployment Profile has successfully been assigned to that device.


Now you just need to reboot the device, go back into the OOBE and it should start the Autopilot process.