Running logon scripts when a user logs in to a computer allows administrators to deploy and configure machines beyond what is possible with Intune.
With Intune, we can run PowerShell scripts when a user logs on to their machine. In this post, we will run a simple PowerShell script that creates a directory on the c:\.
In our case, we are using Intune to PowerShell scripts to Windows 365 machines and in our previous post, we showed how to deploy Chrome.
Script
Below is the script that I am going to deploy.
New-Item -Type Directory -Path c:\ -Name deploy
Run Scripts
To deploy a PowerShell script with Intune, open the Intune console. Click on Devices -> Scripts and click on Add from the scripts main page.
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2021/09/image-11-890x1024.png)
In the Script Setting settings, Upload your script and leave all the settings as default.
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2021/09/image-12-1024x438.png)
In the Assignments, section select an Azure AD Group that contain the devices you would like to deploy the script to and finish the wizard.
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2021/09/image-13-1024x419.png)