Showing posts with label Enterprise Mobility Suite. Show all posts
Showing posts with label Enterprise Mobility Suite. Show all posts

Thursday, 11 July 2019

AutoPilot hybrid - issue resetting devices

Issue

I'm implementing an AutoPilot process for a customer at the moment involving hybrid AAD join of Windows 10 1809 devices (Lenovo T480 laptops). In general the AutoPilot process works. However we ran into trouble when we retired or reset a device that had been previously joined to Azure AD. The behaviour was consistent and the devices never joined AD or AAD.


After sign in the devices were stuck on "Please wait while we set up your device". (The screenshot above shows 1809 VM on the left and 1903 on the right).

After about 30 minutes they would fail with:

“Something went wrong. Confirm that you are using the correct sign-in information and that your organization uses this feature. You can try to do this again or contact your system administrator with the error code 80070774”



This suggested that there was something preventing the Offline Domain Join from completing and the process timed out. I researched the problem and saw that I wasn't alone. Similar issues were reported in the TechNet forums.


  • I made sure that the devices did not still exist in AD or Azure AD but it did not make any difference.
  • Also I made sure that the ODJ profile was assigned to a dynamic group of my AutoPilot devices. Remember the solution worked perfectly first time around. It only gave trouble when the devices were reset.
  • The AutoPilot device group was based on the presence of the ZTDId attribute.
Workaround

I reached out to the product group and Michael Niehaus gave me some advice. He suggested that only way to get it to reliably work was to remove all the device objects (AAD, Intune, Autopilot) and then re-import the device to Autopilot to start over. He also suggested a possible workaround. Target the Domain Join device configuration policy to "All Devices" instead of AutoPilot devices only as that would help with the ODJ timeout problems. 

That's what I did. I changed the targeting and it worked. The devices joined both AD and Azure AD as normal. Thanks Michael.

I hope this helps you if you find yourself in the same situation. 

Until next time......


Monday, 8 July 2019

AutoPilot CSV file formatting issues

I've been uploading hardware IDs to Intune for my customer so that the devices can be provisioned using AutoPilot and Intune. We create CSV files in batches of 50 and everything has been going well so far. However the process started to fail today.


Intune would not accept the formatting of the CSV files. 

Each row must have a minimum of 3 columns

The formatting looked ok to me though. It was a CSV file of 50 devices created using the -append parameter.

Get-WindowsAutoPilotInfo.ps1 -OutputFile .\batch1.csv -append

The project leverages Microsoft Teams for collaboration and I subsequently discovered that the files had been uploaded to Teams and downloaded again. This must have caused some subtle issue with the formatting. Once I got the original files I was able to continue as normal.

I've also noticed that a simple edit of the CSV file can cause formatting issues. There was a duplicate line in one of the files but simply deleting the line caused an issue.


In the end I uploaded the file with the duplicate and just accepted the import error.

I hope this helps anyone else scratching their head with AutoPilot CSV formatting issues. My advice:
  1. Use the original CSV file only
  2. Keep editing of the CSV file to a minimum
Until next time....

Thursday, 30 May 2019

Deploying Intune Connector for AD with a web proxy


I'm working on a Windows AutoPilot solution for a customer this week. This is a hybrid AD solution and the devices will join both Azure AD and the corp AD. I had previously deployed the Intune Connector for Active Directory for testing purposes and it's pretty straightforward. However it's a little different in an enterprise environment. 


I successfully installed the connector on a Windows Server 2016. However the connector never appeared in Intune. There were many errors in the ODJ Connector event logs


Example
"We are unable to complete your request because a server-side error occurred. Please try again. [Exception Message: \"DiagnosticException: 0x0FFFFFFF. We are unable to complete your request because a server-side error occurred. Please try again.\"] [Exception Message: \"Failed to get a value for Key: OdjServiceBaseUrl\"] [Exception Message: \"The given key was not present in the dictionary.\"


The proxy log files showed no activity so clearly I needed some way to ensure that the tool was directing traffic to the proxy.

This document discusses using the tool with on-premise proxies


