Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using scwcmd

The scwcmd tool is used to manipulate policies created by the SCW. The following table shows some common uses.

scwcmd CommandComments
Create a GPO from a SCW policy.
scwcmd transform /p:policy-
file.xml /g:gpo-name
C:\>scwcmd transform /p:c:\
windows\security\msscw\
policies\scwtest.xml
/g:SCWTest

Transforms a security policy file generated by using SCW into a new Group Policy object (GPO) in Active Directory Domain Services (AD DS).

The /p switch needs to include the path to the SCW policy file, and the /g switch names the GPO.

Figure 17-2 shows the GPO named SCWTest created in the Group Policy Management Console (GPMC) from this command.

Tip

The case you use for the GPO is used when the GPO is created. For example, if you use /g:scwtest, the GPO is named scwtest, but if you use /g:SCWTest, the GPO uses the same case named SCWTest.

Note

Although the GPO is created and accessible in the GPMC, it is not linked anywhere by default. You must take the extra step in the GPMC to link it.

Analyze a computer against a policy.
scwcmd analyze /m:computer-
name | /ou:ou-DN
/p:policy-file.xml
C:\>scwcmd analyze /p:c:\
windows\security\msscw\
policies\scwtest.xml
C:\>s cwcmd analyze /m:dc1
/p:c:\windows\security\msscw\
policies\scwtest.xml
C:\>s cwcmd analyze
/ou:"ou=sales, dc=pearson,
dc=pub"
/p:c:\windows\security\msscw\
policies\scwtest.xml

Determines whether a computer is in compliance with a policy. It compares the policy against the computer (or computers) and creates a file indicating any discrepancies.

You can run the command against the local computer without the /m or /ou switch, a remote computer with the /m switch, or an OU with the /ou switch.

The first example analyzes the local system, the second example analyzes a server named dc1, and the third example analyzes all the computers in the Sales OU. You can then view the xml file identified by the /p switch, which documents any discrepancies.
Configure systems with the policy.
scwcmd configure /m:computer-
name | /ou:ou-DN  /p:policy-
file.xml
C:\>scwcmd configure /p:c:\
windows\security\msscw\
policies\scwtest.xml
C:\>s cwcmd configure /m:dc1
/p:c:\windows\security\msscw\
policies\scwtest.xml
C:\>s cwcmd configure
/ou:"ou=sales, dc=pearson,
dc=pub"
/p:c:\windows\security\msscw\
policies\scwtest.xml

The configure command applies a SCW-generated security policy to one or more computers. This syntax is similar to the analyze command. You can apply it to the local computer, a remote computer with the /m switch, or all computers in an OU with the /ou switch.
Roll back a policy.
scwcmd rollback /m:computer-
name
C:\>scwcmd configure /m:dc1

Applies the most recent rollback policy available, and then deletes that rollback policy. You can roll back a policy on only one computer at a time.

Note

Rollback policies are created and stored in the c:\windows\security\msscw\rollbackfiles folder by default.

View a policy.
scwcmd view /x:policy-file.xml
C:\>scwcmd view /x:c:\windows\
security\msscw\policies\
scwtest.xml

Displays an xml file in an interactive page. Figure 17-3 shows the result of this command.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint