Recently in Scripting Category

A whole podcast just for me!

|

A couple of admins posted for questions for some future interviews that they had in the pipeline so I sent in an email about scripting. I'm currently proficient in batch file scripting but really struggled with Powershell scripting which is unfortunate as it looks like this is where admin scripting is going in 2008 with Windows 2008 and Exchange2007. So Steve kindly produced a 10 minute podcast that answered my questions about getting started in Powershell and that was all that was in it - a whole podcast produced for me (but I don't mind other people listening to it either)- Thanks very much Steve!

Scripting Printer installations

|

Computer Performance has a useful tip on installing printers via a login script. One thing I noticed when I tried it was that it needed the descriptive name of the printer (in quotes if a space is used) instead of the sharename of the printer ie
rundll32 printui.dll,PrintUIEntry /in /q /n"\\server01\sharp al-1655cs"

Nmap scripting.

| | Comments (1)

I've toyed with nmap tonight to try and speed up some scripting across the lan scripts - currently I have a script that copies files across the lan, by checking each ip in turn to see if the machine is there and then copies it across - it's very laborious and slow - I started it at 6pm tonight and it's still running now at 10.24pm (It copies 3*100mb files across the lan).
I think by using nmap to ping sweep the lan and feed the results to a loop batch file it'll be much quicker.
The nmap and dos script is this :-

nmap -sP 192.168.98.0/24 -oG pclist.txt

for /F "skip=2 tokens=2" %%i in ('find "Status: Up" pclist.txt') do echo %%i is alive!

Just replace the echo bit with the command you want to run.

powershell ide's

|

Looks like there is now some more incentive to start using the powershell that I installed on the notebook as there are two ide's to use - see Scott Hanselman's blog post for more details.

set passwordneverexpires

|

Although its not a good idea to do this, we have a requirement to set the passwords for users on a telnet application so that they never expire. This is because the telnet interface is the only interface they have with the server and therefore they don't have any way of changing their passwords. Security is controlled by another layer of usernames and passwords within the app so its not that much of an issue.
Anyway, I have a script that creates all the users for me - saves me having to enter all the fields correctly and also ensures that all the fields are entered in a uniform manner.
Until this morning, I'd not been able to set the password never expires option. However using netuser.exe, available from JSI Tip 570 you can do this with netuser username /pwdnexp:y

w2k maths

|

My Windows 2000 script to check whether the amount of disk used in a certain directory is greater than the amount of free space in a directory on Google Groups hit a snag this morning when someone had 35GB of data and over 100 GB of data available (previously they had <100GB.
I had to change the script so that it now reads as below. (I've out it within the extended entry so that it displays correctly all on one line which my css breaks on this page)

Categories

Pages

Powered by Movable Type 4.1

About this Archive

This page is a archive of recent entries in the Scripting category.

ScreenCaptures is the previous category.

Search Engines is the next category.

Find recent content on the main index or look in the archives to find all content.