Practices Guide

Lifecycle Controller IntegrationBest Practices Specification
12
1 Contents
1.1 How to Use this Document
This document contains the detailed steps of common workflows to perform various tasks utilizing
winRM or WSMAN. The PYTHON scripting language was used to provide a software development kit
(SDK) for Lifecycle Controller (LC) API methods. Two primary objectives are addressed: first, that
workflows documentation provides guidance to established, known, working API methodologies, and
second, that corresponding PYTHON sample scripts are separately provided. After invoking these
scripts, the output log can be used to provide approximate timing on a particular system configuration,
as well as raw winRM or WSMAN input and output.
1.2 Using the Sample Scripts
Refer to the appendix for a full text README.
Getting started:
1) Install Python 2.4 to 2.6
2) Download scripts folder to desired location; no installation necessary
Running a script:
1) cd to scripts directory
2) python recite.py (opens command prompt of application)
3) set $IP 12.34.56 (Enter actual IP)
4) log whateverfilename.log w (may use any name for filename)
5) batch bestpracticeflows\script_name.win (launches script)
Note: A .win file is simply a text file containing calls to the recite PYTHON script.
Other commands:
-help (lists all available commands)
-set (list current IP, username, password, etc.)
Notes:
File output will be placed in scripts directory
1.3 Improving winRM Enumeration Performance
When an enumeration command is executed, the default WinRM configuration gets only 20 instances at
a time and therefore slows down the system drastically. Changing the WinRM configuration to allow a
greater number, such as 50, will reduce the time taken by the enumeration operations.
Also see section 3.9 for using CQL filters on enumerations.
Execute the following command to get instances in groups of up to 50.
winrm set winrm/config @{MaxBatchItems="50"}