SIW - Command Line Arguments

Option Meaning
/help List all available command line arguments
   
/shortReport Create a Short Report file 4
/log Create an HTML Report file
/log[=filename2] Create an HTML Report file
/log:csv[=filename2] Create a CSV Report file
/log:html[=filename2] Create an HTML Report file
/log:json[=filename2] Create a JSON Report file
/log:txt[=filename2] Create a TXT Report file
/log:xml[=filename2] Create an XML Report file
/log:odbc Save the Report into a database using ODBC (similar with siw2odbc)
/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 Run with low priority; don't display anything during report creation 1
/details Create a Detailed Report
   
/upload=protocol[:port]://[user:password@]url Send the Report using protocol 3, 7
   
/email=address Send the Report as email attachment 3
/body=message2 Set email's body
/subject=message2 Set email's subject
/smtp[=smtp.server.com[:port]] Send email using SMTP Server 5
/smtpFrom=[email protected] SMTP User (Authentication)
/smtpUser=user SMTP User (Authentication)
/smtpPass=password SMTP Password (Authentication) 6
/smtpSecurity=SSL|TLS Encrypted Connection Type
   
/shutdown Shutdown computer
/restart Restart computer
   
/s:number Set Options (Software)
/h:number Set Options (Hardware)
/n:number Set Options (Network)
   
/noSDK Don't use CPUID SDK
/noWMI Don't use WMI
/noACPI Don't use ACPI
/ACPI Use ACPI
/maxwait=n Wait maximum n seconds (default is 300 seconds)
   

Notes:

  1.     The UAC Dialog may pop-up.
  2.     If the value contains spaces, it must be included between double quotes.
  3.     Report's file name must be absolute (ex: c:\temp\report.xml).
  4.     /shortReport switch is not compatible with other switches.
    The report name is <COMPUTER_NAME><TIMESTAMP>.html
  5.     If the /smtp argument is missing, SIW will use the default MAPI client.
  6.     Gmail, Yahoo!, and iCloud require App Password.
  7.     Examples:
    • FTP: /upload=ftp://gabriel:[email protected]
    • FTPS: /upload=ftps://gabriel:[email protected]
    • HTTP POST: /upload=https://gabriel:[email protected]/upload.php
      where upload.php looks like this:
      <?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";
      ?>
Software OptionsTop ↑
Report Option Decimal Value Hex Value
Operating System 1 0x0000000001
Installed Updates 65536 0x0000010000
Missing Updates 131072 0x0000020000
Server Roles 16384 0x0000004000
Optional Features 32768 0x0000008000
System Directories 2 0x0000000002
Installed Programs 4 0x0000000004
Applications 1048576 0x0000100000
Licenses 1073741824 0x0040000000
Security 8589934592 0x0200000000
System Files 8 0x0000000008
Accessibility 16 0x0000000010
Environment 32 0x0000000020
Regional Settings 134217728 0x0008000000
File Associations 268435456 0x0010000000
Running Processes 64 0x0000000040
Loaded DLLs 524288 0x0000080000
NT Services 128 0x0000000080
Software Drivers 256 0x0000000100
Autorun 1024 0x0000000400
Browser Helper Objects 536870912 0x0020000000
Scheduled Tasks 2048 0x0000000800
Databases 2097152 0x0000200000
Audio and Video Codecs 4194304 0x0000400000
Shared DLLs 4096 0x0000001000
ActiveX 8192 0x0000002000
Shell Extensions 2147483648 0x0080000000
Protected Files 262144 0x0000040000
Event Viewer 17179869184 0x0400000000
Certificates 34359738368 0x0800000000
WinRT Classes 64 0x0000000040
Hardware OptionsTop ↑
Report Option Decimal Value Hex Value
System Summary 1 0x0000000001
Virtual Machine 16384 0x0000004000
Motherboard 2 0x0000000002
BIOS 4 0x0000000004
CPU 8 0x0000000008
Memory 128 0x0000000080
Sensors 8192 0x0000002000
Devices 16 0x0000000010
PCI 32 0x0000000020
System Slots 64 0x0000000040
Network Adapters 4096 0x0000001000
Video 256 0x0000000100
Sound Devices 1048576 0x0000100000
Storage Devices 512 0x0000000200
Logical Disks 131072 0x0000020000
Ports 1024 0x0000000400
Battery and Power Policy 262144 0x0000040000
Printers 2048 0x0000000800
Resources 2097152 0x0000200000
Network OptionsTop ↑
Report Option Decimal Value Hex Value
Network Information 1 0x0000000001
Extended Network Information 64 0x0000000040
Network Statistics 2 0x0000000002
Computers from Active Directory 4096 0x0000001000
Groups from Active Directory 8192 0x0000002000
Users from Active Directory 16384 0x0000004000
Local Groups 256 0x0000000100
Local User Accounts 512 0x0000000200
Domain Groups 1024 0x0000000400
Domain User Accounts 2048 0x0000000800
System Accounts 128 0x0000000080
Windows Firewall 32 0x0000000020
Open Ports 4 0x0000000004
Shares 8 0x0000000008
Network Connections 16 0x0000000010
How to use these numbersTop ↑

Let's assume that you want to report 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 /upload=ftp://user:[email protected]
        /s:1074790401 /h:46 /n:68 /zip
  • HTTP Post report

    siw /log:xml=c:\%COMPUTERNAME%.xml /upload=https://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 protected]
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /smtpUser=user /smtpPass=pass /smtp=mail.example.com /[email protected]
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Google's Gmail

    siw /log:xml=c:\%COMPUTERNAME%.xml /[email protected]
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /[email protected] /smtpPass=pass /smtp=smtp.gmail.com:587 /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Microsoft Office 365

    siw /log:xml=c:\%COMPUTERNAME%.xml /[email protected]
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /[email protected] /smtpPass=pass /smtp=smtp.office365.com:587 /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Microsoft Outlook

    siw /log:xml=c:\%COMPUTERNAME%.xml /[email protected]
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /[email protected] /smtpPass=pass /smtp=smtp.office365.com:587 /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using Yahoo!

    siw /log:xml=c:\%COMPUTERNAME%.xml /[email protected]
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /[email protected] /smtpPass=pass /smtp=smtp.mail.yahoo.com:587 /smtpSecurity=TLS
        /s:1074790401 /h:46 /n:68 /zip
  • Send zipped email using AOL

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

    siw /log:xml=c:\%COMPUTERNAME%.xml /[email protected]
        /subject="Message from %USERNAME% (%USERDOMAIN%)"
        /body="Report for %COMPUTERNAME%"
        /[email protected] /smtpPass=pass /smtp=mail.gmx.com:587 /smtpSecurity=TLS 
        /s:1074790401 /h:46 /n:68 /zip

Notes:

  • The environment variables (like %COMPUTERNAME% or %USERNAME%) are automatically expanded.
  • Some servers require an App Password.