Sign powershell scripts?!?!

I have some PowerShell scripts that will extract data from Intune. Each time you run them you first have to run this command. Connect-AzureAD then enter your credentials. How do you bypass that? Is there a way to “sign” scripts? I’ve heard of Graph in Intune? Can anyone show me an example or YouTube video that explains how this is done?
Thanks.

Script signing and what you’re trying to do aren’t the same thing.

You want to use an App Registration to authenticate. You can use an App Registration with the PowerShell Graph SDK or with the AzureAD module. The latter is planned for deprecation so you should try to work with the Graph SDK wherever possible.

This guide is a good starting point:

2 Likes