Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By : Donabel Santos
Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By: Donabel Santos

Overview of this book

Table of Contents (21 chapters)
SQL Server 2014 with PowerShell v5 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Enabling Common Criteria compliance


In this recipe, we are going to enable SQL Server's Common Criteria compliance feature.

How to do it...

These are the steps to enable Common Criteria compliance using PowerShell:

  1. Open PowerShell ISE as an administrator.

  2. Import the SQLPS module as follows:

    #import SQL Server module
    Import-Module SQLPS -DisableNameChecking
  3. Add the following script and run:

    #replace this with your instance name
    $instanceName = "localhost"
    $server = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Server -ArgumentList $instanceName
    
    $server.Configuration.CommonCriteriaComplianceEnabled.ConfigValue = $true
    $server.Configuration.Alter()

You can confirm this from SQL Server Management Studio. Right-click on your instance, click on Properties, and select the Security page from the Select a page pane. In the Options section at the bottom, you should see the Enable Common Criteria compliance checkbox checked.

How it works...

The Common Criteria is a set of security standards maintained...