VBScript
Active Directory Cookbook, 2nd edition (VBScript-only) (All scripts)
Chapter 2
Change domain mode
Display domain netbios name
List domain hierarchy
List domains
Modify ADUC display specifier
Raise domain functional level
Raise forest functional level
Remove trust
Reset trust
Verify trusts
View trusts
View trusts WMI
Chapter 3
Create NT4 BDC
Disable GC logon requirement
Enable GC
Find closest DC
Find closest DC via DNS
Find DC site
Find DCs
Find DCs and GCs in a site
Find FSMOs
Find GCs
Move DC to different site
Set reliable time source
Transfer FSMO
Chapter 4
Bit-wise search
Connect to object GUID
Connect to Well-Known GUID
Count objects
Create dynamic object
Create object
Delete object
Delete object v2
Display attributes
Display RootDSE
Dynamically link class
Enable paging
Fast bind
Modify bit flag
Modify default dynamic object ttl
Modify object
Modify object v2
Move jsmith to new domain
Move object to new domain
Move object to new OU
Reference external domains
Refresh dynamic object
Rename object
Search GC
Search objects
View create modify timestamps
View modify LDAP query policy
Chapter 5
Assign manager to OU
Create OU
Create OU in container
Delete OU
Deleting child objects
Display OUs
Enumerate children
Enumerate children recursively
Find OUs
Link GPO to OU
Move child objects
Move OU
Number child objects
Chapter 6
Adding new upn suffix
Convert user to inetorgperson
Copy user
Create inetorgperson
Create user
Create user in bulk
Enable or disable user
Find all users
Find disabled users
Last logon timestamp
Modify default ADUC displayname
Modify multiple users
Modify upn for users1
Modify upn for users2
Modify upn for users3
Move user
Must change passwd
Prevent passwd change
Prevent passwd expiration
Remove all groups
Rename user
Restrict computer logon
Set account expiration
Set password
Set primary group
Set profile attributes
Set useraccountcontrol
Transfer user groups
Unlock user
View lockout password policy
View managed objects
View permitted logon hours
View user group membership
Chapter 7
Add group member
Changing group scope or type
Create dynamic group
Create group
Delegate control of group members
Enable universal group caching
Remove group member
Resolve primary group id
View group membership
View group permissions
View nested group membership
Chapter 8
Bind to default computer container
Change computer quota
Change default computer container
Create computer
Create computer for user
Find computers based on os
Identify computer role
Join computer to domain
List all computer objects
Move computer
Rename computer
Reset computer
Chapter 9
Add printer driver
Create a disk quota
Install print server
Chapter 10
Apply security filter
Apply WMI filter
Backup a GPO
Block inheritance on an OU
Copy GPO
Create a GPO
Create GPO link
Delete GPO
Disable settings in a GPO
Enforce GPO settings
Find GPOs in a domain
Import settings into a GPO
List GPO links
Restore a GPO
View GPO settings
Chapter 11
Add ANR attribute
Add custom info to ADUC
Add duplicate user attribute
Add GC attribute
Create attribute
Create class
Deactivate class
Enable schema update
Find class types
Find linked attributes
Find mandatory and optional classes
Index attribute
Manage Schema FSMO
Modify confidentiality bit of attribute
Modify default class security
Nonreplicated and constructed attributes
Reload schema
View attribute
View class
Chapter 12
Change KCC interval
Change site for subnet
Configure universal group caching
Cover multiple sites
Create site
Create site link
Create site link bridge
Create subnet
Delegate control of site
Delete site
Delete subnet
Disable auto site coverage
Disable KCC
Disable transitivity schedules
Find bridgehead servers for site
Find client site
Find ISTG
Find links for site
Force host to site
List connection objects
List servers in a site
List sites
List subnets
Modify replication schedule
Modify site link
Modify site link cost
Move server
Rename a site
Set bridgehead server
Transfer ISTG
Trigger KCC
Chapter 13
Change intersite replication interval
Change intrasite notification delay
Change intrasite replication interval
Changing replication consistency
Compare two domain controllers
Compare unreplicated changes
Finding conflict objects
Finding orphaned objects
Force replication
Listing replication partners
View object metadata
Chapter 14
Add DNS suffix
Authorize DHCP Server
Clear DNS cache
Configure forwarding
Configure zone transfer
Convert zone to AD integrated
Create forward zone
Create resource record
Create reverse zone
Delegating control of zone
Delete resource record
Enable DNS Server logging
Enable scavenging
Prevent DNS registration of all records
Prevent DNS registration of certain records
Query resource records
Restrict DHCP Administrators
Set DNS server settings
View zones
Chapter 15
Configure permission inheritance
Enable anonymous access
Enable list object access mode
Encrypt traffic with ADO
Encrypt traffic with ADSI
Forcing kerberos to TCP
Restrict anonymous access
Chapter 16
Change tombstone quota
Enable dcpromoui logging
Enable diagnostics logging
Enable DNS debug logging
Enable gpo logging
Enable kerberos logging
Send an email
Set default quota
View DNS performance statistics
Chapter 17
Change garbage collection period
Change tombstone lifetime
Enable DIT logging
Enable tombstone logging
Initiate an online defrag
Chapter 18
Add or remove replica
Change replication delays
Create an application partition
Delegate control for application partition
Delete an application partition
Find application partitions
Find application partitions for a server
Find replica servers
Set reference domain
Chapter 19
Change password for ADAM user
Create a group in ADAM
Create OU in ADAM
Create user in ADAM
Enable or disable an ADAM user
List ADAM instances
List attributes of ADAM user
Manage ADAM group membership
Active Directory, 3rd Edition (VBScript-only) (All scripts)
Chapter 20
Create OU
Create User
Delete Object
Delete Object2
OpenDSObject
OpenDSObject Secure
OpenDSObject Secure Inputbox
Simple ADSI
Simple VBScript
Simple WSF
Simple WSF2
Chapter 21
Error Checking
Example1
Example2
GetEx
GetInfoEx
PropertyCache
PropertyEntry
PropertyValue
Put
PutEx
Walk PropertyCache
Walk PropertyCache with Schema
WriteCache
Chapter 22
Filter Results
SearchAD Function
Simple Search
Chapter 23
Add group member
Add many group members
Create group
Create group v2
Create many users
Create user
Create user - LDAP
Create user - WinNT
Evaluate group membership
Evaluate group user membership
Modify user - LDAP
Modify user - WinNT
Unlocker - LDAP
Unlocker - WinNT
Chapter 24
Create contact
Dump store details
Enumerate disconnected mailboxes
Enumerate store details
Mail disable contact
Mail disable group
Mail disable user
Mail enable group
Mail enable user
Mailbox disable user
Mailbox enable user
Move mailbox
Purge mailbox
Reconnect mailbox
View mailbox size
Chapter 25
Create share
Display print jobs
Display print queue status
Enum resources
Enum sessions
Enum shares
List print queues
List print queues v2
Show users
Chapter 26
Create ACE
Create SD
Delegate rights
List ACEs
Chapter 27
AD GC Attributes
Create attribute
Create class
Create class instance
Find GC attributes
Get Schema FSMO
Get Schema FSMO v2
Schema cache reload
Transfer Schema FSMO
Wait for new Schema FSMO
Chapter 29
Authenticating via WMI
Display Event Log events
Display services
Enumerate AD replication partners via WMI
Enumerate disks
Enumerate objects in WMI
Enumerate trusts via WMI
Find AD trust failures via WMI
Find computer objects in AD via WMI
Find Event Log events via WMI
Find pending replication events in AD via WMI
Find user objects in AD via WMI
Robust service restart using WMI
Set AD trust properties
Show dependent services
WQL Search example
Chapter 30
Configure zone
Create resource records
Create zone
DNS server config check
DNS server properties
Find resource records
List zones
Restart DNS server service
Set DNS server properties
DNS on Windows Server 2003 (VBScript-only) (All scripts)
Chapter 14
Authenticate within WMI
Check name server settings
Configure a zone
Configure name server settings
Create a zone
Create an A and PTR record
Enumerate all logical disks
List resource records
Perform a WQL Query
Perform an SRV record query
Print name server properties
Print name server stats
Print zone list
Restart the DNS Server service
Exchange Server Cookbook (VBScript-only) (All scripts)
Chapter 2
List all connectors in Exchange
List Exchange servers
Search Active Directory for Exchange servers
Chapter 3
Change the functional level of a forest
Determine which domain controllers Exchange is using
Force Exchange to run the topology discovery process
Chapter 4
Determine the Exchange role of a server
Interrogate and change message tracking properties
Chapter 5
Access logon
Bulk add from excel
Create Address List
Create contact
Create mail enabled group
Create mailbox
Create qdg
Create user and mailbox
Delete mailbox
Flip display names
Gal hide
List delegates
Mailbox size
Move mailbox
Set default reply
Set mailbox limits
Set recipient limit
Set sender restrictions
Show sender restrictions
Chapter 6
Create Database
Create Public Folder Tree Database
Create Storage Group
Delete Database
Enum mailboxes
List Storage Group
Move Databases
Move logs
Toggle circular logging
Chapter 7
Create Routing Group
Delete message from queue
Delete Routing Group
Enumerate queues
Inspect queue
Move server to new Routing Group
Set new RGM
Chapter 8
Enable Freedocs
Enable OWA blocking
Enable unsupported
Set OWA timeouts
Toggle OWA spellcheck
Chapter 9
Change Public Folder mail enable status
Create local replica of all folders
Create Public Folder
Find all Public Folder replicas
Find all replicas on server
Force all Public Folder rep
Force single Public Folder rep
Get Public Folder tree properties
Managing Enterprise Active Directory Services (VBScript-only) (All scripts)
Chapter 4
Anonymous bind
Simple create user
Chapter 5
Listing01_RootDSE
Listing02_Enum_Users
Listing03_WQL_Get_Computers
Listing04_Event_Notification
Chapter 7
Listing01_List_Domains
Listing03_Create_UPNSuffix
Listing05_List_DCs
Listing06_Enable_GC
Listing08_List_Trusts
Listing10_Create_OU
Listing12_Find_FSMOs
Listing14_Transfer_PDC
Chapter 9
Listing04_Create_Site
Listing06_Delete_Site
Listing08_Create_Subnet
Listing10_Iterate_Subnets
Listing12_Create_Link
Listing14_Links_For_Site
Listing16_Moving_Server
Listing18_List_Connections
Listing22_Disable_KCC
Chapter 10
Listing01_Retrieve_SchemaContainer
Listing03_Retrieve_Schema_FSMO
Listing05_Transfer_Schema_FSMO
Listing08_Find_All_Auxiliary_Classes
Listing09_Find_All_Multi_Attrs
Chapter 11
Listing01_Instantiate_User
Listing03_Create_User
Listing04_Create_Full_User
Listing05_Set_Attr_For_All_Users_In_OU
Listing07_Unlock_User
Listing09_Moving_User
Listing11_Instantiate_Group
Listing12_Create_Sec_Univ_Group
Listing14_Add_Remove_User_From_Group
Listing16_Iterating_Group
Listing18_Changing_Group_Scope
Listing20_Instantiate_Computer
Listing21_Create_Computer
Listing24_Retrieve_System_Info
Listing26_Create_PrintQueue
Listing27_Determine_Printer_Availability
Listing28_Purge_PrinterQueue
Listing29_Iterate_Print_Jobs
Listing30_Print_Job_Status
Chapter 12
Listing05_Security_EvtSearch
Listing11_Security_SidToGrp
Windows Server 2003 Networking Recipes (VBScript-only) (All scripts)
Chapter 1
Configure Alternate IP
Configure DHCP
Configure DNS search order
Configure DNS servers
Configure DNS suffix search order
Configure gateway metric
Configure NetBIOS over TCP
Configure WINS NetBIOS parameters
Configure WINS servers
Enable dead gateway detection
Enable dynamic DNS
Rename computer
Set static IP
Chapter 3
Allow file and print sharing
Allow remote administration
Allow Remote Assistance
Allow UPnP traffic
Allow Windows Firewall exceptions
Configure exe exception
Configure port exception
Do not respond to multicast or broadcast
Enable all ICMP traffic
Enable firewall notifications
Enable Windows Firewall
Remove application exception
Reset Windows Firewall
Chapter 5
Routing IP reset
Chapter 6
Add RADIUS client
Configure IAS lockout
Export IAS configuration
Register local IAS Server
Stop IAS service
Unlock account
Chapter 7
Configure IPSec exemptions
Configure stateful protection
Disable IPSec hardware acceleration
Chapter 8
Restart print spooler service
Start print spooler service
Stop print spooler service
Chapter 9
Display TCP settings
Windows Server 2003 Security Cookbook (VBScript-only) (All scripts)
Chapter 2
Disable local admin
Enable screen saver locking
Rename domain admin
Rename guest account
Rename local admin
Chapter 3
Configure TCP filtering
Enable Netbios over TCP
Chapter 4
Set trusted for delegation flag
Chapter 10
Display file owner
Modify file owner
Chapter 11
Running a command
Running a command with Exec
Chapter 12
Add user to DNS Admins
Clear DNS Cache
Convert zone to AD-integrated
Create a mail forwarder
Delete the Root Hints
Disable dynamic updates
Disable Recursion
Enable Do Not Use Recursion settng
Enable secure dynamic updates
Chapter 15
Configure IP and domain restrictions
Configure virtual directory web permissions
Configure web permissions
Enable anonymous-only access in IIS
Enable FTP authentication
Enable NTLM Authentication in IIS
Enable SSL
Chapter 17
Add account to TS
Add user to Remote Desktop Users
Configure Application Compatibility mode
Configure encryption level for all TS sessions
Configure remote control
Enable remote desktop
Modify permissions for TS account
Set RDP security level
TS prompt for password
Windows Server Cookbook (VBScript-only) (All scripts)
Chapter 1
ADO authentication example
Append to a file
Authenticate and enumerate the disks on a system
Create an Excel spreadsheet of running processes
Enumerate the disks on a system
Error checking example
Iterating over command-line arguments
Print the contents of an Excel spreadsheet
Print the running processes to a file
Send an email via SMTP
Chapter 2
Activate
Create env variable
Disable activate notification
Disable manage server screen
Disable manage server screen2
Disable shutdown tracker
Disable windows update
Display datetime
Display failure options
Display pagefile
Display startup
Expand env variable
Force shutdown server
Install windows component
Join computer
Print env variables
Print system info
Print uptime
Reboot server
Rename computer
Rename computer domain
Reset computer
Set datetime
Set startup delay
Sets failure options
Shutdown server
Chapter 3
Analyze disks
Chkdsk
Compress volume
Configure user quota
Create virtual drive
Defrag disk
Disk readonly
Enable disk quotas
Find large files
Format volume
List disks
List mapped drives
Map drive
Set drive label
Set drive letter
View quota usage
Chapter 4
Compare files
Compress file
Compress folder
Create junction
Create share
Create shortcut
Delete file
Delete file wmi
Delete folder
Delete share
Find open file process
Find shortcuts
Find zip files
Find zip files correction
Hide file
Make file readonly
Print file properties
Print folder properties
Publish share in AD
Rename or copy a file
Replace file
Sdelete
Take ownership
View shares
Chapter 5
Alternate creds wmi
Delete schedule task
List scheduled tasks
Run on remote server
Schedule task
Set domain login script
Set local login script
Spawn process with creds
Chapter 6
Kill process
Proc doctor
Proc props
Proc stats
Proc terminator
Search procs
Service proc
Set priority
View procs
Chapter 7
Create service
Dependent services
List services
Remove service
Robust restart
Search services
Service monitor
Service proc
Set service account
Set startup
Startup history
Stop start
Chapter 8
Archive log
Clear log
Create event
Create eventlog
Display events
Event watcher
Eventlog size
Search events
Search multiple
Set max size
Set retention
Chapter 9
Create key
Delete key
Export reg
Import reg
Set max size
Set value
Set value wmi
Chapter 10
Display net
Enable dhcp
Enable filtering
Find site
Flush dns
Force host
Install ipv6
Netstat nr
Register dns
Release all
Release ip
Renew all
Renew all2
Route add
Route print
Set ip
Chapter 11
Enable screensaver locking
Mass admin password change
Rename domain account
Rename local account
Chapter 12
Assign app
Config app pool identity
Config auth
Config ftp auth
Config qos
Config virtualdir perms
Config web perms
Create app pool
Create ftp
Create ftp site
Create redirect
Create redirect2
Create virtualdir
Create web
Display webs
Enable extensions
Enable logging
Enable metabase editing
Enable ssl
Enables app pool recycling
Install iis
Set ipdomain restrictions
Stop start web
Chapter 13
Add a ptr records
Clear server cache
Config checker
Config secondaries notify
Convert zone
Create ad stub zone
Create file stub zone
Create ns record
Create zone
Del a ptr records
Display dns server props
Enable debug logging
Enable scavenging
Enumerate forwarders
Install dns
Prevent cache pollution
Prevent dynamic updates
Query records
Set dns property
Set domain forwarders
Set forwarders
Stop start dns
View dns stats
View zones
Chapter 14
Activate scope
Authorize dhcp server
Config scope option
Config server option
Create reservation
Create scope
Create superscope
Display leases
Enable ddns
Export config
Set conflict detection
Set dns creds
View server options
Chapter 15
Change func level domain
Change func level forest
Create object
Delete object
Delete trust
Display forest structure
Enable diag logging
Enable gc
Find closest dc
Find fsmos
Modify object1
Modify object2
Move object
Move object domain
Paged search
Rename object
Reset trust
Search objects
Search trusts
Transfer fsmo
View trusts
View trusts
Chapter 16
Add member
Create computer
Create group
Create many users
Create user
Enable user
Join computer
Last login time
Modify attr for many users
Passwd lockout policies
Remove member
Rename computer
Reset computer
Set acct options
Set group scope
Set password
Set profile
Unlock user
View direct members
View group membership
View nested members
Chapter 17
Create address list
Create dl
Create mailbox store
Create query dl
Create storage group
List dcs
Mail disable contact
Mail disable user
Mail enable contact
Mail enable user
Mailbox delete
Mailbox enable user
Mailbox move
Mount dismount mailbox store
Purge mailbox
Reconnect mailbox
View disconnected mailboxes
View mailboxes sizes
Windows XP Cookbook (VBScript-only) (All scripts)
Chapter 7
Check a Volume for errors
Compress a Volume
Configure disk quota for a user
Create a virtual drive
Display quota usage for users on a drive
Enable disk quotas
Enumerate mapped drives using WMI
Enumerate physical and logical disks
Find all files over a certain size
Make a volume read-only
Map a network drive
Chapter 8
Compare two text files
Compress a folder
Compress a folder with NTFS compression
Copy a file
Create a link using linkd.exe
Create a share
Create a shortcut
Delete a file
Delete a file using WMI
Delete a folder
Delete a share
Display open file handles
Display properties and attributes of a file
Display properties and attributes of a folder
Display shares on a system
Enable the read-only attribute of a file
Find all shortcuts
Hide or unhide a file
Perform an action on several files at once
Publish a share in Active Directory
Rename a file
Replace a file that is in use
Securely delete a file
Transfer ownership of a file
Chapter 9
Create a Registry key
Delete a Registry value
Export a Registry key to a file
Import into the Registry
Set a Registry value
Chapter 10
Configure a service account
Delete a scheduled task
Display performance stats for a process
Display running processes
Display the properties of a process
Display the startup history of a service
Find processes consuming a lot of memory
Kill a process
List the antecedent and dependent services
Restart a service
Robust service restart
Run a command on a system
Run a program as a service
Schedule a task
Set the login script for a domain user
Set the login script for a local user
Set the startup type for a service
Using alternate credentials with WMI
View scheduled tasks
Chapter 12
Add a route
Configure IP settings for a connection
Display network configuration for all connections
Display the AD site of a host
Enable DHCP for a connection
Enable IP Filtering for all adapters
Flush the local DNS cache
Install IPv6 on local host
Register DNS records for the local host
Release all DHCP IP addresses
Release all DHCP IP addresses using WQL
Renew DHCP lease for all adapters made by Intel
Renews all DHCP IP addresses
Set the AD site of the local host
Simulate "route print" command
Simulate the "netstat -an" command
Chapter 15
Add a member to a domain group
Add a member to a group
Create a computer account in Active Directory
Create a domain user account
Create a global security group account
Create a local group account
Create a local user account
Display direct members of a domain group
Display group membership of a user
Display members of a local group
Display password and account lockout policies
Display the last logon timestamp for a user
Display the nested members of a domain group
Enable a bit value in userAccountControl
Enable or disable a domain user account
Enable or disable a local user account
Join a computer account to a domain
Remove a member from a domain group
Remove a member from a local group
Rename a computer
Set profile-related attributes for a user
Set the password for a domain user
Set the password for a local user
Unlock a user
Chapter 16
Archive an Event Log
Clear an Event Log
Create a new event log
Create event in Application event log
Display events in an Event Log
Display size of an Event Log
Search an Event Log
Search Event Logs on multiple computers
Set Event Log retention period
Set maximum size of an Event Log
Chapter 17
Enable screen saver locking for all users
Rename a domain account
Rename a local account
Chapter 19
Disable System Restore
|