Script to make automated documentation of Windows servers
Hi, I've been playing with this script to automate the most of my documentation process when installing windows servers. Please check it out and come with feedback! cd\ echo off echo http://www.techotopia.com/index.php/Window...mand-line_Tools echo ######################################## echo - echo Hostname echo Display the computer name. hostname echo ######################################## echo - echo Date date /t echo ######################################## echo - echo Ver echo "displays Windows version" ver echo ######################################## echo - echo Nbtstat echo Display status of NetBIOS. Nbtstat -n echo ######################################## echo - echo ipconfig /all echo print outs the tcp/ip settings ipconfig /all echo ######################################## echo - echo getmac echo prints mac adress getmac echo ######################################## echo - echo Systeminfo echo Display machine properties and configuration. Systeminfo echo ######################################## echo - echo Tasklist echo Display currently running tasks and services. Tasklist echo ######################################## echo - echo WMI echo Display WMI information. echo must have wmi command installed (maybe resource disk?) echo ######################################## echo - echo Set echo Display or modify Windows environment variables. Also used to evaluate numeric expressions at the command line Set echo ######################################## echo - echo Route print echo Manage network routing tables. route print echo ######################################## echo - echo net view echo shares on this computer net view echo ######################################## echo - echo Net Localgroup echo Display or manage local group accounts. net localgroup echo ######################################## echo - echo Net Accounts echo Manage user account and password policies. Net Accounts echo ######################################## echo echo Net user echo Local user(s) Net user echo ######################################## echo - echo Net Config Server echo Display or modify configuration of Server service. Net Config Server echo ######################################## echo - echo Net Config Workstation echo Display or modify configuration of Workstation service. Net Config Workstation echo ######################################## echo - echo Gpresult /R echo Displays RSoP summary data. Gpresult /R echo ######################################## echo - echo Driverquery echo Display the current device driver properties and status. Driverquery echo ######################################## echo - echo Chkntfs echo Display the status of volumes. Set or exclude volumes from automatic system checking during system boot. Chkntfs C: echo ######################################## echo - echo Chcp echo Display or set the active code page number. Chcp echo ######################################## echo - echo serverManagerCmd.exe -query echo list all server roles (only on Windows 2008 SERVER) echo the version of serverManagerCmd.exe serverManagerCmd.exe -v serverManagerCmd.exe -query echo ######################################## echo - echo sc query type= service state= all echo lister alle tjenster som er installert, bde aktive og passive. sc query type= service state= all echo ######################################## echo - echo bootcfg /query echo queries computers Boot.ini file settings. bootcfg /query echo ######################################## echo - echo Vol echo displays label and serial no. of c: drive vol echo ######################################## echo - echo tree c:\ /f echo "lists the three-structure of the c: drive" tree c:\ /f echo ###########EOF - END OF FILE###################
September 24th, 2008 4:23pm

If this data is stored in a text file afterwards you've got aGood amount of info to record and this way you can then parse that information into a Change Management system for the base line data for that server.Highly suggest putting a time a date stamp before and or after each step so you can log the performance data also.putting >> TextFile.txt after every line will append the data to the TextFile.txt fileputting > TextFile.txt will overwrite the data.Jammy
Free Windows Admin Tool Kit Click here and download it now
September 25th, 2008 9:21am

This turned out as a mess! I will try one more time..y_dub echo http://www.techotopia.com/index.ph [...] line_Tools echo Hostnameecho Display the computer name. hostname echo Date date /t echo Ver echo "displays Windows version" ver echo Nbtstatecho Display status of NetBIOS. Nbtstat-n echo ipconfig /all echo print outs the tcp/ip settings ipconfig /all echo getmac echo prints mac adress getmac Systeminfo echo Tasklistecho Display currently running tasks and services. Tasklist echo WMIecho Display WMI information. echo must have wmi command installed (maybe resource disk?) echo Setecho Display or modify Windows environment variables. Also used to evaluate numeric expressions at the command line Set echo Route printecho Manage network routing tables. route print echo net view echo shares on this computer net view net localgroup echo Net Accountsecho Manage user account and password policies. Net Accounts echo Net userecho Local user(s) Net user echo Net Config Serverecho Display or modify configuration of Server service. Net Config Server echo Net Config Workstationecho Display or modify configuration of Workstation service. Net Config Workstation echo Gpresult /R echo Displays RSoP summary data. Gpresult /R echo Driverqueryecho Display the current device driver properties and status. Driverquery ChkntfsC: echo Chcpecho Display or set the active code page number. Chcp echo serverManagerCmd.exe -query echo list all server roles (only on Windows 2008 SERVER) echo the version of serverManagerCmd.exe serverManagerCmd.exe -v serverManagerCmd.exe -query echo sc query type= service state= all echo lister alle tjenster som er installert, bde aktive og passive. sc query type= service state= all echo bootcfg /query echo queries computers Boot.ini file settings. bootcfg /query echo Vol echo displays label and serial no. of c: drive vol echo tree c:\ /f echo "lists the three-structure of the c: drive" tree c:\ /f
September 25th, 2008 9:27am

Would this time-stamp do? PROMPT $t$_$p$g
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2008 12:52pm

Hi, For scripting issues, I suggest discussing them in our MSDN forum. They mainly troubleshoot scripting issues. MSDN forum http://forums.microsoft.com/MSDN/default.aspx?siteid=1 I hope your issue can be resolved soon. Tim Quan - MSFT
September 30th, 2008 4:57am

That would give you time only i beleive.easy way would be date /t >>textfile
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2008 3:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics