Prerequisites
Summary
Whilst writing the docs for Microsoft.Windows/FirewallRuleList, I noticed that export requires elevation through the manifest. Looking at the code bats, both get_rules and export_rules call the exact same FirewallStore::open().
I don't think there's any reason, looking at the code-level, why enumerating all rules would need elevation when reading a named rule doesn't.
Steps to reproduce
N/A.
Expected behavior
Able to export all rules non-elevated
Actual behavior
ERROR Security context: Operation 'export' for resource 'Microsoft.Windows/FirewallRuleList' requires security context 'elevated'
Error details
Environment data
Name Value
---- -----
PSVersion 7.6.0
PSEdition Core
GitCommitId 7.6.0
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
dsc 3.3.0-preview.1
Visuals
No response
Prerequisites
Summary
Whilst writing the docs for
Microsoft.Windows/FirewallRuleList, I noticed that export requires elevation through the manifest. Looking at the code bats, bothget_rulesandexport_rulescall the exact sameFirewallStore::open().I don't think there's any reason, looking at the code-level, why enumerating all rules would need elevation when reading a named rule doesn't.
Steps to reproduce
N/A.
Expected behavior
Able to export all rules non-elevatedActual behavior
ERROR Security context: Operation 'export' for resource 'Microsoft.Windows/FirewallRuleList' requires security context 'elevated'Error details
Environment data
Version
dsc 3.3.0-preview.1
Visuals
No response