Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2003 : Command-Line Utilities - SCWCMD & MBSACLI

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/16/2012 3:54:15 PM
In this section, I'll give an overview and some examples of various command-line utilities that pertain to Windows security that you can integrate into your scripts and programs.

1. SCWCMD

The Security Configuration Wizard (SCW) includes the Scwcmd.exe command-line tool . This tool is versatile and can perform many tasks that you might want to automate using scripts or batch files. Here, I'll briefly outline the most common tasks you will want to perform using SCWCMD.

1.1. Configuring servers with a policy

The most basic use of the command-line tool is to configure one or many servers with an SCW-generated policy. You can apply a policy to the local machine, to a remote machine using either its NetBIOS name or IP address, or to entire organizational unit's worth of machines. For example, to apply the machine.xml policy to the current computer, simply use this:

    scwcmd configure /p:machine.xml

To apply the policy to all of the machines in the FileServers OU within company.com, you need to use the full LDAP name within the arguments of the command. It should look something like this:

    Scwcmd configure /ou:OU=FileServers,DC=company,DC=com /p:machine.xml

1.2. Analyzing machines for policy compliance

You can also analyze a machine, a list of servers, or an entire organizational unit with an SCW-generated policy. For example, to analyze your SQL Server machine with the sqlserver.xml policy, use the following:

    scwcmd analyze /m:SQLservername /p:sqlserver.xml /u:administrator

Or, to analyze the SQL Servers organizational unit, use the following: (Note that the entire LDAP name needs to be used when specifying Active Directory-based containers with this command.)

    scwcmd analyze /ou:OU=SQLServers,DC=company,DC=com /p:sqlserver.xml /u:administrator


					  

The results of running this command are returned to an XML file generated by the wizard, which you can view using another option in SCWCMD. I'll demonstrate that in a bit.

1.3. Roll back SCW policies

If you make a mistake and need to "undo" a policy application on either a local or remote machine, you can use the command-line tool to get the machine back up quickly. You can also use the /u switch to perform the operation using another user's credentials, if yours aren't sufficient on a remote machine.

For example, to rollback a policy on the machine R2B2SRV1, use the following:

    scwcmd rollback /m:R2B2SRV1 /u:administrator

You can also use an IP address if you aren't sure of the friendly name of a machine:

    scwcmd rollback /m:192.168.2.2 /u:localadmin

1.4. Viewing analysis results

You can use the scwcmd view command to render the raw XML results file that the wizard generates with an XML transform file that makes the results easier to read. The directory %windir%\security\msscw\transformfiles contains .xsl transform files which are applied to the .xml policy file for the rendering process.

To view a policy file, use the following syntax:

    scwcmd view /x:policyfile.xml /s:policyview.xsl

2. MBSACLI

The Microsoft Baseline Security Analyzer has a command-line counterpart that will allow you to perform local and remote security scans and display reports from scans you conducted previously. You simply run MBSACLI from the directory in which the MBSA is installed.

It's fairly simple to perform a full scan of a single computer:

    Mbsacli /target computername

You can also scan the computer for updates only and create a report of the missing updates:

    Mbsacli /target CORP\lj-wnxp-dsk /wa

There's a great deal more syntax and options available, including the ability to create more customized reports that can be graphically displayed, sending reports in XML format for external parsing, scanning a list of computers, and using a custom update catalog file. Issue this command to learn more:

    Mbsacli /?
Other -----------------
- Sharepoint 2010 : FAST Search Server 2010 for SharePoint
- Sharepoint 2010 : Managing the Search Service Topology
- Microsoft Dynamics CRM 4.0 Accelerators : Notifications Accelerator
- Microsoft Dynamics CRM 4.0 Accelerators : Newsfeed Business Productivity Accelerator
- Recovering from a Disaster in an Exchange Server 2007 Environment : Recovering Exchange Application and Exchange Data
- Recovering from a Disaster in an Exchange Server 2007 Environment : Recovering from a Boot Failure & Recovering from a Complete Server Failure
- System Center Configuration Manager 2007 : Inside the ConfigMgr Database
- System Center Configuration Manager 2007 : Components and Communications
- Microsoft Content Management Server : Increasing Search Accuracy by Generating Search Engine Specific Pages
- Microsoft Content Management Server : Configuring Templates to Allow Postings to Return Accurate Last Modified Time
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server