How to Document Servers with SYDI – Part 2 of 3

by patrick.ogenstad on October 18, 2006

The Output Options

SYDI has two output options; one for saving the report and another to choose which format to use.

-o Output to file, specify a path and filename and use quotation marks if there’s a space in the path. Remember to give your file an .xml extension if you’re using the XML format and a .doc extension for the Word format.

-e This is to choose the export format, the default is -ew (Word), to change to XML use -ex.

To create an XML report you would use:

cscript.exe sydi-server.vbs -oServer1.xml -ex [enter]

This will create an XML file that you can open in a browser.

XML Options

You might have noticed that the XML file you created didn’t look that great when viewed in your favorite browser. The reason is that you’re just looking at the raw XML file.

To view a style sheet, use the -s option. I generally use the -sh option which uses the html style sheet included in SYDI. For advanced users there is a -st option where you can specify a style sheet you have created on your own.

Lets test it again:

cscript.exe sydi-server.vbs -oServer1.xml -ex -sh [enter]

In order to view this file with a browser you will need the serverhtml.xsl and sydi-html-styles.xsl to be located in the same directory. These files are in the XML subdirectory of SYDI-Server. Copy the Server1.xml file you just created to that directory and open the file in a browser. Alternatively you can copy all of these files to another directory.

What Other Options do you have?

To be honest, you don’t have that many. The options that are left are -v to check the version of your script; this will check the SYDI website and see if a later version is available (I might remove this option).

The last option is -d for debug, if something fails to run as you expect it might be because of a bug in SYDI. The -d option is useful to troubleshoot these scenarios.

What if You Have More Than One computer?

So you want to run SYDI against multiple computers, it’s easy enough to write a batch file that does it for you. However, in the Tools directory there is a script called sydi-wrapper.vbs. A little “gotcha” is that you have to edit the script for it to work, but don’t panic; there isn’t any voodoo involved. Just open the script in notepad and scroll down to this section:

‘ Gathering Options
‘ WMI – Everything enabled by default
WMIOPTIONS=”-wabefghipPqrsSu”
‘ Registry – Everything enabled by default
REGISTRYOPTIONS=”-racdlp”

‘ Export Options
‘EXPORTFORMAT=”word” ‘ For Microsoft Word
EXPORTFORMAT=”xml” ‘ For XML

‘ Location Options
‘ Location of SYDI-Server.vbs
SYDISERVER=”C:\scripts\sydi-server.vbs”
OUTPUTDIRECTORY=”C:\scripts\Output files\”
LOGDIRECTORY=”C:\Scripts\Log Files\”
TIMEOUT=”600″ ‘ How many seconds you have to wait until a computer-scan is aborted hasn’t been tested.

‘ Other options, check sydi-server.vbs -h for help
‘ Uncoment/Change One of the below
OTHEROPTIONS=”-sh” ‘ For HTML Stylesheet on XML output
‘OTHEROPTIONS=”-b10″ ‘ Base Font size of 12
‘ End Of Settings

You will recognize the -w and -r options, unlike SYDI-Server this script defaults to XML (as it should). What you must change in order to get this to work are the values for SYDISERVER, OUTPUTDIRECTORY and LOGDIRECTORY. If you want to you can change the TIMEOUT value too, however it might not do you any good. That feature seems to have taken time out.

I wasn’t sure this was a good way to implement the script. The reason you have to edit the script is so that you won’t have to write such long commands later on in order to get it working.

Anyway, the remaining options are -u and -p for username and password when you connect to the machines. Then there are the gathering options or source options.

-t Reads from a text file, the computers listed in the text file should be separated by line or comma. To use this option:

cscript.exe sydi-wrapper.vbs -tAllMyComputers.txt

-d This is to get computers from a flat domain (NT4 style) to connect to all the computers in the domain you specify. A word of warning though, I’m told Heaven will be closing the gates for people who use NT4 much longer (you might have to break in as it is).

-a Active Directory, if you just run the script with -a it will connect to the active directory domain where you’re machine is located. Your other option is to specify an LDAP container. SYDI-Server will then scan all computers under this container (except for the ones with disabled computer accounts).

A few examples:

cscript sydi-wrapper.vbs -aDC=exibice,DC=com
cscript sydi-wrapper.vbs -a”OU=Member Servers,DC=exibice,DC=com”

[Self Promotion Mode]
If you haven’t heard of Exibice there’s a whole story about the company, read the first part here and you’ll find the other parts here.
[/Self Promotion Mode]

An Eagles View

After running sydi-wrapper you might have ended up with a whole lot of XML files. To give you a quick overview I’ve included a script for just this purpose. Also in the Tools directory is the sydi-overview.vbs script. It accepts one argument, -x, you will want to point this to the output directory you specified in sydi-wrapper. I have created a batch file which reads:

cscript.exe sydi-overview.vbs -x\\fileserver\net$\sydi\output

Running the script requires that you have Microsoft Excel installed on your machine. The script will parse all the XML files and start to populate the cells in Excel. The script will create six sheets. Computers with basic information about all your computers, WMI Programs is a list of all software installed by Windows Installer, Reg Programs are the ones found in the Uninstall registry key, Processes tells you what every computer is running. All these can be good to detect rouge programs or processes.

Finally there is the OS distribution pie chart and data source.

Read Part 1
Read Part 3

Tags: , , , ,

{ 23 comments… read them below or add one }

1 Walter 03.29.07 at 10:37 am

SYDI ROCKS! Simple as that. I only can’t get the wrapper to work as it should: many of the servers listed in my txt-file don’t get indexed (error “failed to connect to SERVER), but if I do those manually with sydi-server.vbs it works fine (so I’ve got a pretty big cmd-file now wich does the job just fine ;o)

one more remark: the sydi-overview.vbs doesn’t have a -d option (don’t show excel).

2 Ignacio 05.22.08 at 3:46 pm

Hi, first of all, thanks for making sydi project available. im not a programmer so i´d like to contribute some way.
It would be nice if sydi-overview.vbs could export automatically the .xls file to a personalized file and directory. and i`d like to get more data like serial numbers, os used memory slots onto the created excel, i gues i`m going have to start to study some programming myself.
greate Job, great tool.
Thanks
Ignacio.

3 Chris 11.05.08 at 3:23 pm

Thanks for this awesome program, I just started using it on 1 server at a time, I’m gonna give use the AD options a try today. I read about it the November issue of Windows IT Pro and then blogged about it and linked back to your site.
I have 1 quick question, is there way to add location, anti-virus and contact info to the script so it get’s added to the documentation automatically? Right now, it just says enter information about…

4 Peter 11.11.08 at 3:49 pm

Hi,
worked great so far. just raninto an issue with sydi-overview. It say Microsoft Cursor Engine: Multiple-Step operation generated error.
Any Ideas?

Regards
Peter

5 pawel 11.18.08 at 1:59 pm

hi

can I “scan” network if i have only local host admin host – is the same on all host?

i try
cscript.exe sydi-wrapper.vbs -a”OU=123,OU=4567,OU=R,DC=cool,DC=xx” -u%Computer%”user” -pPASS

u%Computer%”user” -how can i use to grab current workstation name ?

how t

6 Tom 12.18.08 at 6:47 pm

Is there a way to run this on the entire network to discover all workstations and servers without having to enter their IP addresses or computer names?

Our previous network admins left for other jobs, but did not leave any kind of documentation.

Also, is there a way we can run this for all our servers ie, exchange, proxy, NAS, SAN, etc.

7 Patrick Ogenstad 01.12.09 at 11:45 am

Pawel – You could test using -u.\User. However the best way would be to just create a domain account which has this acces.

Tom – Currently no, however you can create a textfile with a list of ip addresses and run sydi-wrapper against that list. As to your second question, no currently this is not possible.

8 Jireck 01.21.09 at 4:40 pm

Hi,

I used sydi and it’s great….. and I thank you for sydi

But i think it’s a great improve if you can add a parameter to sydi-wrapper.vbs. i Explain :
I launch sydi-wrapper.vbs against all my network 1500 pc and sydi take long time to inventory all machine.
if you can add -nxxx where xxx is un number of machine and you lanch for exemple 10 process of sydi-wrapper.vbs on 100 machines…
inventory can be 10 more faster…..
It’s possible ???
I’m sorry for my poor explain (i’m french)

9 Anil 02.06.09 at 7:31 am

I am getting the below error while converting .xml to .doc

Reading SYDI-Server Source File: C:\sydi-server-2.0\Out\servername.xml
C:\sydi-server-2.0\tools\ss-xml2word.vbs(817, 7) Microsoft Cursor Engine: Multip
le-step operation generated errors. Check each status value.

