Home All Groups Group Topic Archive Search About



Scripting for Windows Server

microsoft.public.windows.server.scripting
Score [MSH] `n causes extra blank line - bug closed as expected behavior?
Keith Hill [MVP] - 11 Feb 2006 9:51 PM - 2 messages
Given this behavior of using a "single" `n: MSH C:\> "hi" hi MSH C:\> "hi`n" hi MSH C:\> I don't get why this should be expected?  I could understand postponing this bug but why should MSH behave this way?  ...
Score MSH-change directory bug
sa.cesare - 11 Feb 2006 4:43 PM - 4 messages
msh.exe console dosen't change directory actually if you run cd command though it will display changed directory but any windows/dos command will operate on directory you run msh.exe from. Regards. ...
Score msh.exe -command %1 -.msh association
sa.cesare - 11 Feb 2006 4:00 PM - 2 messages
Is there any way to execute script in context of existent console cmd.exe window and not lauch separate? Thanks. ...
Score MSH parsing bug
sa.cesare - 11 Feb 2006 3:18 PM - 7 messages
MSH>new-object System.IO.StreamReader "README",[System.Text.Encoding]::GetEncoding(101) new-object : A parameter cannot be found that matches parameter '101'. At line:1 char:11 is not working,I need to write something like: new-object System.IO.StreamReader "README",( ...
Score MSH-combine previous commands in command line
sa.cesare - 11 Feb 2006 3:00 PM - 6 messages
I've following scenario-several command I've executed before needs to be composed to something more complex-they must be used in other command's context. What kind of shortcuts/cmdlets exists to reference(maybe with correction ability) commands from shell history? ...
Score Best=simple way to execute msh script from .net app resources
sa.cesare - 11 Feb 2006 2:23 PM - 2 messages
How I can execute .msh script in context of my application? Thanks. ...
Score [MSH]add-member question
Dung K Hoang - 11 Feb 2006 12:25 AM - 3 messages
Hi, I've been struggling with this prblem since a while but can't find any explanation. Appreciate your help to figure out what happens. Here it is: I want to add several notes to an object using the cmdlet add-member ...
Score Home Directory Deletion
Z_Crawford - 10 Feb 2006 11:02 PM - 2 messages
I wanted to know if anyone may know of a way to delete an Active Directory account as well as the Home Directory. If you have to statically define the Home Directory or string it from a file, that is fine, but I am trying to do ...
Score Remote File Sharing - Multiple Directories on W2K/W2K3 Servers
Paul@UK - 10 Feb 2006 8:20 PM - 4 messages
Hello All, I'm hoping that some of you might be able to help me with a problem I have right now for work; basically I have to create a number of shared hidden directories (a shared directory for each logical drive on a ...
Score To find out a Primary Login ID in AD
vasanthi - 10 Feb 2006 8:10 PM - 3 messages
Hi Assume that a user has more than one login ID in the same domain (Active Directory). Is there any way / possibility to find out the primary login ID i.e. which of these IDs is used for primarily login ? Other IDs may be the ...
Score Help getting registry file entries
Jason - 10 Feb 2006 5:46 PM - 2 messages
I am looking to pull a single string value from the registry from the hkey_local_machine\software\my software\example "approvalnumber"="12342342342" And input it into a file approvalnumber.reg There are a ton of other string entries on the actual registry entries. ...
Score Export all smtp addresses to .txt file
Rob S - 10 Feb 2006 5:15 PM - 8 messages
I'm trying to figure out an easy way to pull all smtp addresses stored in AD, and export them to a text file. Any ideas? ...
Score Map network drive to user
erikzwep - 10 Feb 2006 12:52 PM - 2 messages
VBScript logon script program. ' Option Explicit Dim objNetwork, objSysInfo, strUserDN Dim objGroupList, objUser, objFSO Dim strComputerDN, objComputer Set objNetwork = CreateObject("Wscript.Network") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objSysInfo = CreateObject("ADSystemInfo") strUserDN = objSysInfo.userName strComputerDN = objSysInfo.computerName ' Bind to the user and computer objects with the LDAP provider. ...
Score Cleanup Script
esb0600 - 10 Feb 2006 10:30 AM - 4 messages
Hi I'm very new to scripting and have just started learning to script. However I have an urgent requiremnt at work to produce a script that will: 1) List all files above a certain size in a specified directory, or ...
Score [msh]wait for program exit
sa.cesare - 10 Feb 2006 9:00 AM - 9 messages
How I can wait unil some command complete? For example I need to unpack some archive and after that manipulate extracted files,but msh is not waiting for command to complete execution,so script can't see extracted files. Thanks. ...
Score WMI Script to apply to Windows Server 2003 only
Warren - 9 Feb 2006 9:20 PM - 2 messages
Hi,      I am creating a WMI script to use with group policy in Windows Server 2003. I want the WMI to allow the GP to apply only to Windows Server 2003 and no other OS. Can someone check my script and give a rookie a hand? I keep ...
Score add multiple users from a excell file
Xral - 9 Feb 2006 8:00 PM - 2 messages
May help me about this question? I need to add a group of many users from a excel file in a W2K domain, in wich perfil I need to place the full name, User logon name, password, description, profile path and logon script. ...
Score Running WMI Query "Win32_QuickFixEngineering"
Graybane - 9 Feb 2006 7:25 PM - 3 messages
I get a return but is this only hotfixes in effect since last Service Pack? It is not a complete patch history. ...
Score Unable to assign TerminalServicesHomeDrive Letter using script.
Lion - 9 Feb 2006 5:50 PM - 3 messages
Hi All, I have a problem with the included screp that is creating user accounts from Excell Spread sheet. this is the error that I get, Script:         Test2 Line:   148 ...
Score setting account expire date problem
Sandra L Miller - 9 Feb 2006 5:15 PM - 9 messages
I have a script that creates or updates student accounts each semester. The following code section is supposed to check if an account is set to never expire (for majors in our dept) and not change it if it is. ...
Score Listing mapped drives on remote computers
Jody White - 9 Feb 2006 4:23 PM - 2 messages
I have the following script: strComputer = InputBox("What is the computer name:") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colDrives = objWMIService.ExecQuery _      ("Select * From Win32_LogicalDisk Where DriveType = 4") For Each objDrive in colDrives ...
Score HELP... check if file exists, if not EMAIL
madmanhiker - 9 Feb 2006 2:05 PM - 2 messages
Hello all - I thank you in advance for any help.  I am new to wss but I am familiar with asp.  I have been asked to create a script on a iis box to check a directory everyday at 8am for the existance of a file that gets ...
Score adding a custom url to many users
Odd-Arne - 9 Feb 2006 11:52 AM - 2 messages
Used this: Const ADS_PROPERTY_APPEND = 3 Set objUser = GetObject _     ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com") objUser.PutEx ADS_PROPERTY_APPEND, _ This script adds to a single user, what im looking for is a script that adds ...
Score Newbie bat file question
Chris - 9 Feb 2006 6:57 AM - 2 messages
I am trying to run the bcp utility. When I run it from the command prompt it works. When I try it from a bat it goes into this crazy endless loop repeating the command again and again. Any ideas what I am doing wrong? ...
Score [MSH] Process AliasProperty VS
Keith Hill [MVP] - 9 Feb 2006 6:06 AM - 4 messages
Given these alias properties on Process: Handles                        AliasProperty  Handles = Handlecount Name                           AliasProperty  Name = ProcessName ...
Score Script for setting XLS passwords
News Group - 8 Feb 2006 11:38 PM - 2 messages
Hi all, I am trying to use a script to password protect multiple xls file in a common folder. when i use the following with a specific file path and name it works fine:     Set objExcel = CreateObject("Excel.Application") ...
Score Manage computer objects for a given OU
James - 8 Feb 2006 9:00 PM - 6 messages
How can I programmatically bulk add users to computer objects within a specific OU? ...
Score Audit Policy Settings
Carlos Felipe França da Fonseca - 8 Feb 2006 8:48 PM - 4 messages
I need to configure Audit Policy Settings (Event Viewer) on more than 3 thousands of NT Servers. For example: Logon and Logoff               Success & Failures File and Object                   Access Failures ...
Score Finding Folders
Carlos Felipe França da Fonseca - 8 Feb 2006 8:08 PM - 3 messages
Guys, Does anybody know how to check if there is an especific folder in a computer? For example: User* I know that the function FileExists(strInputFile) find especific names, such as "USER", but I'm not sure if would find all folders that starts with ...
Score How to create users using VBS from an Excel sheet.
Lion - 8 Feb 2006 4:39 PM - 10 messages
Help please, I'm trying to put a script that will crate users from an Excel sheet and I get this error: Line: 11 Char: 5 Error: The directory property cannot be found in the cache. Code: 8000500D Source: Active Directory ...
Score liste des membres d'un groupe
Laurent - 8 Feb 2006 3:00 PM - 2 messages
bonjour comment faire pour obtenir la liste des membres d'un groupe  ? ce groupe se trouve dans une ou qui elle même se trouve ds une OU domaine  : test.fr OU1 , inclus dans OU2 groupe: group1 ...
Score Script for disconnecting all users from shared folder on 2003 svr
lennon - 8 Feb 2006 2:10 PM - 2 messages
Im new to scripting and have been asked to product a script that can run as a schedule task on a server that will disconnect all users from 1 particular shared folder on the 2003 svr.  Users are going home at night and not logging ...
Score need to modify local group membership via VBscript
SixHouse - 8 Feb 2006 1:53 PM - 16 messages
i have a bunch of remote workstations (some xp, some NT). i need to make sure that the domain admins group is a member of the local admins group on the workstation. can i do this if i have a text file that contains ...
Score monad fileobj.GetHashCode
Jeremy Pack - 8 Feb 2006 1:38 PM - 3 messages
Has any Monad guru got 30seconds to give me the syntax on using the GetHashCode function on a file object. Basically I want the system to compute and report the hashcode for a bunch of files. Thanks ...
Score encode HTA
TomKing - 8 Feb 2006 4:20 AM - 4 messages
I got MS Script encode 1.0. Just figure out how to convert vbs to vbe. But have no idea how to convert a .hta file into vbe or whatsoever extensions. Could someone give some tips? ...
Score Simple VBscript that does a HTTP GET
Marco Shaw - 7 Feb 2006 7:38 PM - 4 messages
Googled around... I'm looking for a simple VBscript (not called from an ASP page) that can do a simple HTTP GET to a URL/port (HTTPS would be nice too). I'd need it to also return a success or error code. ...
Score "User must change password" flag
Dewar Stewart - 7 Feb 2006 5:06 PM - 2 messages
How do I clear this flag on Windows Server 2003 AD from a VBScript? ...
Score can i GET and AD user without full LDAP path?
SixHouse - 7 Feb 2006 1:21 PM - 6 messages
i have a script that will update the description field on AD user objects. the problem is that the user might exist in 1 of many OU's. Is there a way to either A) bind to the user without using the full DN or B) bind to the ...
Score Login Script - ASP over ODBC
marius.hole - 7 Feb 2006 8:35 AM - 3 messages
Hello. I need to set up a login script with information for the users. The problem is; I have a script (user.asp) that queries a database over odbc. http://intranett/print/user.asp?UserName=%username% I need to include this script in the login information box, so the ...
Score [MSH] Misc XML Issues
Keith Hill [MVP] - 7 Feb 2006 8:34 AM - 4 messages
I'm playing around with some practical applications of MSH for developers as part of brown bag presentation.  I want to show how to easily analyze VS 2005 C# project files since they are just XML files.  The first problem I ran into is this: ...
Score When and AD object was created ?
chaos_ali - 7 Feb 2006 7:05 AM - 2 messages
Is their a way to find out the time when an Active directory object was created and by whom was it created By using this command line : adfind -gc -b -f mail="test***@hp.com" I can find out when it was created and i mean the date , but i want the TIME ...
Score Stupid question
Alex Mieles - 7 Feb 2006 1:35 AM - 5 messages
Hello, I am doing a simple replace operation in a csv text file, but am trying to find a method to add a word to the beggining of each line in the output file along with that replace method.  ...
Score [MSH] Suppress NewLine and Redirect to File
Tom G. - 7 Feb 2006 12:45 AM - 10 messages
I'm writing an MSH script in which I need to be able to echo a line to standard output without automatically adding a newline character so that I can then begin outputting the results of another command starting on the same line. All of this output should then be captured ...
Score [MSH] group-object and labelling groups
Keith Hill [MVP] - 6 Feb 2006 9:39 PM - 7 messages
Many times the "Name" property of a GroupInfo object doesn't adequately represent the data being displayed e.g.: MSH:98 # get-history -count $maximumhistorycount | group {$_.StartExecutionTime. Hour} | ft Count,Name -auto Count Name ----- ----    12 10    29 11 ...
Score Bringing it all together
Jeremie - 6 Feb 2006 9:31 PM - 6 messages
Here is my situation. I have found tons of useful scripts to perform allot of various tasks that I want done on a regular basis. Now what I would like to do is bring them all together into one big administrative tool. I would like ...
Score Monad : Registry HKCR ?
jmd.msdn - 6 Feb 2006 3:10 PM - 5 messages
Hello. Questions : 1. Is it possible, with Monad, to access registry keys other than HKLM and HKCU ? 2. Is it possible, with Monad, to access the root of a computer's registry ? How can I write a monad script that search the ENTIRE registry (recurse to ...
Score Script for a date.
Frank Martin - 6 Feb 2006 5:16 AM - 5 messages
My digital camera software has script for the picture date as "%d%m %y" which returns as "010606". Is there a script which will return the date as "01Jun06"? Please help, Frank ...
Score Change Permission on NTUSER.dat
MIIS Query - 5 Feb 2006 11:43 PM - 3 messages
Hi All Thanks  in advance, Do some one have a approach of chaning the permission on NTUSER.DAT registery hive of roaming profile. Quick reply is highly appreciated. eg \\servername\share\UserHome\profile\ntuser.dat Regards Venkey ...
Score Missing Help files in Beta 3?
Andrew Watt [MVP] - 5 Feb 2006 9:07 PM - 2 messages
The about_operator Help file refers to about_unary_operator and about_special_operator Help files. These appear to be missing in the build of Beta 3 that I am using. Andrew Watt MVP ...
Score [msh] Parameter input from argument or pipeline?
Nick - 5 Feb 2006 3:58 AM - 3 messages
I'm trying to design a cmdlet that, for one of the parameters, takes data from the pipeline if it's there, and if not takes it from the first argument (it's a specialized copy command). So, I want all of these to do the same ...
Score How do I use -Credential parameter?
TonyDeSweet - 5 Feb 2006 2:50 AM - 2 messages
There are some buildin cmdlets with -Credential parameter (for example those *-Item cmdlet). But when I used those cmdlet with -Credential, I always got an error (no matter it is Filesystem provider or registry provider). Is there something I did wrong or Is it designed to act like that? ...
Next »