However, it’s really not useful as it just recommends bypassing the proxy and configuring the tool (ODJConnectorUI.exe.config and ODJConnectorSvc.exe.config) to do that. We all know that is not practical. Most enterprise customers won’t allow you to bypass the proxy so I needed a way to make the Intune Connector use the proxy.

  • Configuring the proxy in IE does not work
  • Using “netsh winhttp set proxy” does not work 
Michael Niehaus worked on this and provided the code to add to the config files.


It worked perfectly and the Intune Connector was created (you have to restart the Intune ODJConnector Service).

The documentation will be updated accordingly. 

This is the code snippet that should be added to both the ODJConnectorUI.exe.config and ODJConnectorSvc.exe.config files.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.net> 
    <defaultProxy>  
      <proxy usesystemdefault="false" proxyaddress="http://contoso-proxy:3128" />  
    </defaultProxy> 
  </system.net>

   <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
  </startup>

  <appSettings>
  </appSettings>
</configuration>

 It was good to see successful communication in the event logs


Note:
It is important to include http:// in the proxy address. We didn't at first and we spotted the following in the event logs:

":"We are unable to complete your request because a server-side error occurred. Please try again. [Exception Message: \"DiagnosticException: 0x0FFFFFFF. We are unable to complete your request because a server-side error occurred. Please try again.\"] [Exception Message: \"The ServicePointManager does not support proxies with the xxx.int.domain.com scheme.\"]" 

I hope this helps someone to configure the Intune Connector for Active Directory behind a web proxy.

Until next time....

Thursday, 2 May 2019

First look at Intune Win32 app dependencies

The ability to deploy Win32 apps using the Intune Management Extension really improved the quality of Intune app deployment to Windows 10 devices. Microsoft have now taken this one step further with the release of Win32 app dependencies this week. 

What are app dependencies?

App dependencies are applications that must be installed before your Win32 app can be installed.

How many dependencies can I have?

There is a maximum of 100 dependencies, which includes the dependencies of any included dependencies, as well as the app itself.

What kind of dependencies can I configure?

You can add Win32 apps as dependencies for other Win32 apps, only after your Win32 app has been added and uploaded to Intune. Once your Win32 app has been added, you'll see the Dependencies option on the blade for your Win32 app.

Do I have to assign dependent apps to users or devices?

You can choose whether or not to install each dependent app automatically. By default, the Automatically install option is set to Yes for each dependency. By automatically installing a dependent app, even if the dependent app is not targeted to the user or device, Intune will install the app on the device.

How does it work?

Once the Win32 app has been uploaded to Intune you will see two new options - Dependencies and Dependency Viewer.


Select Dependencies.


Select Add to add a dependency.


You are presented with a list of available Win32 apps. Select one to be a dependent app.


Choose Select.


Choose if you want the dependency to automatically install (without being assigned). Choose Add to finish the process.


Now select the Dependency Viewer to see the active dependencies. I have a simple example here but this will be very useful to see all the dependencies and even sub-dependencies.


You can remove a dependency by clicking on the ellipses (three dots) at the end of the row in the dependency list.

What else should we know?
  • The end user will see Windows Toast Notifications indicating that dependent apps are being downloaded and installed as part of the Win32 app installation process.
  • If you choose not to Automatically install a dependency, the Win32 app installation will not be attempted.
  • Each dependency will adhere to Intune Win32 app retry logic (try to install 3 times after waiting for 5 minutes) and the global re-evaluation schedule.
  • Dependencies are only applicable at the time of installing the Win32 app on the device.
  • Dependencies are not applicable for uninstalling a Win32 app.
For me this is a very useful new feature and will help to ease the transition to modern management.

Until next time....


Monday, 28 January 2019

Intune Support for Azure Monitor - Public Preview

This is a great new feature of Microsoft Intune (Public Preview). Central logging has been a request for some time. Now we can send Audit and Operational Intune logs to Azure Monitor services. This allows us to:
  • Archive Intune logs to an Azure storage account to keep the data, or archive for a set time.
  • Stream Intune logs to an Azure event hub for analytics using popular Security Information and Event Management (SIEM) tools, such as Alien Vault, Splunk and QRadar.
  • Integrate Intune logs with your own custom log solutions by streaming them to an event hub.
  • Send Intune logs to Log Analytics to enable rich visualizations, monitoring, and alerting on the connected data.
In this example I'll archive the data to a storage account for analysis later.

What do we need?
  • Azure subscription
  • Intune
  • Global Admin or Intune Service Administrator account
  • Azure storage account with ListKeys permission (you'd need a different Azure service depending on where you want to route the logs)
So let's configure this logging.

In the Azure portal navigate to Intune


Select Diagnostics Settings and turn it on.

We can see three options:
  • Archive to a storage account: Saves the log data to an Azure storage account. Use this option if you want to save or archive the data. (this is the one we will use)
  • Stream to an event hub: Streams the logs to an Azure event hub. If you want analytics on your log data using SIEM tools, such as Splunk and QRadar, choose this option.
  • Send to Log Analytics: Sends the data to Azure log analytics. If you want to use visualizations, monitoring and alerting for your logs, choose this option

See the event hub configuration (if this was our preferred option).......



....or the log analytics (if this was our preferred option).



We'll just choose an Azure storage account (our option).



Enter a descriptive name for the diagnostic setting and configure the retention period in days. Save the setting.



The diagnostic setting has been created. You can edit this afterwards.


Cost

Remember that there will be a cost associated with this logging. See the Microsoft docs for more details.



Reviewing the logs


After an action the corresponding log will show up in the storage account between 5 and 15 minutes later and it's very easy to review the logs.

Navigate to Azure Storage accounts


and select the storage account you configured earlier.


Select Storage Explorer (also in Preview). You'll see a new Blob container - "Insights-log-auditlogs"


Drill down into the container and you'll find a .json file.


You can open the file in a browser to see the logs. See that some managed devices were deleted. I wonder who did that.


The Azure Storage Explorer tool is another option and is also handy for browsing this content. Download it from here


Install the tool and sign in to Azure.


Choose your subscription and select Apply.


How you can browse and open the logs.


Look who deleted the managed devices. I'll have to talk to him.


This is a brilliant new feature. I hope this blog post helps. Until next time.....


Monday, 17 December 2018

First look at Windows 10 Security Baselines - Intune public preview

(First published in Dec 2018 but I was too early so I withdrew the post 😃)

This has been one of the most requested Intune features for quite some time and, yesterday, it was released as a public preview in Intune 1901. What is it all about? You can find the official documentation here

For many years now we have relied on Microsoft to provide guidance on the security settings that we should configure. In the on-premise Active Directory world we don't want to analyse every possible GPO that is available. That's why we implement the Microsoft security baselines as a starting point and then we change individual settings as required. Microsoft have now provided Windows 10 security baselines for the Intune MDM-managed world. I tested it today and it's really easy to implement. It works well too.

Remember that this is a public preview only and is only supported with Windows 10 version 1809 and later. It is not yet recommended for production.

So where do we start? In the Azure portal, navigate to All Services and search for Intune. Select Security Baselines (Preview).



Launch Security Baselines and we can see the Preview: MDM Security Baseline for October 2018 (beta).

Drill into the baseline. Click Create profile.



Enter some details (Name and Description) for your baseline (profile). The platform and baseline drop-down arrows are grayed out. These will probably become available as more baselines are released for different Windows 10 versions.



Have a look at the Settings. These are the kind of security heading that you would expect.


"Block toast notifications on locked screen" is enabled in the baseline. I'll check for that in my test computer in a minute.



The Browser settings look secure.....



....and these are the Device Lock settings. See that we will prevent the reuse of the previous 24 passwords. That's pretty secure. I'll check that on my test client also.



Once the profile has been created it should be assigned to a group (of devices or users).






Ok, on my test device, I've initiated a manual sync. Otherwise I'd have to wait up to 8 hours.



I've generated an MDM Diagnostics report.



These are the results. I can see that DevicePasswordHistory is now configured for 24. 



AllowToasts is now disabled.



So what happens if I make a change to a baseline? Let's change the toast notification setting to Not Configured.

After a manual sync I can see that this setting is no longer managed.

I can see a lot of potential with this feature. Try it out (although not in production yet).

Until next time......

Monday, 24 September 2018

Intune - sidecar for Win32 apps revealed

Traditionally it has not been easy to deploy applications to Windows 10 devices managed by Intune. There is a great solution for deploying Office 365 ProPlus. Also, it's always been easy to deploy single file MSIs and that's great. However how many apps do we admins get to deploy that are packaged very nicely by the vendor into single MSI files? Not many I'd say. Usually we get a .exe file or in fact the installation files contain multiple folder and files.

So what have our choices been to deal with this? 
  • Repackage EXEs & MSIs with multiple files to a single file MSI using 3rd party tools (e.g. Flexera Admin Studio) - can be complex.
  • Convert apps to .appx using the desktop bridge - the desktop app converter is Microsoft’s utility to do this and it's is not a straightforward tool to use.
  • Deploy apps using PowerShell scripts - this is very powerful and uses the Intune management extension in conjunction with Azure blob storage.
The Intune management extension (codename sidecar) supplements the native Windows 10 MDM capabilities. So, how does it work? How do we get the management extension on to the devices?

Well, it’s just an MSI itself and we’ve been able deploy MSIs for quite some time. If a PowerShell script is assigned to a user and the Intune management extension is not already installed on a device, it will be pushed down to the device automatically by Intune. You’ll be able to see it as a service and in Programs and Features. You'll also get a new folder structure and access to log files (IntuneManagementExtension.log for example)

The agent then checks for policy every 60 minutes. Remember the device itself only syncs every 8 hours? You can force the device to sync immediately by restarting the “Microsoft Intune Management Extension” service.

That sounds really cool, doesn't it and it is really cool. Wouldn't it be great if sidecar could be used natively to deploy .exe files without the need for scripts and independent Azure storage. Well Microsoft have been listening.


This has now been announced at Ignite so we can finally talk about it. The Intune management extension now supports native Win32 app deployment. This is made possible by the introduction of a new file extension that can be uploaded to Intune - the .intunewin file.

I've been able to get an advance preview of this so let's walk through the process

Prerequistes:
  • Windows 10 version 1607 and later
  • Windows 10 edition (Enterprise, Pro, Edu, IOT Core, IOT Enterprise Core)
  • Device must be Azure AD joined and Intune enrolled
Prepare the app

Microsoft have developed a new tool, the Microsoft Intune Win32 App Packaging Tool, to pre-process Win32 apps. The packaging tool converts application installation files into the .intunewin format. The packaging tool also detects some of the attributes required by Intune to determine the application installation state. After you use this tool on the app installer folder, you will be able to create a Win32 app in the Intune console. I've used it and it works really well.

You can download the tool from GitHub

You will also find the command-line parameters available for the tool.


Copy the app to a source folder. I've 7Zip for this test and it's small and quick, and it's an exe file. We've not been able to deal with this easily up to now.


Intune Win32 App Packaging Tool is a command line tool. Browse to the location and launch the tool. Specify the source location of the app (7Zip for me).



Specify the location for the output file. The tool executes and finally produces the .intunewin file....



...which you'll find in the output folder.

Upload the app



Now we can add the app in Intune, select the new file type available (at the bottom). This is not yet generally available.



Browse to the .intunewin app in the App package file pane.


Configure the app information.


Configure the program details. Note that you must know the silent installation (and uninstall) parameters.


Configure the requirements. You must enter OS architecture and minimum OS.


Configure the detection rule. We know all about this from ConfigMgr. We can choose MSI product code, presence of file or folder or registry value. I'm using the file-based option.


This is our detection rule.


I've accept the default return codes.


The app is uploaded to Intune and created.


Assign the app to an Azure AD group as normal.

Behavior on device.

My test device has already been used for testing of app deployment using PowerShell script. Therefore the Intune management extension is already installed. I've restarted the service to get immediate action.


I'm notified that software changes are required. The IntuneManagementExtension log file also tells me that a Win32App is about to be installed.


Installation is finished.

App is installed.

This is a huge step forward for software deployment to Windows 10 devices with Microsoft Intune. It is now much easier to deploy business Windows apps to MDM-enrolled devices. This can simplify your shift to the modern desktop. You don't have to change of course. If you're currently using ConfigMgr to deploy apps then keep doing that, as it works really well. If you want to go to modern desktop this new feature will remove a major roadblock.

I hope it helps you. 



Until next time........