Can any one help?

10 Patrick Ogenstad 02.09.09 at 8:24 am

Anil – Are you still using SYDI-Server 2.0? Can you rescan the files with the latest version and see if you still have the same problem?

11 Greg Kenoyer 02.12.09 at 10:22 pm

Very,very nice tool.

Two suggestions:
1) With security holes being a major concern, one worthwhile enhancement would be to add the ability to dump the ACLs (share and/or NTFS) associated with the shares.

2) This generates an incredible baseline document. A very useful CM ‘filter’ would be a wrapper to generate a ‘differences’ report that lists the delta between the baseline and a current report. Has anyone tried this?

12 Greg Kenoyer 02.12.09 at 10:50 pm

Oops, and a third suggestion:
3) sydi-overview is very nice, too. However in addition to, or instead of, the Count columns in WMI and Registry Programs, it would be very useful to have separate columns for each system ‘overviewed’ with an ‘X’ if that system has the product installed.

13 Jack Lyons 04.16.09 at 9:00 pm

A “diff” option would be interesting. I will take a stab at creating some diff functionality. If I get something I like, I will post.

14 Rafael Sá 04.30.09 at 10:47 pm

I have already used sydi-server and that was a nice experience, the script has workes so great,but I’m having problems with sydi-wrapper…
When i try to use it with the “cscript sydi-wrapper.vbs -ddomain -uuser -ppassword”, sydi finds all my computers but i have always the message “Failed to connect”.

what do i have to edit in the script besides outputdirectory and and sydi’s directory?

15 Patrick Ogenstad 05.05.09 at 7:00 pm

Jack – I agree, a diff option would be good. I might also take a look at that when I have time.

Rafael – You might also have to edit the log directory. If you’re unable to connect try using -uDOMAIN\user. Another option is to use runas.exe.

16 Yasir 06.04.09 at 9:48 am

Hi Patrick,
I would like to know if there is any way to build a MySQL/MS Access/MS SQL database directly from the sydi-wrapper.vbs reports.

Thanks
Yasir

17 Randy 09.16.09 at 3:45 pm

I found out why the Programs weren’t showing up, the WMI Windows Installer Provider wasn’t Installed. So that is fixed, still looking for Sugestions to also capture Scheduled Tasks.

Thanks!

18 Tony 10.02.09 at 2:49 am

Thanks for a great tool, Patrick, it’s made my life a lot easier!

One slight problem I have is that the sydi-wrapper script doesn’t seem to handle nested AD OUs. If I run the script as so:
cscript sydi-wrapper.vbs -a”OU=Citrix Servers,OU=Sydney,DC=Stark Industries,DC=com”
it just shows me the help options, as though my syntax is incorrect. If I run the script as
cscript sydi-wrapper.vbs -a”OU=Sydney,DC=Stark Industries,DC=com”
it works fine, but that’s not where my servers are and so I get no output. :)

I’ve got around the issue by using a text file, but I thought I’d flag it to you in the hopes it’s something you can maybe fix in a later build. ;)

19 Patrick 10.06.09 at 5:44 pm

Tony – I don’t have any problem running SYDI-Wrapper against sub OUs. Could you make sure you have the latest version and try again?

20 Tony 10.08.09 at 7:03 am

On further investigation, it’s the space in the OU it had a problem with, which I thought I would have avoided with the inverted commas. I’ve got it to work by repositioning the inverted commas like this:
cscript sydi-wrapper.vbs -aOU=”Citrix Servers”,OU=Sydney,DC=blah,DC=local
So my syntax was incorrect after all.

Thanks!

21 bob young 10.13.09 at 7:36 pm

I am trying to use Sydi to gather information about my servers and then export it to a text file. I am able to export to XML or Word and convert to HTML but I would like to export to txt. Does anyone have any advise?

22 alan mitchell 01.11.10 at 5:00 pm

‘file:///C:/Scripts/sydi/log files/serverhtml.xsl’
System error: -2146697211.

To fix this issue in Sydi. Use the two files inside the xml folder named:
serverhtml.xsl
sydi-html-styles.xsl

Paste them into the Log files folder and now you should be able to open teh .xml files in a browser.

Alan Mitchell
cooldisks

23 Carts 02.21.10 at 10:13 pm

Fantastic, time saving, standards building, piece of vbscript. I appreciate the work that has gone into this immensely.

Cheers

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>