How to Fix PowerShell Language Settings Deployed Through Intune
Question details
The user needs to troubleshoot a PowerShell language script that behaves differently when deployed via Microsoft Intune compared to local execution.

- Product
- Microsoft Intune
- Device & OS
- Windows
- Scenario
- Deploying language settings scripts to endpoint devices using Microsoft Intune.
- Observed behavior
- The script fails or applies incorrect settings due to execution context, user permissions, or system context variations during deployment.
Ensure you have administrative access to the Microsoft Intune admin center and that the target devices are actively syncing with your Intune policies.
Verify Execution Context and Review Intune Logs
Check how the script is executed within Intune and use local device logs to identify the exact point of failure.
PowerShell scripts can behave differently depending on whether they are executed in the System context or User context. Scripts modifying user-specific language settings must run under the logged-on user's credentials to apply correctly.
In the Microsoft Intune admin center, navigate to your deployed PowerShell script properties. Ensure the 'Run this script using the logged on credentials' setting is configured to 'Yes' if the language settings are user-specific.
Confirm that the Intune script deployment is set to bypass the device's local execution policy to ensure the script has permission to run on the endpoint.
Modify your PowerShell script to output transcripts or write logs to a specific local directory (e.g., C:\Temp\LanguageScriptLog.txt) using the Start-Transcript cmdlet to monitor which commands succeed or fail.
On the target endpoint device, navigate to C:\ProgramData\Microsoft\IntuneManagementExtension\Logs and review the log files to identify exact deployment errors.

Deploy WPS Office as Your Lightweight Enterprise Alternative
While troubleshooting Intune deployments and system configurations, consider simplifying your endpoint software footprint. WPS Office provides a free, lightweight, and fully compatible alternative to Microsoft Office that is easy to deploy across enterprise environments.
- 1. Download the installer: Obtain the latest WPS Office enterprise or standard installer from the official WPS website.
- 2. Package for deployment: Prepare the executable or MSI file for deployment using the Win32 Content Prep Tool if deploying via Intune.
- 3. Assign to devices: Upload the packaged app to the Intune admin center and assign it to your desired device or user groups.

Frequently Asked Questions
Why does my PowerShell script work locally but fail in Intune?
Locally, scripts run with your current user privileges and environment variables. By default, Intune deploys scripts in the System context, which lacks access to user-specific settings, language profiles, or mapped network drives.
Where can I find the Intune deployment logs on a local machine?
The logs for Intune management extension and script deployments are located on the Windows client device at C:\ProgramData\Microsoft\IntuneManagementExtension\Logs.
How do I force a PowerShell script to run as the logged-in user in Intune?
When adding or editing the script in the Microsoft Intune admin center under 'Devices > Scripts', toggle the setting 'Run this script using the logged on credentials' to 'Yes'.




