|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scripting for Windows Servermicrosoft.public.windows.server.scripting
Using VBScript for logon scripts rather than BAT files
Laphan -
24 Nov 2007 2:44 PM - 4 messages
Hi All It seems to be that using VBscript files are better (more reliable??) than BAT files when it comes to adding/removing/setting default printers - is this the case? Due to the blessed HP2600N printer I've had to install this printer manually ...
Making domain users local admins
Laphan -
24 Nov 2007 2:39 PM - 8 messages
Hi All I had a problem whereby the teachers couldn't use their home internet on their 'domain-linked' laptops because of the limited access that they get. Didn't want to make them part of the domain admins groups so somebody ...
lotr gold in eu/us service wowmmocom.com
julieook -
24 Nov 2007 9:15 AM - 1 message
[link] The Lord of the Rings (EU)--Belegaer - 10 $: 10.49 --------------------------------------------------- The Lord of the Rings (EU)--Evernight - 10 $: 10.19 ------------------------------------------------------- The Lord of the Rings (EU)--Maiar - 10 $: 10.69 ...
Network Link Speed
Uncle Marcus -
24 Nov 2007 12:08 AM - 2 messages
I need a script that will change network speed for over a hundred workstations on our network from 10 to 100 or auto. ...
script to shutdown MS access
OM -
23 Nov 2007 11:06 PM - 2 messages
Hi, Can anyone tell me how to use a script to shutdown MS access in a graceful way? Thanks Keith ...
How to identify if the OS is Vista or higher
DPM -
23 Nov 2007 2:14 PM - 2 messages
Hi, Is there a way to know if the OS version is Vista or higher through a MS-DOS batch file ? Following is a sample which I managed to do Ver > OSVer.Txt FIND "[Version 6." OSVer.Txt > NUL ...
Add employeeID to users
natsky -
23 Nov 2007 12:54 PM - 3 messages
Hi We get list where we have lastname firstname username employeeID Is there scrip which adds empoyeeID to AD's users? Our domain and forest are in windows 2003 server mode. ...
new script
Alberto Arias -
23 Nov 2007 12:38 PM - 11 messages
Hi, I'm trying to compare 2 hour but i don't find the correct script. I'm trying to test the excution of one aplication with a flag. i like check the flag and test if the creation time of this (flag.txt) it's 6 horas minor ...
enforce SSL 3.0, remove SSL 2.0 on Internet explorer
Leezy -
23 Nov 2007 8:12 AM - 3 messages
Hi Guys, i wrote this script to change the settings on all client to force connection to use only SSL 3.0. I am testing it on my PC, but the result was a failure. could some one have a look of the script and let me know? ...
Script to change LAN authentication to PEAP
balangan -
22 Nov 2007 9:34 PM - 1 message
Hi all, I am trying to find a way to modify, via script, the LAN authentication mode of my xp clients to: PEAP (LAN properites - Authentication Tab- Use Protected EAP). I explored netsh utility a bit, but did not figure out. Any other ...
Deploy Software form a script.
Pradeep Bisht -
22 Nov 2007 1:29 PM - 2 messages
Hello, I need a script through which, I can deploy softwares remotly in client machine. and It will will be better, if the software install silently in backend. Lokking for your response. Thanks. Pradeep. ...
How to get accts created in last 7 days
Wizzy -
22 Nov 2007 5:41 AM - 6 messages
Hi, I would like to know how to get a list of xp accts created in an OU in past 7 days along with their creation date, home drive path & profile path. I would like the output of the script to be directed to an excel file with each ...
code to parse logon servername and exit if name start w/abc*
Smoreno -
22 Nov 2007 12:05 AM - 3 messages
Hello, I have the following code on a login script to read the logon server name: Set WSHShell = CreateObject("Wscript.Shell") Set WSHProcess = WSHShell.Environment("Process") LogonServer = WSHProcess("LogonServer") But now I am not sure how to parse the 'Logonserver' name to and skip ahead ...
Sign a script
Troy -
22 Nov 2007 12:04 AM - 5 messages
I am attempting to sign a script for the first time and receiving an error. I have installed a Code Signing certificate from my Enterprise Root CA in my personal certificate store ("My"). I am using a slightly modified version of ...
Local Administrator Group
Fausto -
21 Nov 2007 9:49 PM - 3 messages
hello I need a script that shows all users memebers of local administrator group in my domai ...
Copy file from server to workstation at logon
116 -
21 Nov 2007 3:31 PM - 4 messages
Can someone help regarding a file I would like copied to the local PC everytime they logon to the domain. Server is 2000 and using active directory Thanks ...
output to a file
LMac -
21 Nov 2007 2:02 PM - 5 messages
Hi I need to output a list of pst files from a server into a text file. I have found this script which will show on screen the files but unable to find out how to export the list to a txt file. Can this be done? ...
Script Need to check disk space on remote servers
screwuphead -
20 Nov 2007 6:07 PM - 4 messages
I know i could always a program to do this but wheres the fun in that?
so I need a program that will go through a list of servers and then a
list of their drives and check to see how much free space is left on
those drives, from their if it is anything less then 30GB i need it to
send an email to me.
i am using psexec to access these remote servers and run cmd. then to
email myself i am using postie.
the problem i am having is wrapping that all up in a if-then-else
command that will look for the specified free space. It doesnt work
right now beacuse for whatever reason it is bring back a true statement
when the statement is false because i know the server its checking is
more then 30GB free.
This is what i have so far:
@echo off
for /f %%S IN (serverPClist.txt) DO (
echo Checking drives on Server %%S...
for /D %%D IN (C D F G H I J K X V E) DO (
psexec \\%%S cmd /c if exist %%D:\* dir %%D:\ | findstr /c:"bytes" >
%temp%\%%S-%%D.txt
)
)
color 0D
for /f %%S IN (serverPClist.txt) DO (
echo. & echo.
echo ********** Displaying output for server %%S... **********
for /D %%D IN (C D E F G I J K) DO (
for /f "tokens=1,2,3,4" %%F IN ('if exist %temp%\%%S-%%D.txt type
%temp%\%%S-%%D.txt') DO (
if /i "%%G" == "Dir(s)" echo For the %%D: drive: %%H bytes free space.
if /i "%%G" == "bytes" echo For the %%D: drive: %%F bytes free space.
echo.
)
)
echo Done!
)
echo Generating HTML...
REM this part of the script generates an HTML file with all the
relevant information
REM and then launches it using the default browser.
set FileName="C:\Report.html"
echo ^<HTML^> > %FileName%
echo ^<HEAD^> >> %FileName%
echo ^<TITLE^>Free Space on NRCE Servers^</TITLE^> >> %FileName%
echo ^</HEAD^> >> %FileName%
echo ^<BODY^> >> %FileName%
echo ^<CENTER^>^<FONT SIZE=6 COLOR=BLUE^>Free Hard Drive Space
Report^</FONT^>^</CENTER^>^<BR^> >> %FileName%
for /f %%S IN (serverPClist.txt) DO (
REM mark the server
echo ^<FONT SIZE=4^>^<B^>%%S^</B^>^</FONT^>^<BR^> >> %FileName%
for /D %%D IN (C D E F G I J K) DO (
for /f "tokens=1,2,3,4" %%F IN ('if exist %temp%\%%S-%%D.txt type
%temp%\%%S-%%D.txt') DO (
REM add a line for the drive and free space
if /i "%%G" == "Dir(s)" echo ^<FONT SIZE=3^>Free space on
^<B^>%%D:^</B^> drive: ^<B^>^<FONT
COLOR=GREEN^>%%H^</FONT^>^</B^> bytes free^</FONT^>^<BR^> >> %FileName%
if /i "%%G" == "bytes" echo ^<FONT SIZE=3^>Free space on
^<B^>%%D:^</B^> drive: ^<B^>^<FONT
COLOR=GREEN^>%%F^</FONT^>^</B^> bytes free^</FONT^>^<BR^> >> %FileName%
)
)
REM mark some spacing lines into the HTML file
echo ^<BR^> >> %FileName%
)
echo ^</BODY^> >> %FileName%
echo ^</HTML^> >> %FileName%
REM launch the HTML file
set positive=1
set amount="30,000,000,000"
if %%f leq %amount% set violation=1
if %%h leq %amount% set violation=1
echo %violation%
if %violation% equ %positive% postie -host:(SMTP SERVER) -to:(MY EMAIL)
-from:(NETWORK EMAIL) -s:"Server Report" -msg:"THERE IS A VIOLATION!"
-a:"C:\ServerReports\Report.html"
echo Done!
If anybody else has anything better plz show me, otherwise i will keep
playing around with this coding.
--
screwuphead
------------------------------------------------------------------------
screwuphead's Profile: [link]
View this thread: [link][link] ...
home folder / xcacls.vbs script stopped working on migration to NA
prometheus242 -
20 Nov 2007 5:59 PM - 1 message
We currently utlize a script that creates a home folder then calls xcacls.vbs that sets home folder permissions and ownership for the user. This script has worked flawlessly until we migrated to a new SAN & respective attached NAS in ...
Need a script to capture computer names in IP range
Rick Neely -
20 Nov 2007 4:44 PM - 3 messages
I am needing a script that will scan an IP range on our network and create an Excel spreadsheet with a list of computernames. This will allow me to create other scripts for our specific group and not the entire domain. ...
Is it possible to disable via script?
joker197cinque -
20 Nov 2007 3:28 PM - 2 messages
I would like to disable ALL USB ports on my client via script, regardless if will be connected a storage usb hardware or, for instance, a printer. Is it possible to do this using a cmd,vbs,reg script? Any help appreciated, best regards. ...
Deleting Files and folders
po_boy -
20 Nov 2007 2:50 PM - 5 messages
I have some files and folders under C:\LogFiles. This folder has many subfolders and files. I need to find an easy way to delete the files or folders(subfolder) that are older than X days. Most scripts only do a folder ...
Script to autoarchive Outlook
Vico -
20 Nov 2007 12:30 PM - 1 message
I´d like create script that´s change the autoarchive configuration from every Outlook folder. Anyone knows how I can do it? Thanks ...
Change encoding of text file made par vbs script
hasdou -
19 Nov 2007 7:57 PM - 2 messages
hi, i made a script that make an ouput text file (let's call it file.txt) : Set objOutputFile = objFileSystem.CreateTextFile("C:\file.txt") The final text is encoded ANSI and I need it to be rtf. How can I make it possible ? ...
VBScript or JScript
Hassan -
18 Nov 2007 7:13 AM - 4 messages
Are there any pros and cons of VBScript and JScript ? I want to learn one scripting language and just bought a book on VBScript, but also see many programmers using JScript for their Web programming ? So i want to know when to use one vs the other ? ...
Database Backup Problem
imran019 -
18 Nov 2007 6:56 AM - 2 messages
Message: when I want to creat backup from SQL server 2000 sp3 then show one massage that, cannot find the DLL xpstar.dll, or one of the DLLs it references.Reason: 126(The specified module could not be found) ...
|
|||||||||||||||||||||||