SIW - Command Line Arguments

Option Meaning
/help List all available command line arguments
   
/quickReport 5 Create a Short Report file
/log Create an HTML Report file
/log[=filename] Create an HTML Report file
/log:csv[=filename] Create a CSV Report file
/log:html[=filename] Create an HTML Report file
/log:json[=filename] Create a JSON Report file
/log:txt[=filename] Create a TXT Report file
/log:xml[=filename] Create an XML Report file
/zip Compress the Report file
/all The Report file will include all modules(similar with /s:0xffffffff /h:0xffffffff /n:0xffffffff)
/append Append to an existing (CSV or TXT) Report File
/silent 1 Run with low priority; don't display anything during logging
/nodelete Don't delete the Report after emailing it
/details Create a Detailed Report
/nologo Don't display the Splash Screen
/shutdown Shutdown computer
/restart Restart computer
   
/email=address 2 Send Report as email attachment
/body=message Set email's body
/subject=message Set email's subject
/smtp[=smtp.server.com[:port]] 3 Send email using SMTP Server
/smtpFrom=email@example.com SMTP User (Authentication)
/smtpUser=user SMTP User (Authentication)
/smtpPass=password SMTP Password (Authentication)
/smtpSecurity=SSL|TLS Encrypted Connection Type
   
/ftp=url[:port] 2 Send Report using FTP
/ftpUser=user FTP User
/ftpPass=password FTP Password
   
/HttpPost=url[:port] 2,4 Send Report using HTTP Post
   
/s:number Set Options (Software)
/h:number Set Options (Hardware)
/n:number Set Options (Network)

Notes:

  1.     UAC Dialog may pop-up.
  2.     Report's file name must be absolute (ex: c:\temp\report.xml).
  3.     If the /smtp argument is missing, SIW will use the default MAPI client (usually Outlook or Outlook Express).
  4.     PHP Example:
    <?php 
    	$xmlData = file_get_contents("php://input");
    	$fileName = $_GET['file_name'];
    	$fp = fopen("./" . $fileName , "w");
    	fwrite($fp, $xmlData);
    	fclose($fp);
    	// Mandatory reply
    	echo "SIW-OK";
    ?>
  5.     /quickReport switch is not compatible with other switches. The report name is <COMPUTER_NAME><TIMESTAMP>.html
Software OptionsTop ↑
LOG Option Decimal Value Hex Value
Operating System 1 0x00000001
Installed Updates 65536 0x00010000
Missing Updates 131072 0x00020000
Server Roles 16384 0x00004000
Optional Features 32768 0x00008000
System Directories 2 0x00000002
Installed Programs 4 0x00000004
Applications 1048576 0x00100000
Licenses 1073741824 0x40000000
Security 8589934592 0x200000000
System Files 8 0x00000008
Accessibility 16 0x00000010
Environment 32 0x00000020
Regional Settings 134217728 0x08000000
File Associations 268435456 0x10000000
Running Processes 64 0x00000040
Loaded DLLs 524288 0x00080000
NT Services 128 0x00000080
Software Drivers 256 0x00000100
Autorun 1024 0x00000400
Browser Helper Objects 536870912 0x20000000
Scheduled Tasks 2048 0x00000800
Databases 2097152 0x00200000
Audio and Video Codecs 4194304 0x00400000
Shared DLLs 4096 0x00001000
ActiveX 8192 0x00002000
Shell Extensions 2147483648 0x80000000
Protected Files 262144 0x00040000
Event Viewer 17179869184 0x400000000
Certificates 34359738368 0x800000000
Hardware OptionsTop ↑
LOG Option Decimal Value Hex Value
System Summary 1 0x00000001
Virtual Machine 16384 0x00004000
Motherboard 2 0x00000002
BIOS 4 0x00000004
CPU 8 0x00000008
Memory 128 0x00000080
Sensors 8192 0x00002000
Devices 16 0x00000010
PCI 32 0x00000020
System Slots 64 0x00000040
Network Adapters 4096 0x00001000
Video 256 0x00000100
Sound Devices 1048576 0x00100000
Storage Devices 512 0x00000200
Logical Disks 131072 0x00020000
Ports 1024 0x00000400
Power Policy 524288 0x00080000
Battery 262144 0x00040000
Printers 2048 0x00000800
Resources 2097152 0x00200000
Network OptionsTop ↑
LOG Option Decimal Value Hex Value
Network Information 1 0x00000001
Extended Network Information 64 0x00000040
Network Statistics 2 0x00000002
Computers from Active Directory 4096 0x00001000
Groups from Active Directory 8192 0x00002000
Users from Active Directory 16384 0x00004000
Local Groups 256 0x00000100
Local User Accounts 512 0x00000200
Domain Groups 1024 0x00000400
Domain User Accounts 2048 0x00000800
System Accounts 128 0x00000080
Neighborhood Scan 32 0x00000020
Open Ports 4 0x00000004
Shares 8 0x00000008
Network Connections 16 0x00000010
How to use these numbersTop ↑

Let's assume that you want to log the following items:

  • Operating System (Software - 1)
  • Applications (Software - 1048576)
  • Licenses (Software - 1073741824)
  • Motherboard (Hardware - 2)
  • BIOS (Hardware - 4)
  • CPU (Hardware - 8)
  • PCI (Hardware - 32)
  • Extended Network Information (Network - 64)
  • Open Ports (Network - 4)

The value for the "/s" argument is 1 + 1048576 + 1073741824 = 1074790401 (or 0x00000001 + 0x00100000 + 0x40000000 = 0x40100001)
The value for the "/h" argument is 2 + 4 + 8 + 32 = 46
The value for the "/n" argument is 64 + 4 = 68

SIW Command line ExamplesTop ↑
  • Create an HTML Report and save it to a shared location

    siw /log:html=\\server\share\%COMPUTERNAME%.html /s:0x40100001 /h:46 /n:68
  • FTP Upload zipped report

    siw /log:xml=c:\%COMPUTERNAME%.xml /ftp=ftp.example.com
        /ftpUser=user
        /ftpPass=pass
        /s:1074790401 /h:46 /n:68 /zip
  • HTTP Post report

    siw /log:xml=c:\%COMPUTERNAME%.xml /httpPost=www.example.com/scripts/report.php
        /s:1074790401 /h:46 /n:68
  • Send zipped email using your SMTP Server

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=mail.example.com /smtpUser=user /smtpPass=pass /smtpFrom=FromEmail@example.com
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Google's Gmail and TLS

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=smtp.gmail.com:587 /smtpUser=me@gmail.com /smtpPass=pass /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Google's Gmail and SSL

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=smtp.gmail.com:465 /smtpUser=me@gmail.com /smtpPass=pass /smtpSecurity=SSL 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Hotmail (Live)

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=smtp.live.com:587 /smtpUser=me@hotmail.com /smtpPass=pass /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Yahoo!

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=smtp.mail.yahoo.com:465 /smtpUser=me@yahoo.com /smtpPass=pass /smtpSecurity=SSL
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using AOL

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=smtp.aol.com:587 /smtpUser=me@aol.com /smtpPass=pass /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using GMX

    siw /log:xml=c:\%COMPUTERNAME%.xml /email=MyEmail@example.com
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtp=mail.gmx.com:587 /smtpUser=me@gmx.com /smtpPass=pass
        /s:1074790401 /h:46 /n:68 /zip

Note: The environment variables (like %COMPUTERNAME% or %USERNAME%) are automatically expanded.