Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 2.53 KB

File metadata and controls

42 lines (33 loc) · 2.53 KB

Technical Constraints PowerShell 7 Backward Compatability

PSMA PowerShell 7+ Support Summary

What Works

  • PowerShell 7+ on Windows Server 2012 R2: FULLY SUPPORTED
  • Execution Context: Runs under the FIM Sync Service account (typically FIMSynchronizationService or the account the sync service runs under)
  • PowerShell 7 Features: All modern PS7+ features work perfectly (ternary operators, parallel processing, chain operators, etc.)
  • Performance: Excellent - true out-of-process execution with full feature support

What Doesn't Work

  • PowerShell 7+ with Impersonation on Windows Server 2012 R2: ❌ NOT SUPPORTED
  • Root Cause: Fundamental OS-level compatibility issues between:
    • Windows Server 2012 R2's older process launching mechanisms
    • .NET Core's security token handling
    • PowerShell 7's process initialization requirements
  • Error Behavior: Process crashes (0xc0000142) or initialization failures

Requirements for Impersonation

  • Windows Server 2019 or later required for PowerShell 7+ impersonation
  • Alternative: Use Windows PowerShell 5.1 with impersonation on Server 2012 R2

Platform Support Matrix

Platform PowerShell 7+ PS7+ with Impersonation Windows PowerShell 5.1 WinPS with Impersonation
Windows Server 2012 R2 Supported Not Supported Supported Supported
Windows Server 2016 Supported ⚠️ Limited Supported Supported
Windows Server 2019+ Supported Supported Supported Supported

🔧 PSMA Behavior

  • Automatic Detection: PSMA detects the platform and provides clear error messages when unsupported combinations are attempted
  • Graceful Handling: Meaningful error messages explain the limitation instead of cryptic crashes
  • Service Account Execution: When impersonation isn't used, PowerShell 7+ runs perfectly under the FIM Sync Service account context

💡 Recommendation

For Windows Server 2012 R2 environments:

  • Use PowerShell 7+ when possible (runs as sync service account)
  • Use Windows PowerShell 5.1 when impersonation is required
  • Upgrade to Windows Server 2019+ for full PowerShell 7+ impersonation support

This gives you the best of both worlds - modern PowerShell 7+ features when possible, with reliable fallback options for impersonation scenarios.