// Resource: C:/inetpub/adminscripts/cscript adsutil. vbs, C:/winnt/system32/cscript.exe
Adsutil. vbs help // get help information
Cscript.exe adsutil. vbs // compile the script
Cscript adsutil. vbs Enum w3svc/1/root // view the default 80 site information for more information
// Create a virtual directory under the default site and specify the working folder and default page
C:/inetpub/adminscripts> adsutil. vbs create_vdir w3svc/1/root/789 // virtual directory name: 789
Created "maid/1/root/789"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/1/root/789/path E:/html // virtual directory disk path
Path: (string) "E:/html"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/1/root/789/defaultdoc login. asp // starting page of the virtual directory
Defaultdoc: (string) "login. asp"
// Create a new web site, specify the port, and specify the working directory
C:/Documents and Settings/Administrator> Cd C:/inetpub/adminscripts // start the command line
C:/inetpub/adminscripts> adsutil. vbs Enum/P W3SVC // list all site information under the current host. Site 80 is [/w3svc/1]
[/W3svc/info]
[/W3svc/1]
[/W3svc/filters]
[/W3svc/2]
[/W3svc/3]
[/W3svc/4]
[/W3svc/5]
[/W3svc/6]
[/W3svc/7]
[/W3svc/8]
[/W3svc/9]
[/W3svc/99]
C:/inetpub/adminscripts> adsutil. vbs Delete w3svc/99 // Delete 99 sites. 99 is the host site index, which can be arbitrary and cannot be repeated.
Deleted path "w3svc/99"
C:/inetpub/adminscripts> adsutil. vbs create_vserv w3svc/99 // create 99 sites
Created "w3svc/99"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/serversize 1 // set 99 site size
Serversize: (integer) 1
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/servercomment "my test websit" // set 99 site alias
Servercomment: (string) "My test websit"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/serverbindings ": 10003:" // set port 99
Server bindings: (list) ": 10003 :"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/enabledefaultdoc true // set 99 site default document
Enabledefadoc DOC: (Boolean) True
C:/inetpub/adminscripts> adsutil. vbs create_vdir w3svc/99/root // set the root virtual directory under site 99, which must exist
Created "w3svc/99/root"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/path E:/html // set the root working directory of 99 sites
Path: (string) "E:/html"
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/accessread true // set 99 site root readable
Accessread: (Boolean) True
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/accesswrite true // set 99-site root writable
Accesswrite: (Boolean) True
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/enabledirbrowsing true // set 99 site root to browse
Enabledirbrowsing: (Boolean) True
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/enabledefadoc Doc true // set 99 site root default document
Enabledefadoc DOC: (Boolean) True
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/accessscript true // set 99-site root executable script
Accessscript: (Boolean) True
C:/inetpub/adminscripts> adsutil. vbs set w3svc/99/root/appfriendlyname Default Application // set 99 site root application attributes
Appfriendlyname: (string) "Default Application"
C:/inetpub/adminscripts> adsutil. vbs start_server w3svc/99 // start 99 sites
Server w3svc/99 successfully started