KEMBAR78
DSC `Configuration keyword is not supported on ARM64 processors` despite using x86_64 pwsh · Issue #24848 · PowerShell/PowerShell · GitHub
Skip to content

DSC Configuration keyword is not supported on ARM64 processors despite using x86_64 pwsh #24848

@bdeb1337

Description

@bdeb1337

Prerequisites

Steps to reproduce

  1. Use an ARM based Mac.
bdeb at ~ 
14:09:09 ❯ sysctl -a | grep machdep.cpu
machdep.cpu.cores_per_package: 8
machdep.cpu.core_count: 8
machdep.cpu.logical_per_package: 8
machdep.cpu.thread_count: 8
machdep.cpu.brand_string: Apple M3
  1. Ensure you are using the x86_64 executable of pwsh which will run through Rosetta translation.
bdeb at ~ took 1m8s 
11:37:23 ❯ whereis pwsh-preview
pwsh-preview: /usr/local/bin/pwsh-preview /usr/local/share/man/man1/pwsh-preview.1.gz

bdeb at ~ 
11:38:58 ❯ file /usr/local/bin/pwsh-preview
/usr/local/bin/pwsh-preview: Mach-O 64-bit executable x86_64

bdeb at ~ 
11:39:03 ❯ pwsh-preview
PowerShell 7.6.0-preview.2
  1. As it is related to Misleading error message when parsing Configuration keyword on ARM processor #18781, prove that LanguageMode is FullLanguage:
PS /Users/bdeb> $ExecutionContext.SessionState.LanguageMode
FullLanguage
  1. Parse a script containing the Configuration keyword.
PS /Users/bdeb> $errors = $null                            
PS /Users/bdeb> [System.Management.Automation.PSParser]::Tokenize("Configuration MyConfig {}",[ref]$errors)
  1. View the resulting errors.
PS /Users/bdeb> $errors

Token                                Message
-----                                -------
System.Management.Automation.PSToken Configuration keyword is not supported on ARM64 processors.
System.Management.Automation.PSToken Unexpected token '}' in expression or statement.

Expected behavior

As hinted by SteveL-MSFT at #18781 (comment)

Note that on osx, if you still currently need this capability, you can use the x64 built version of PS7 and through osx emulation have it work.

I was hoping the parsing of DSC Configuration blocks would work on my ARM mac, so development of DSC configurations can be done here with proper tooling and feedback.

Wondering if anyone has this working right now, and knows if I might be overlooking or missing something?

Actual behavior

Currently, the Configuration block does not get parsed, and the error Configuration keyword is not supported on ARM64 processors. is thrown.

Error details

See Steps to Reproduce.

Environment data

PS /Users/bdeb> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.6.0-preview.2
PSEdition                      Core
GitCommitId                    7.6.0-preview.2
OS                             Darwin 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec  6 19:00:33 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8122
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions