diff --git a/src/Microsoft.PowerShell.Security/security/AclCommands.cs b/src/Microsoft.PowerShell.Security/security/AclCommands.cs index fd93a869517..3d1a73f6358 100644 --- a/src/Microsoft.PowerShell.Security/security/AclCommands.cs +++ b/src/Microsoft.PowerShell.Security/security/AclCommands.cs @@ -1194,7 +1194,7 @@ private IntPtr GetSaclWithCapId(string capStr) } // Add CAPID to the SACL. - rs = NativeMethods.RtlAddScopedPolicyIDAce( + rs = NativeMethods.AddScopedPolicyIDAce( pSacl, NativeMethods.ACL_REVISION, NativeMethods.SUB_CONTAINERS_AND_OBJECTS_INHERIT, diff --git a/src/System.Management.Automation/security/nativeMethods.cs b/src/System.Management.Automation/security/nativeMethods.cs index e1465e8fdec..49561ae58df 100644 --- a/src/System.Management.Automation/security/nativeMethods.cs +++ b/src/System.Management.Automation/security/nativeMethods.cs @@ -1786,8 +1786,8 @@ internal static extern bool InitializeAcl( uint nAclLength, uint dwAclRevision); - [DllImport("ntdll.dll", CharSet = CharSet.Unicode)] - internal static extern uint RtlAddScopedPolicyIDAce( + [DllImport("api-ms-win-security-base-l1-2-0.dll", CharSet = CharSet.Unicode)] + internal static extern uint AddScopedPolicyIDAce( IntPtr Acl, uint AceRevision, uint AceFlags,