We normally arrange at least two physical events per year in our Swedish User group but this time we will do it online using Teams instead as the whole horrible Covid-19 is affecting the whole world. New this time as well we will do it in English as well!
Agenda for the day: 08:30 – Meeting Opens 08:45 – State of the union – Stefan & Jörgen 09:15 – Intune RBAC – Mirko Colemberg 10:00– Break / Networking (on your own!) 10:15 –Threat Response– Stefan Schörling / Mattias Borg 11:15 – Manage Intune using PowerShell – Timmy Andersson 11:45 – MEM – Kahoot!! 12:00 – Lunch 13:00 – Make the transition to Edge Chromium – Jörgen Nilsson 13:30 – Key security features you should enable during your M365 journey- Maurice Daly 14:00 – Break / Networking (on your own!) 14:15 – Configuration Manager Update & Cloud attach – Jörgen & Mirko 14:45 – Keep it simple when deploying Office365 languages – Dawn Wertz 15:15 – The End
Registration is free but you can select to support our User Group if you have the possibility in these pressing times. Registration can be done here: Register Now
The recordings from our SCUGSE – Client Day in April 2020 is now live on YouTube in the SCUGSE channel. Thanks to everyone who attended and for all the presentations by the great speakers! There were almost 250 people signed up for the meeting Connected in the MS Teams meeting at the same time was 190 = Amazing!
The recordings that are available are the following:
A lesson learned for the next time is to time the recording start better and end as well, it was hard to combine an online community event where we like questions with a great recording in these Covid-19 times. It is easier when you can sit together and moderate the questions. We will work on that an keep posted for more content to come on the YouTube Channel.
I always love testing out the new Technical Previews and I must say that this one is extremely impressive and all the features are in line with the times we live in now with Covid-19. The product team has once again outdone themselves in features that we need in this scenario. The features included in the preview is epic!
Where to start then? well let’s start with the new additions to Tenant attach CMPivot, Run Scripts, install Application and Timeline. Install application requires that you made the move to collections less deployment of apps using the approve feature. And it works great as you can see in the short video below. Timeline will be really useful for troubleshooting a client and available from everywhere, i can troubleshoot a client from my iPad amazing.
Short video demoing the Tenant attach features in MEMCM 2005 TP
Let’s look at the timeline, we enable it in Client Settings.
VPN Boundary type is a new boundary type which is used to automatically determine that a client is connected using VPN! Looking at the questions in user groups, forums and reddit configuring boundaries for VPN has been asked a lot lately and this is perfect in time. You can only have one VPN Boundary type.
OS Deployment from the cloud, yes you read it right PXE and Boot media are now able to use Cloud DP/CMG to download all content needed during OSD. Imaging the possibilities! remote offices, just send then a USB drive no more deploying over the internal WAN, less DP’s less hazzle. to test it out I have changed my Boundary Group to “Prefer cloud based sources over on-premise sources” ,added the CMG as site system, and enabled the client setting to “Allow access to cloud distribution point”
The result is an OSD running everything from the CMG.
OSD running from CMG
Taking a look at the SMSTS.log file it downloads the content from the CMG during OSD.
Improved Enable BitLocker steps in the Task Sequence are updated with a “Disk Encryption mode” one less .reg file to import during OSD great news!
Pre-provision BitLocker stepEnable BitLocker step
Community Hub, is also updated to allow more types of objects, for now only from Microsoft and not the community.
PowerShell Scripts
Reports
Task sequences
Applications
Configuration items
Report update failures to Microsoft, if and Configuration Manager update fails to install a new button will be displayed where you can report the upgrade errors directly to Microsoft = making the product even better for everyone!
There are more great additions that will save us time and make our life easier, like Notification for Azure AD app secret key expiration which I have ended up troubleshooting a couple of times already. More features:
Remove command prompt during Windows 10 in-place upgrade
Oh and even if nothing is noted in the docs, the remote control dialog with support for remote control over CMG/MP is back in the Technical Preview. It was first introduced in Technical Preview in 1906, let’s hope it makes it this time!
And if you have the time install the Technical Preview and provide feedback to Microsoft so we can make the product even better!
Custom backgrounds in Microsoft Teams is a really great feature, I love it! Use it all the time!
I got a question if users can roam their custom backgrounds somehow between machines and of course User Experience Virtualization(UE-V) comes to the rescue. If UE-V is already used and configured on the computers it is really simple, either we add a “teams.xml” file with the configuration needed to the Templates folder or register it using PowerShell for example “Register-UevTemplate -Path C:\Temp\teams.xml”
When adding a custom teams background using the + Add new option in teams.
After importing the template file we can verify that it works on two different machines or by looking in the settingspackages for my user where we can see the Teams-Background folder is created and contains data.
UE-V is a great feature still not being adopted enough by companies, as we can give the end-users an amazing experience roaming settings for applications both using on-premise or OneDrive for example. Google Chrome is a great example usage as well that is really appreciated which I blogged about a while back. https://ccmexec.com/2018/09/using-google-chrome-roaming-profile-settings-with-ue-v/
There are many blogposts on how to configure Autologon for use when deploying kiosk devices for example. I needed to solve that in a kiosk scenario, more kiosk blogposts will be posted later. What are the challenges with Autologon then? To start with the OOBE phase clears out all Autologon registry values so they need to be configured after OSD is complete. Another challenge is that the username and password is saved in clear test in the registry.
Run a PowerShell script during OSD that does the following:
-Writes the username to a registry value so we can pick up later (in another blog post) -Copies Autologon.exe to C:\Windows\Temp -Creates an Autologon.cmd file in C:\Windows\Temp which we can run as a scheduled task. -Autologon.cmd includes username/password for the kiosk user with permissions set to System -Creates a schedule task that runs Autologon.cmd -Autologon.cmd runs Autologon.cmd then deletes Autologon.cmd and AutoLogon.exe and reboots.
I use Collection variables to set username and password to be used during OS deployment shown below.
The group in my Task Sequence looks like this where I have a conditon on the group that the Task Sequence variable “KioskDomain” must be present for it to execute.
The configure Autologon step looks like this and executes the PowerShell script from the package we created earlier. Where I pass the username / password as variables to the script. A follow up post on this will explain how I will use that in a Run script as well.
The step “Move to correct OU” moves the computer to a Kiosk OU using an account that has the needed permissions. The script can be found here: https://github.com/Ccmexec/MEMCM-OSD-Scripts
The computer will restart once after the OSD completes and then the schedule task will start and execute the script and the machine will reboot and logon automatically.
Then we have successfully configured autologon during OSD without the password in clear text in the registry. Next post will cover the script I use to configure Windows 10 to run KioskMode with Multiple apps and how to update it as well, stay tuned!
Configuration Manager 2008 Technical preview is out! So many Cool features in MEMCM 2008 Technical Preview. Always great new features in there that will make our lives easier. I have a hard time decide which is the most useful feature, my top two favorites are Collection Query Preview and Integrated collection evaluator.
Collection query preview Many customers have a policy not to change a collection membership query after it has been created, to avoid surprises with what the result of the change are. Could be a very unpleasant surprise! But with the new feature where we can preview the result before we save the changes made to the query are simply great!
video showing the preview feature when creating/editing collection queries
Integrated Collection evaluator The collection evaluator viewer tool from the toolkit is really useful and not used enough as it is in the toolkit and not the product itself. Now when it is integrated it will be so much easier to use and used much more which will result in better performing environment out there! It has three views, -Manual Evaluation Queue -Full Evaluation Queue -Incremental Evaluation Queue -New Evaluation Queue It seems to be summarized every time I select Collection Evaluation, the Last Updated time is changed at least, will test it out when I have added more collections and queries in my Technical Preview lab.
For each each och the queues we have the following information. Collection Name Collection ID Estimated Completion Time Estimated Run Time
Full collection Queue
This will be extremely useful and should be included in every MEMCM admins check list once a week to make sure smooth collection evaluation and performance is maintained.
Windows 10 SetupDiag error charts More interesting investments made to Windows 10 Servicing with the automatic analyze of Windows 10 Servicing errors displayed in the console. Starting with Windows 10 2004 Setupdiag automatically runs on error and that is the information now being collected by Configuration Manager. My error chart is empty but this will be a great addition.
Collection errors and timeline view
Scenario Health Scenario Health is a great addition to the console where we can monitor dependent services like the first example out, the SQL Server Service Broker. Status is checked every 15 minutes per default which can be tweaked. Looking forward to many more services in future releases.
Scenario HealthScenario Health – SQL Service Broker job status
See task sequence size in the console A new column is introduced in the Task Sequences view, where we can see the size of the Task Sequence directly in the view.
Size column in Task Sequence view
Import objects to current folder A smaller but very appreciated change is the fact that we can import objects directly to the currently selected folder. This new behavior applies to applications, packages, driver packages, and task sequences.
Delete Aged Collected Diagnostic Files task A new Site Maintenance task that automates the cleanup of collected diagnostics files are also included in this Technical Preview release as shown below.
After writing that post my colleague Johan Schrewelius wrote a nice little C# part for us which we use in Powershell so we can create and configure a LSA secret using PowerShell instead of using Autologon.exe. Which doesn’t store the password in clear-text in the registry as it with traditional solutions. The script also creates a Schedule Task without any filecopying needed, a clean and nice solution. As background the OOBE part of the Windows setup clears out all the AutoLogon registry keys which is one of the reasons to use a Schedule Task that configures Autologon after deployment.
The script does the following: 1. Create a Schedule Task that runs the PowerShell script after the first reboot. 2. The script configures the necessary registry keys for Autologon and a LSA secret with the password so it is not stored in clear-text. 3. Deletes the Schedule Task 4. Reboots the computer so it logs on automatically.
The script will use the following three variables as shown below to configure AutoLogon. They can either be configured using Device variables, Collection variables, Task Sequence variables or script.
Example Collection variables used for Autologon
in the Task Sequence I use the following three steps. One that moves the computer to a Kiosk OU to make sure the correct Group Policies are applied. And the Reboot after OSD step sets the “SMSTSPostAction” variable to “cmd /c shutdown /r /t 30 /f”.
Sample Task Sequence Kiosk group
The PowerShell script itself can be imported in the Task Sequence instead of using a Package.
One of the new features in MS Edge v85 is support for roaming profile settings to a local file, profile.pb. This is great news for many organizations that cannot synchronize the user settings to Azure AD account due to for example laws, compliance or lack of Azure AD Premium. More information about the new feature in Edge version 85 can be found here: https://docs.microsoft.com/en-us/DeployEdge/microsoft-edge-on-premises-sync
I wrote a blog post about two years ago on how to roam the “Profile.pb” file in Google Chrome using UE-V here: https://ccmexec.com/2018/09/using-google-chrome-roaming-profile-settings-with-ue-v/ Tested using UE-V for the new MS Edge feature and it works fine as well! The short video below shows two computers with the same user logged on to both and roaming favorites between them.
Demo Favorites roaming in MS Edge 85 and UE-V
The new setting enables the creation of the “Profile.pb file” Note that Edge and Edge Beta saves the file in different locations per default which makes sense. The default location can be changed as well using a Group Policy as well if we want to point it to another folder. For MS Edge Beta the default folder is shown below.
Default location of the profile.pb file
To enable roaming using the local file we need to enable two Group Policies. “Configure automatic sign in with an Active Directory domain account when there is no Azure AD domain account” as shown below. NOTE: as the name indicates it will not work if the user exists in AzureAD in a Hybrid setup.
Configure automatic sign in
And then then we enable the creation of the profile.pb file by using the “Enable using roaming copies for Microsoft Edge profile data” as shown below.
Enable using roaming copies for MS edge profile data
If we look in MS Edge settings on the client we can see that the setting is applied.
MS Edge settings screenshot
I have posted the UE-V xml template for MS Edge beta as Edge Stable v.85 is not released when I write this post on Github here: https://github.com/Ccmexec/Other/tree/master/UE-V%20sample%20files Because the Edge Beta and Edge Stable saves the files in different locations I have created one for Beta and will post the one for Stable when it is released. The content of the file is really simple as shown below.
Configuration Manager 2009 Technical Preview is out with some great new features for us to test. One of them is Cloud Management Gateway(CMG) support for Virtual Machine Sets. This a great feature as it solves the CSP issue we had with CMG as it is using a classic service that is not available in a CSP subscription.
I needed to test it out of course, it was one of the scenarios as well which I always try to complete for all Technical Preview builds.
So what has changed? I deleted my “old” CMG and started over. We now have the choice when we setup a new CMG if we want to use “Virtual machine scale set” or “Cloud Service ( Classic)”. As shown below
Setting up a new CMG
What I of course failed at in my first attempt was to read the documentation…… hmm. Using Virtual machine scale sets requires new/different resource providers in Azure to be enabled in the Subscription. I logged in to my Azure Subscription and added the following Resource Providers that are required when using Virtual machine scale sets.
Azure Resource Groups
Next change is the new service name which includes the region as well, in my case North Europe. Which required a new certificate if cloudapp.net names are used as it is in my case. If you are using a different DNS name and certificate than cloudapp.net you can just update the CNAME in DNS to point to the new service name.
CMG setup new servicename
I requested a new certificate from my CA using the same template as I used to set it up my old CMG but with the new DNS name “CCMEXECTP4.northeurope.cloudapp.azure.com” as shown below.
CMG Setup new servicename
Next step is adding my trusted Root certificate.
Adding trusted root certificate
Then we configure our alerts for our CMG
Configuring CMG alerts
Next I reconfigured my Cloud Management Connection point to use the new CMG I have setup.
Cloud management gateway properties
Then we are done, a Configuration Manager cup of coffee or actually dinner in my case and the deployment of my new CMG using Virtual Machine Scale sets was ready to use!
CMG Deployed using Virtual machine scale set
If we look in azure there are a couple of new services created for us compared to when we use the classic CMG or should we start calling it “Legacy” now?
A great addition to Configuration Manager cannot wait until it ships. Support for CSP has been a long awaited feature and discussed numerous times. For more information about what is new in MEMCM 2009 TP check out the docs: Technical Preview 2009 Now that I have a new CMG up and running testing out remote control over CMG will be my next task.
Had to test out this feature as well in Configuration Manager(MEMCM) 2009 Technical Preview, remote control over Cloud Management Gateway(CMG). A long awaited feature that was first introduced in Technical preview 1906, Technical Preview Docs and then removed again for a year or more.
Being able to remote control a computer over Internet using CMG has been asked for many many times the last couple of months with all Work from home that is being done now in these hard Covid-19 times. So I needed to check it out and recorded a short video here on how the experience was as shown below.
Remote control over CMG
The requirements for using it is the following from the Docs, more information can be found here: Technical Preview 2009
The user that is remote controlling, needs to be added to the list of permitted viewers in client settings/remote control.
The CM Client needs to be updated and online over CMG
The following authentication options can be used.
A valid PKI client certificate
Azure Active Directory (Azure AD)
Token-based authentication
It works really well haven’t tested slower connections yet…
One thing I will file as feedback is that it seems like it is trying to resolve the client the local network first and after timeout tries to use the CMG. This takes a while as you can see in the video above and could be stressful when trying to remote control a computer both for the end user and the technician.
Great that we finally can test it again at least, let’s hope it makes it to the next release.
SCUG.SE welcomes you to two afternoons packed with Workplace management goodness! We normally host two physical events in Stockholm every year, but with the Covid-19 situation that is not possible. So instead we are doing it online using Teams. We did a poll in our Swedish user group about the format and the winning format was to host the event over two afternoons instead of a whole day event. The community has spoken so that is what we are planning. For this Online event in October we have a great lineup of speakers and sessions! We welcome:
We still have two slots open; we will announce them soon.
Agenda 6/10:
Agenda 7/10:
Registration is free with an option to sponsor our User Groups if you like. Registration We will email the event link a couple of days before the event to all registered attendees.
I wrote a post on how to use Autologon.exe and PowerShell, thanks Johan Schrewelius, to make Autologin in Windows 10 a little bit more secure a while ago. https://ccmexec.com/2020/08/windows-10-secure-autologon-powershell/ Taking this one step further I wrote a blogpost for 4Sysops.com on how to configure a multiapp Kiosk where that script is used as part of the solution to configure a multiapp Kiosk.
To follow up on the post on deploying a Windows 10 multi-app kiosk using MEMCM, this post shows how we can update the configuration using Run Scripts in Configuration Manager (MEMCM).
The update released is not available in WSUS yet. It will be made available in early 2021 according to the KB article mentioned above which in my opinion is a bit late. It is available in Microsoft Update catalog though which is a good start then we can import it in WSUS, synchronize it to MEMCM and deploy it. Note: Once the update is installed it cannot be uninstalled if you need to re-enable Flash.
I have imported it in a couple environments and run into some different issues so I wrote this post to save you some time googling the errors.
Import and deploy the update
To import the update we need to start the WSUS admin console using Run as administrator. From there we can then select import updates, Internet Explorer 11 is launched and we are directed to Microsoft update catalog.
Import updates in WSUS admin console
We search for our KB4577586 to find our update.
Search in Microsoft Catalog
We select the update for the versions and architecture we need, then select add to basket.
Select updates for Windows Version and architecture
From the “basket” view we can select to import the update directly into WSUS as shown below.
Import directly into Windows Server Update Services
When clicking Import the updates are imported into the WSUS Database. The process is really fast as the update is really small.
Import successful
When the import is completed we start a manual synchronization of updates in MEMCM as we lack patience to wait for the next sync to occur.
Run Synchronization in the admin Console
Then we take a Configuration Manager cup of coffee and wait until the synchronization is complete, once it is complete. We can deploy the update and start testing it out.
Updates ready to deploy in the Admin console
Troubleshooting WSUS import errors
Make sure you start Internet Explorer once with ” Run as administrator” and navigate to the Microsoft Update catalog website. Install the ActiveX when supported. If you get the below message I found it easiest to add “http://catalog.update.microsoft.com” to the trusted sites zone. Note “HTTP” it is old stuff and the link from the WSUS admin console uses HTTP…..
Another issue I always run into the first time is to actually download the updates as shown below.
In every modern management project where we use Azure AD Join instead of traditional domain join, there are always some network drives that needs to be mapped for the end users. Not very modern I know but there is a real world out there as well. When we use a modern client using sleep or hibernate is the new way to work. Running a script at logon isn’t enough we need to be more flexible. There are a great number of great logon script samples out there so I will not go down that way. Instead adding a trigger to a scheduled task to run when we connect to a network with a specific name, is a useful addition which makes the end-user experience much better.
Here is a short demo on how to map drives when connecting to corporate network.
But wait! No blue PowerShell splash screen was in the video. I use PSRun.exe that my colleague Johan Schrewelius has written which you can find here: https://onevinn.schrewelius.it/Apps01.html. PSRun suppresses the PowerShell splash screen and passes all commands that you execute PSRun with directly to PowerShell.
To achieve this, we add a trigger to our schedule task so we have two triggers on it, one to run at logon and one custom that runs when connected to a network with a specific name. It looks like this:
Schedule Task triggers
The custom event filter contains the network name for which we will use to trigger the script when connected to.
Custom event filter
The scripts
I wrote a simple sample script to import the schedule task and copy the simple script I used to map the drives to C:\Program Files\ConnectDrives. It also writes to the registry so there is a registry key and value. Which can be used as a detection method when deploying it using Win32App on our modern clients.
In a project lately we use Windows 10 Personal devices that enroll into Intune. Works great, but…. When we configured Conditional Access even if the device is compliant it still blocks access since more Work accounts are configured on the device. On the personal device in this scenario a personal Microsoft Account is used to logon to the device.
Looking under Access work or School under Settings we have more than one account. On an Azure AD Joined device this works just fine, but in a Personal device you cannot add more than one work account using settings that is.
If we try to add an account from settings, we get this error.
How was the second account added then? Well Outlook is the “bad” app in this case. When you add a second account in Outlook you get this question.
And how many end-users actually select “No, sign in to this app only”??? What happens when a second account is added, which is blocked for a reason in Windows? Synchronization with Intune fails.
If we look in the Event log, we find the following error.
It seems like there is a reason that Windows 10 blocks adding more than one work account. How can we help the end user making the correct choice in Office? Well in the same way we do it for an Azure AD Hybrid Joined device, that blocks AAD registration by configuring the following registry value,
Here is a simple PowerShell Script that we can deploy using MEM to the devices. Then the end user does not get the choice to register the device anymore from Office apps.
We create a Dynamic Azure AD group which will include all our enrolled Personal Windows 10 devices, which we can use to target the PowerShell script.
Rule syntax:
(device.deviceOwnership -eq "Personal") and (device.deviceOSType -startsWith "Windows") and (device.managementType -eq "MDM")
Upside, happier end-users, less support calls.
Downside, well as the device is personal and the end-user wants to restore the functionality to register the AAD device, the registry key needs to be removed.
During that session we demoed a new community tool or actually two community tools from my colleague Johan Schrewelius.
DeploymentScheduler – An advanced UI to schedule updates, app deployments, upgrades, reboots and much more.
IPUInstaller – A solution to do Windows 10 Servicing in a new way, with driver support, post upgrade actions, full media or .ESD support and much more.
One of the reasons this was developed was to provide an alternative to Task Sequence and Windows Servicing to manage upgrades of Windows 10 to Windows 10. Task Sequences are the most used way to do in-place upgrades when we asked the community on Twitter.
Many customers and end-users are getting tired of the long downtime when doing an in-place upgrade of Windows 10 using a Task Sequence. Work from home also requires us to do things in new ways.
I did a non-scientific comparison between some options. Fairly clean Windows 10 1909 upgraded to Windows 10 20H2. This will take longer when testing on a computer that has been used for a while.
We always want the user to be productive which is the main driver from the end-users and business. IPUInstaller is an application that we deploy just like that, an application in Configuration Manager. It has a folder structure that looks like shown below.
In the media folder we place a fully updated In-place upgrade media, which can be created for example by using WIM Witch which is a great tool by Donna Ryan. https://msendpointmgr.com/2019/10/04/wim-witch-a-gui-driven-solution-for-image-customization/ In the SetupComplete folder we can add post commands and for all of you using TSBackground you will recognize Runsilent.exe and Runsilent.ini. Which can be used to run commands hidden, for example suppress the blue PowerShell splash screen. Example from what I have in my folder when testing.
Runsilent will create a log file as well in C:\Windows\Temp where you can see the exit codes from the commands and help you troubleshoot. In Configuration Manager we extend the HW inventory and create a collection structure that looks like this.
The computer will then move between Failed, Succeeded and pending reboot based on the inventory of registry values that the are written by IPUInstaller.
If IPUInstaller failes there will be more values in the inventoried IpuResult as shown below.
There is also a script that can be run as a Run Script in the console to retry the upgrade.
Johan has created a useful tool which provides us a new way of managing In-place upgrades, he has also written a great documentation which you can find here https://onevinn.schrewelius.it/
Edge is updated often and if we use AutoUpdate which I think we should use for Edge it is automatically updated after OS deployment. But in some cases, we need policies to be applied to Edge that are only supported in newer versions then we need to make sure it is updated when the user logs on.
I found this great PowerShell module “Evergreen” https://www.powershellgallery.com/packages/Evergreen written by Aaron Parker; Bronson Magnan; Trond Eric Haarvarstein. Which makes this task easy as we can use that module to check the latest version, get download paths and so on. I have used to send emails when new versions are being published so a ticket is being created in our helpdesk system. Be sure to check it out!
Check if a new version of Edge (stable) is available
Download the latest version if needed to a staging folder
Copy the EdgeEnterprise.MSI to the source folder configured in the script
Update the Source files on Distribution Points
In this setup I used the wizard in MEMCM to create the Edge application, the detection method created by the wizard uses the “Greater than or equal to” Operator so it will still work just fine even after we updated the Source files.
Detection Method example
The script can be run as a schedule task on a server/computer, it needs the Configuration Manager console installed or cmdlets.
Before using the script, the following lines needs to be adjusted to your environment.
Script parameters
$CMEdgeAppName = The name of the Edge application that should be updated. $CMAPPDeploymentType = The Deployment type Edge that should be updated. $TempPath = Path to staging folder where the new .MSI will be downloaded to. $TargetPath= the path to the source files for Edge $VersionsToKeep = how many versions of Edge should be saved in the Staging folder.
The script will create the staging folder, in this example “D:\staging”. It can also be configured to keep x number of versions if for some reasons a rollback is needed, after that it will start deleting the oldest one.
Staging folder content
It also creates a log file that can be used to troubleshoot if something went wrong when running the script.
When we use AutoPilot with Windows 10 and Intune one of the great benefits is that we can make the enrolling user a standard user and not local admin per default. In some case we of course need to make the users who enrolled the PC a local admin, perhaps after ordering it from a self-service solution. This script can be run as a script from Intune, it reads which user enrolled the Windows 10 device from the following registry location. HKLM:/SYSTEM/CurrentControlSet/Control/CloudDomainJoin/JoinInfo
Registry location of Joininfo
Then we use that information to add the user to the local administrators group. A very simple way to make the user local administrator on the device. Adding the computer to the Azure AD group we deploy the script to will make the job done! The script can be downloaded here: https://github.com/Ccmexec/Intune-MEM/tree/master/Make%20Enrolled%20user%20local%20admin
We then add it to Intune as a script with the following settings, note that the script must be run as a 64 bit script as for example “Get-LocalGroup” is not available in 32-bit PowerShell on a 64-bit system.
Script properties in Intune
The script will output information to C:\Windows\Temp\localadmin.log, if it is re-run it will check that the user is in the local admin group and output that instead of that is has added the user.
Sample logging
The script works on localized Windows 10 versions, tested on Swedish to make sure. A challenge was that the “Get-localGoupMember” PowerShell command doesn’t work on an AzureAD joined device as there are two unresolved SIDs in the member list. It will throw the following error.
This solution is provided to the Community by Daniel Gråhns and Nicklas Eriksson, Twitter(Sigge_gooner), thank you for sharing it! Great work!
As the title says it is a solution for deploying drivers and software during a Task Sequence using HP Image Assistant. The benefit of using this is that you can automate the whole process of downloading and updating drivers and solve the additional software needed for HP devices. Including the software needed as that is not included in the driver packs. The purpose of this solution is to:
Install HP drivers and related Software during OS Deployment.
Automate download of drivers/software
Create and distribute packages in Configuration Manager
Easily update the drivers/software to the latest version automatically
How does it work
In the folder with the scripts, we have the following files.
Sample folder structure
All configuration is done in the Config.xml file by editing the variables there. Site Code, Package path and more, It is well documented in the script. In the Import-models.csv file we simply put the Basebord ID, Modelname and OS version as shown below.
Import-models.csv sample
Then we run the script, it will download the Softpaqs, create a Package and distribute it to the dp group we select in the config. We will cover that later in this post. The script will automatically install HPCSML and update it if needed.
Import script running
In the task sequence we run the following commands that will use the Configmgr Webservice to populate the variables for which package should be used. Then it is downloaded and installed by using the image assistant and the files downloaded to the local disc as source.
Task Sequence step
If a second pass of HPIA is needed, which could be the case simply just add that model to the Conditions for the “Second HPIA Pass if needed”
We will not cover how to install the ConfigMgr webservice, that is included in the manual provided with the download above.
HP Software Framework
We need a Package in Configuration Manager with the HP Software Framework. Here is how to download and extract the .msi file.
Download the file “CASLSetup.exe” from the HP FTP site.
CASLSetup.exe on HP FTP
Save it to a temp folder like E:\Temp
Run the following command: CASLSetup.exe /s /x /b”E:\Temp” /v” /qn” That will extract the .msi to E:\Temp.
HP Software Framework .msi
Then copy the file to your MEMCM Package source share
Create a Package and Program in Configuration Manager for the HP Software Framework using the “Create package from definition” and use the .MSI works just fine.
Distribute the content to the correct DP group.
HP WinPE driver Package
As we install all drivers using HP Image Assistant we still need storage drivers and network drivers to be installed during OSD to be able to get Windows 10 up and running.
Download the HP WinPE package that matches the OS version you are deploying.
Import the drivers to a driver package we can then use in the Task Sequence as shown below.
HP WinPE step in the TS
Use the following conditions so it only installs for HP devices.
Condition to for HP devices
PowerShell script
Before we run the script for the first time, we need to configure it for our environment.
Download the HPIA.zip file from Github here:
Extract the content to a folder, in my example “E:\HP Repository”
Open the importHPIA.ps1 and edit the following line to match your environment.
Repository path in the PowerShells script
Then edit the config.xml file with all the information in there. Should be self-explained.
Variables in the Config.xml file
Then we are ready to run the script for the first time, there is a log file as well you can use to check for errors if the script is run as a Scheduled Task for example. The result in my case will look like this.
Packages in CM
And the packages have gotten the information needed for the Configmgr Webservice to pull them down.
Package properties
Task Sequence import
The steps needed in the Task Sequence can be downloaded from Github and then imported to make it as easy as possible.
Download the Exported task sequence and import it in Configuration Manager
Select “Ignore Dependency” when importing it.
Task Sequence import warning
Edit the imported task sequence
Fix the error so the package for HP Software Management Framework is correct
HP Software Framework step
Edit the “PowerShell download script” so the URL and Secretkey matches your installation of the Configmgr Webservice.
PowerhShell script
Copy the whole group included in the Task Sequence so it runs after the full OS is installed.
Putting it all together
Edit the “import-models.csv” file with your information as mentioned above.
Sample import-models.csv
Then it is time to run the script and watch it download the drivers for our models and then test out the deployment. You can schedule it as well of hours and let it update the driver packages if needed. Again thanks to Daniel Gråhns and Nicklas Eriksson for sharing the solution. Great work!