This cmdlet is used to configure the OU roots that SQL policies validate against for a session. The business value lies in ensuring that service accounts are properly configured and compliant with organizational standards.
- Users of this cmdlet include:
- System administrators responsible for configuring SQL services
- Security teams ensuring compliance with organizational policies
- Risks associated with misconfiguration:
- Service account security vulnerabilities
- Non-compliance with organizational policies
- A manager cares about this when:
- Ensuring service accounts are properly configured and compliant with organizational standards
- Verifying that SQL policies are being enforced correctly
To use this cmdlet, follow these steps:
- Open a PowerShell window and import the SpnManager module.
- Use
Get-Help Set-SqlSpnPolicyConfigto view help and examples for the cmdlet. - Use the following code as an example:
Set-SqlSpnPolicyConfig -ServiceAccountOU 'OU=ServiceAccounts,DC=corp,DC=example,DC=com'
- This will set the OU root for service accounts to
OU=ServiceAccounts,DC=Corpand clear any session overrides.
- Watchpoints:
- Verify that the OU roots are correctly configured after running this cmdlet.
- Ensure that SQL policies are being enforced correctly.
This cmdlet is used to set the account-compliance OU roots that SQL policies validate against for a session. Here’s a simple explanation of how it works:
- The cmdlet takes two parameters:
-OuRootsand-Reset. -OuRootsspecifies the OU roots that SQL policies will validate against.-Resetclears any existing session overrides and returns to the default values.- To use this cmdlet, follow these steps:
- Import the SpnManager module into a PowerShell window.
- Use
Get-Help Set-SqlSpnPolicyConfigto view help and examples for the cmdlet. - Run the cmdlet with the desired OU roots as an argument.
If you’re stuck, try checking the following resources:
- Online documentation for the SpnManager module
- Microsoft’s official PowerShell documentation
| Field | Value |
|---|---|
| Vendor | Detent Point LLC |
| Product | SpnManager 0.4.0 |
| Licence | Proprietary - licensed, not sold. See LICENSE. |
| Operational impact | Changes in-process configuration for the current session only. Touches no directory object and persists nothing. |
| Rights required | Directory read access. |
| Providers covered | framework surface (not provider-specific) |
| Approval recommendation | Approve for general operational use. It alters only the calling session’s own settings. |
Licence terms are proprietary and are supplied with the purchase, subscription or evaluation agreement. No open-source licence is granted.
| What | Why |
|---|---|
| Windows PowerShell 5.1 or later | Declared by the module manifest. |
| ActiveDirectory 1.0.0.0 | Required module. Ships with RSAT; install the Active Directory PowerShell feature. |
| A reachable domain controller | Every provider reads from Active Directory. |
| An account with directory read access | Needed to enumerate accounts and their SPNs. |
This cmdlet does not handle data directly. However, it is used to configure OU roots that affect the behavior of SQL policies, which in turn affect the handling of sensitive data.
- Data-in-transit: This cmdlet does not directly involve data transmission.
- Data-at-rest: This cmdlet configures OU roots that affect the storage and retrieval of data.
- Audit trail: SQL server auditing is enabled by default for this module.
- Compliance requirements:
- Ensure that service accounts are properly configured and compliant with organizational policies.
- Verify that SQL policies are being enforced correctly to ensure non-compliance is detected promptly.
Example 1
Set-SqlSpnPolicyConfig -ServiceAccountOU 'OU=ServiceAccounts,DC=contoso,DC=com'Points USER-account compliance at the contoso ServiceAccounts OU for this session.
Example 2
Set-SqlSpnPolicyConfig -ServiceAccountOU 'OU=Svc,DC=corp,DC=local' -GmsaOU 'OU=gMSA,DC=corp,DC=local' -PassThruSets both roots and echoes the effective config.
Example 3
Set-SqlSpnPolicyConfig -ResetClears the session override (falls back to the env-file/defaults).