Home  
  Microsoft  
  Cisco  
  CompTIA  
  CWNP  
  InfoSecurity  
  Forums  
  Blogs  
  Topsites  
  Watch free videos online  
     
  Subnet Calculator  
  Online Degrees  
  Exam Vouchers  
  Free Magazines  
     

  Watch free videos online  
   

 

Register Practice Exams TechNotes Members List Search Today's Posts Mark Forums Read
Go Back   TechExams.net IT Certification Forums > General > Off-Topic
Reply
 
Thread Tools
Senior Member
 
binarysoul's Avatar
 
Join Date: Jul 2006
Location: Canada
Posts: 820

Certifications: Bachelor of Business (MIS), DIT (Networking). Certification(s): Superman. Working towards CEO.
binarysoul will become famous soon enoughbinarysoul will become famous soon enough
Old 02-09-2010, 03:55 PM   #1 (permalink)
Default What do you use for Windows scripting?

I'm just wondering what do you guys use to write scripts in a Windows environment?

Also, what are the most common tasks that system admins accomplish through scripts?

I read about Powershell, which has been around since 2003.



__________________
Blaming tfosorciM

binarysoul is offline   Reply With Quote

Login/register to remove this advertisement.
was here.
 
Join Date: Apr 2008
Posts: 3,639

tiersten is a splendid one to beholdtiersten is a splendid one to beholdtiersten is a splendid one to beholdtiersten is a splendid one to beholdtiersten is a splendid one to beholdtiersten is a splendid one to beholdtiersten is a splendid one to behold
Old 02-09-2010, 04:08 PM   #2 (permalink)

Use PowerShell. Anything else won't be as integrated or good.

Adding/deleting users. Enumerating all computers in your domain etc...

tiersten is offline   Reply With Quote
g33k
 
phoeneous's Avatar
 
Join Date: Dec 2008
Location: On a fretboard
Posts: 1,016

Certifications: CCNA, MCSA:2003
phoeneous has a spectacular aura aboutphoeneous has a spectacular aura aboutphoeneous has a spectacular aura about
Old 02-09-2010, 04:28 PM   #3 (permalink)

Quote:
Originally Posted by tiersten View Post
Use PowerShell. Anything else won't be as integrated or good.

Adding/deleting users. Enumerating all computers in your domain etc...
Agreed.

I only use vbscript for the time being since thats all I know It gets alot done its just that Powershell can do whole lot more.

These are good video tutorials.

phoeneous is offline   Reply With Quote
MIPS processor please
 
Mishra's Avatar
 
Join Date: Feb 2007
Location: Louisville, KY
Posts: 2,108

Certifications: MCSE 2003, MCTS: Vista Configure, VCP4, Associates in Computer Network Systems
Mishra is a jewel in the roughMishra is a jewel in the roughMishra is a jewel in the rough
Send a message via AIM to Mishra
Old 02-09-2010, 04:32 PM   #4 (permalink)

vbscript

And batch if I need something really quick and dirty.

Mishra is offline   Reply With Quote
Senior Member
 
crrussell3's Avatar
 
Join Date: Jun 2009
Location: West Des Moines, IA
Posts: 225

Certifications: MCTS: 620, 640
crrussell3 is on a distinguished road
Old 02-09-2010, 04:34 PM   #5 (permalink)

+1 for Powershell. I would also recommend downloading Powergui (PowerGUI.org - Free Windows Powershell Community) and the QAD Active Directory Powershell cmdlets.



__________________
MCTS: Windows Vista, Configuration
MCTS: Windows WS08 Active Directory, Configuration

crrussell3 is offline   Reply With Quote
Drops by now and again
 
astorrs's Avatar
 
Join Date: May 2008
Location: Vancouver, Canada
Posts: 3,059

Certifications: n+1
astorrs is a glorious beacon of lightastorrs is a glorious beacon of lightastorrs is a glorious beacon of lightastorrs is a glorious beacon of lightastorrs is a glorious beacon of light
Send a message via MSN to astorrs
Old 02-09-2010, 04:39 PM   #6 (permalink)

These days for Windows scripting I use PowerShell, then PowerShell, after that I'll try it in PowerShell, next I'll take another swing at it in PowerShell, finally attempting it one more time in PowerShell, and if that doesn't work then KIXtart (nothing beats the simplicity of KIX for some tasks), and only if I absolutely have to VBscript.




__________________
Follow me @ twitter.com/astorrs

astorrs is offline   Reply With Quote
Senior Former Member
 
Join Date: Jan 2008
Posts: 1,980

Certifications: MCITP: EA, EMA; MCSE 2000/2003: M; MCSE 2000: S; MCSA 2000/2003: S; MCTS: ISA 2006; VCP3/4
HeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of light
Old 02-09-2010, 04:41 PM   #7 (permalink)

Quote:
Originally Posted by binarysoul View Post
I'm just wondering what do you guys use to write scripts in a Windows environment?

Also, what are the most common tasks that system admins accomplish through scripts?

I read about Powershell, which has been around since 2003.
PowerShell all the way. Things I've done with PowerShell?

  • Created reports from AD of all Domain Controllers, every computer without the latest service pack, all users who have expired password or haven't logged in over a certain threshold, all users who hadn't been migrated yet, etc...
  • Dumped DHCP configuration of all DHCP servers in an AD forest, totaling about 50 servers
  • Cleared DNS cache across 120 DNS servers
  • Processed users to add/remove from groups corresponding with phases in a complex forest migration
  • Check disk space on servers and NetApp volumes
  • Properly deprovision user accounts according to legal compliance/company policy guidelines
  • Change local admin passwords across hundreds of servers and desktops
  • Change DNS conditional forwarding for certain domains across 120 DNS servers
  • Change TCP/IP configurations for over 100 servers simultaneous
  • Clear out unneeded snapshots on VI3/vSphere environments.
  • Create vSwitches across multiple ESX servers simultaneously
I could go on and on...

HeroPsycho is offline   Reply With Quote
Senior Member
 
sambuca69's Avatar
 
Join Date: Nov 2008
Location: NYC
Posts: 188

sambuca69 will become famous soon enough
Old 02-09-2010, 04:46 PM   #8 (permalink)

Quote:
Originally Posted by binarysoul View Post
I'm just wondering what do you guys use to write scripts in a Windows environment?

Also, what are the most common tasks that system admins accomplish through scripts?

I read about Powershell, which has been around since 2003.
I used PrimalScript as my IDE, but in the process of moving to PowerGUI Script Editor from Quest.

I write in VBscript/WMI and making the move over to Powershell.

Some tasks I do via scripts:
-getting local admins to machines
-pulling Win32 logs
-grabbing PC info
-installing/uninstalling software
-checking GPOs


Last edited by sambuca69; 02-09-2010 at 05:15 PM.
sambuca69 is offline   Reply With Quote
Nidhoggr, the Net Serpent
 
Claymoore's Avatar
 
Join Date: Nov 2007
Location: FL
Posts: 946

Certifications: MCITP:EA,EMA,EDA MCSE:Messaging 2003, MCSE:NT4, MCTS, CCNA, EMCISA
Claymoore is a glorious beacon of lightClaymoore is a glorious beacon of lightClaymoore is a glorious beacon of lightClaymoore is a glorious beacon of lightClaymoore is a glorious beacon of light
Old 02-09-2010, 04:53 PM   #9 (permalink)

Powershell has only been around since 2006, with Exchange 2007 being the first product that required it - even the GUI Management Console really runs PS cmdlets. With add-ons like the ADCmdlets from Quest and the new features in PS 2.0, it really is the best choice for windows scripting.

Prior to that there was VB Script, which I never bothered to learn. I have also used Wise or the SMS Installer to write compiled scripts, and before that I even used a little Kix scripting when a batch file wouldn't work.

Claymoore is offline   Reply With Quote
Senior Member
 
Join Date: Jun 2005
Location: Massachusetts
Posts: 205

Certifications: A+, Network+, Linux+, Security+, EnCE, CCE, MCSA Server 2003, MCTS: Vista WIP: 70-432
Everlife is on a distinguished road
Old 02-09-2010, 06:48 PM   #10 (permalink)

Quote:
Originally Posted by Claymoore View Post
Powershell has only been around since 2006, with Exchange 2007 being the first product that required it - even the GUI Management Console really runs PS cmdlets. With add-ons like the ADCmdlets from Quest and the new features in PS 2.0, it really is the best choice for windows scripting.

Prior to that there was VB Script, which I never bothered to learn. I have also used Wise or the SMS Installer to write compiled scripts, and before that I even used a little Kix scripting when a batch file wouldn't work.
Does anyone have a good recommendation for a book on Powershell?

Everlife is offline   Reply With Quote
Virtually in the shadows
 
pennystrader's Avatar
 
Join Date: Oct 2008
Location: Peoria, IL
Posts: 140

Certifications: Security+, MCITP: Enterprise Messaging Administrator 2K7, MCSE:Security 2K3, VCP 3.5/4.0
pennystrader will become famous soon enough
Old 02-09-2010, 06:56 PM   #11 (permalink)
Default Scripts

There are good scripts that are batch, VBscript and powershell. Powershell would be good to learn but some of us are good at VB already and now trying to learn a new language. Either one can run WMI queries as it will get you back any information you need to know on any Windows machine. Powershell can do more functions with less code but VB still does a great job of gathering information. That being said I want to know both


Learning powershell myself by watching these videos and practicing.....

CBT Nuggets: On The Job Training Series: Windows PowerShell



__________________
-----------------------------------------------------
The more knowledge one obtains the more there is too accumulate.....

-------------------------------------------------------

pennystrader is offline   Reply With Quote
Senior Member
 
crrussell3's Avatar
 
Join Date: Jun 2009
Location: West Des Moines, IA
Posts: 225

Certifications: MCTS: 620, 640
crrussell3 is on a distinguished road
Old 02-09-2010, 09:55 PM   #12 (permalink)

Haven't had a chance to read it yet, but here is a free powershell pdf book:

Master-PowerShell | With Dr. Tobias Weltner - PowerShell.com



__________________
MCTS: Windows Vista, Configuration
MCTS: Windows WS08 Active Directory, Configuration

crrussell3 is offline   Reply With Quote
Senior Member
 
binarysoul's Avatar
 
Join Date: Jul 2006
Location: Canada
Posts: 820

Certifications: Bachelor of Business (MIS), DIT (Networking). Certification(s): Superman. Working towards CEO.
binarysoul will become famous soon enoughbinarysoul will become famous soon enough
Old 02-09-2010, 10:05 PM   #13 (permalink)

Quote:
Originally Posted by Everlife View Post
Does anyone have a good recommendation for a book on Powershell?

My friend, you can try this published by Microsoft Press. Direct from horse's mouth

http://www.microsoft.com/learning/en...1&locale=en-us



__________________
Blaming tfosorciM

binarysoul is offline   Reply With Quote
Senior Member
 
Join Date: Mar 2007
Posts: 12,182

dynamik is a splendid one to beholddynamik is a splendid one to beholddynamik is a splendid one to beholddynamik is a splendid one to beholddynamik is a splendid one to beholddynamik is a splendid one to beholddynamik is a splendid one to behold
Old 02-09-2010, 11:30 PM   #14 (permalink)

Quote:
Originally Posted by binarysoul View Post
My friend, you can try this published by Microsoft Press. Direct from horse's mouth

http://www.microsoft.com/learning/en...1&locale=en-us
Actually, that PoSh book got horrible reviews. Check out the Absolute Beginners book or other highly-reviewed books on Amazon.



__________________
''=~('(?{'.('[-@.^~'^'+_)@*^').'"'.('@.&@-@@<@~$@^~.@^_'^')@@/^)%[%^@/*^@%*}').',$/})')

dynamik is offline   Reply With Quote
Senior Former Member
 
Join Date: Jan 2008
Posts: 1,980

Certifications: MCITP: EA, EMA; MCSE 2000/2003: M; MCSE 2000: S; MCSA 2000/2003: S; MCTS: ISA 2006; VCP3/4
HeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of light
Old 02-10-2010, 12:59 AM   #15 (permalink)

Quote:
Originally Posted by Everlife View Post
Does anyone have a good recommendation for a book on Powershell?
How about a free eBook?

Powershell TFM V1 eBook

http://www.primaltools.com/downloads/communitytools/

Best all around book IMO for learning PowerShell for admins. The Absolute Beginner one is arguably better for just learning how to script, but the book above is the best one for both the shell and scripting. Keep in mind the newer version of the book just released in eBook covers PoSh 2.0, but all the concepts of 1.0 pretty much carry over.

HeroPsycho is offline   Reply With Quote
Senior Member
 
Join Date: Jun 2005
Location: Massachusetts
Posts: 205

Certifications: A+, Network+, Linux+, Security+, EnCE, CCE, MCSA Server 2003, MCTS: Vista WIP: 70-432
Everlife is on a distinguished road
Old 02-10-2010, 01:43 AM   #16 (permalink)

Thanks guys, I'll give them a look!

Everlife is offline   Reply With Quote
Drops by now and again
 
astorrs's Avatar
 
Join Date: May 2008
Location: Vancouver, Canada
Posts: 3,059

Certifications: n+1
astorrs is a glorious beacon of lightastorrs is a glorious beacon of lightastorrs is a glorious beacon of lightastorrs is a glorious beacon of lightastorrs is a glorious beacon of light
Send a message via MSN to astorrs
Old 02-10-2010, 03:16 AM   #17 (permalink)

My vote for the 1st PoSh book everyone should pickup is Amazon.com: Windows Powershell in Action (9781932394900): Bruce G. Payette: Books

Read it cover to cover and practice as you go, it jumps around but if you follow it through you'll realize the things you were shown were at the right times. Jump around and you'll just get confused.

You can pickup what's new in 2.0 when you need to, after all you've got a lot to learn.



__________________
Follow me @ twitter.com/astorrs

astorrs is offline   Reply With Quote
g33k
 
phoeneous's Avatar
 
Join Date: Dec 2008
Location: On a fretboard
Posts: 1,016

Certifications: CCNA, MCSA:2003
phoeneous has a spectacular aura aboutphoeneous has a spectacular aura aboutphoeneous has a spectacular aura about
Old 02-11-2010, 05:00 PM   #18 (permalink)

I've never used the netsh command. Put this together in just a few minutes.

Code:
@echo off

netsh diag show computer
netsh diag show ip
netsh diag show dhcp
netsh diag show dns
netsh diag show gateway
netsh diag show ieproxy

netsh diag ping dhcp
netsh diag ping dns
netsh diag ping gateway
netsh diag ping ieproxy
netsh diag ping iphost 172.18.80.250

cmd /K

phoeneous is offline   Reply With Quote
Senior Member
 
Pash's Avatar
 
Join Date: Nov 2006
Location: United Kingdom
Posts: 1,442

Certifications: MCSA 2003, JNCIA-FWV, Security+ Expired: CCNA
Pash is just really nicePash is just really nicePash is just really nicePash is just really nicePash is just really nice
Old 02-12-2010, 05:53 AM   #19 (permalink)

Powershell

Basic PC audit for a group of pc's
Search through a bunch of files on a select group of pc's for text patterns and make changes based on the results

VBScript

Interesting one in vbscript, had a FSA requirement come through to lock out PC's at a particular time in the evening (yeh financial traders do not like locking or turning off their pc's at all).

Basic stuff like enumerating AD user accounts to the domain with random generated passwords etc.

Batch

Using dnscmd tool to add multiple forwarders to the DNS servers as well as deleting a few.



__________________
Cobra's! Let's bounce!

2010-2011 Goals: Get MCITP:EA done. Maybe VCP and CEH.

Next up: 11th October 70-648 MCSA transition Exam - 80% revision done.

Pash is offline   Reply With Quote
Senior Former Member
 
Join Date: Jan 2008
Posts: 1,980

Certifications: MCITP: EA, EMA; MCSE 2000/2003: M; MCSE 2000: S; MCSA 2000/2003: S; MCTS: ISA 2006; VCP3/4
HeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of lightHeroPsycho is a glorious beacon of light
Old 02-12-2010, 12:36 PM   #20 (permalink)

Don't forget you can use PowerShell in combination with batch and vbscript. For example, I added conditional forwarders to DNS servers using PowerShell to get all the DC's in the forest which were also all the DNS servers, then used a foreach-object loop to launch the dnscmd command string that added the conditional forwarding.

HeroPsycho is offline   Reply With Quote
Senior Member
 
Pash's Avatar
 
Join Date: Nov 2006
Location: United Kingdom
Posts: 1,442

Certifications: MCSA 2003, JNCIA-FWV, Security+ Expired: CCNA
Pash is just really nicePash is just really nicePash is just really nicePash is just really nicePash is just really nice
Old 02-12-2010, 01:48 PM   #21 (permalink)

Quote:
Originally Posted by HeroPsycho View Post
Don't forget you can use PowerShell in combination with batch and vbscript. For example, I added conditional forwarders to DNS servers using PowerShell to get all the DC's in the forest which were also all the DNS servers, then used a foreach-object loop to launch the dnscmd command string that added the conditional forwarding.
That sounds more logical, just giving examples of scripting ive used based on skillset and when I did them kind of thing. They all have uses, I mean batch is still very usable for deployment server scripting (eg. Altiris).



__________________
Cobra's! Let's bounce!

2010-2011 Goals: Get MCITP:EA done. Maybe VCP and CEH.

Next up: 11th October 70-648 MCSA transition Exam - 80% revision done.

Pash is offline   Reply With Quote
Bookmarks
Go Back TechExams.net IT Certification Forums > General > Off-Topic
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT. The time now is 07:00 AM.

 
 
Featured Sponsors

TrainSignal - “Hands On” computer training for IT professionals. Network+ Training, MCSE, Cisco & more! Visit Train Signal’s free training site to get loads of Free Computer Training, videos, articles and practice exams.

Preplogic - Sign up now to get Unlimited Access to PrepLogic's entire video training library. Enjoy open access to Microsoft Server 2008, CCNA, CISSP®, PMP and many more. Get Unlimited Access

 

Powered by vBulletin® Version 3.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
TechExams.net © 2002 - 2010