This is a vey useful command line backup option i use it frequently.
netsh routing dump > Routing.txt
netsh RAS dump > RAS.txt
Then we can use netsh exec on another server to import the configuration.
If you want to export other settings, just look at other netsh command line switches.
Thursday, January 31, 2008
Tuesday, January 29, 2008
System hardware information and uptime
Systeminfo is a useful tool to collect valuable system hardware information remotely.
For example, the following line will return the hardware information (System Model, System type, uptime, etc) of a remote server "remotemachine" and write them in "remotemachine.csv" file.
SYSTEMINFO /S remotemachine /FO csv >>remotemachine.csv
For example, the following line will return the hardware information (System Model, System type, uptime, etc) of a remote server "remotemachine" and write them in "remotemachine.csv" file.
SYSTEMINFO /S remotemachine /FO csv >>remotemachine.csv
RRAS server logging and debugging
RRAS logging
To view who logged in, how long, etc you have to go to remote acces logging and on properties tab of the local file log, check authentication request. You will see in windows\system32\logfiles the results.
RRAS debugging
We can debug RAS connections using RAS logs. To enable RAS logs run command
netsh ras set tracing * enabled . Then, we check the logs at %windir%\tracing directory.
Error code related to RRAS are listed here http://support.microsoft.com/kb/q163111/
After we resolve the issue, we disable RAS logs by command:
netsh ras set tracing * disabled
To view who logged in, how long, etc you have to go to remote acces logging and on properties tab of the local file log, check authentication request. You will see in windows\system32\logfiles the results.
RRAS debugging
We can debug RAS connections using RAS logs. To enable RAS logs run command
netsh ras set tracing * enabled . Then, we check the logs at %windir%\tracing directory.
Error code related to RRAS are listed here http://support.microsoft.com/kb/q163111/
After we resolve the issue, we disable RAS logs by command:
netsh ras set tracing * disabled
Saturday, December 29, 2007
Import a list of dns hosts from Windows hosts file
Here is a little script I wrote to import the dns entries in DNS:
For /F "Tokens=1,* Delims= " %%A In (hosts.txt) Do (
Set ip=%%A
Set host=%%B
)
dnscmd dns_server_name RecordAdd Forward_zone_name %host% A %ip%
For /F "Tokens=1,* Delims= " %%A In (hosts.txt) Do (
Set ip=%%A
Set host=%%B
)
dnscmd dns_server_name RecordAdd Forward_zone_name %host% A %ip%
Thursday, December 20, 2007
My first post
Hi everbody,
From now on, i hope this will be another place where we''ll share the knowledge...
Merry Christmas and many gifts!
From now on, i hope this will be another place where we''ll share the knowledge...
Merry Christmas and many gifts!
Subscribe to:
Posts (Atom)