Home

Intune PowerShell scripts

Nikola Nenadovic
Contributor

Hi,

 

I'm currently trying to run a PS script to add a VPN connection through Intune PowerShell.

When the script is run directly in powershell it executes as it should, adding the VPN connection.

On the other hand, if it executes through Intune PowerShell, nothing happens. I've searched the intune logs on targeted user's PC and also the online Intune portal where the script has a: Succeeded status.

 

Am I doing something wrong?

 

5 Replies
Hi Nikola, what settings have used in the PowerShell policy...

@neilcarden Add-VpnConnection

@Nikola Nenadovic 

 

Apologies, I meant here:

 

Capture.PNG

 

@neilcardenI've used the same settings as on your image

@Nikola NenadovicTry setting "Run script in 64 bit PowerShell host (when available)" to "Yes". I have found some very strange behavior when the scripts run within the 32-bit emulator. Things like, registry setting changes that only affect that Powershell session.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies