Home All Groups Group Topic Archive Search About



Scripting for Windows Server

microsoft.public.windows.server.scripting
Score Creating "Home" dirs via script
Mike M - 4 Feb 2006 5:07 PM - 5 messages
Our A-D environment disallows us to create home dirs in the User's Properties part of the GUI.  Thus, we need to create them manually. I looked over at MS's scripting site for a way to mimic this script I wrote ...
Score Question-Scripting
Morgan - 4 Feb 2006 12:23 PM - 2 messages
Hello to everyone,     I took my web server's logs (W2K3) through that scheme :          [link] and for policy-security reasons i need to donwnload every day the current ...
Score How to shift %*?
jkhasdjh jkahsdk - 3 Feb 2006 8:47 PM - 2 messages
I am writing a cmd script that needs to shift the input parameters. When I do that, the %* value stays the same!  Run the following test script yourself and see the %* always contains the same string, even after the SHIFT.  Is there a work around for this bug?  I'm sure ...
Score set time zone
James Wetzel - 3 Feb 2006 3:04 PM - 2 messages
I need to be able to set the "auto adjust for daylight savings time". I have a script to adjust GMT offset but can't figure out what the property is for setting the DST switch. Any help greatly appreciated. ...
Score Process Duration Tracking in Windows 98SE
Jim Griz - 3 Feb 2006 11:24 AM - 2 messages
I'm hoping to write a VBScript that I may use on Windows XP to track user usage of certain programs partially using the script found here [link] ...
Score Curious Array behaviour and Documentation analysis script
Neville Bagnall - 3 Feb 2006 10:10 AM - 3 messages
First a question: Any idea whats happening here? MSH> get-command gci|foreach {$paramhelparray=((get-help  $_).parameters|select -expand parameter|foreach {$_.name})} MSH> $paramhelparray[0] -eq "Path" True MSH> [System.Array]::indexof($paramhelparray,"Path") ...
Score [MSH] export-console missing functionality
Keith Hill [MVP] - 3 Feb 2006 2:23 AM - 4 messages
Based on the description of this cmdlet: Export the changes made to the current console. This action overwrites an existing console file. I'm a bit disappointed that it doesn't persist variables or functions defined at the command prompt nor does it persist history.  Is this ...
Score How to keep session variable on combo box for "Country"
Mark B - 3 Feb 2006 2:02 AM - 4 messages
I have a aspx form with a combobox drop-down to select 1 country from over 120 countries. On the next web page after that, I also have the same combobox so that the user can make a final confirmation of the data entered and also add some ...
Score [MSH] Language Design per Anders Hejlberg
Keith Hill [MVP] - 2 Feb 2006 9:44 PM - 4 messages
Regarding: ! vs -not ,$a vs @($a) $hashtable.key vs $hashtable["key"] Check out this interview with Anders (C# language architect) especially at time index ~37:30 to 39:00.  He has some interesting things to say about language simplicity and duplicate ways to do things ...
Score Print to mutiple printers
stev379 - 2 Feb 2006 7:50 PM - 2 messages
I have a list of 151 printers that may have been physically removed from the network over the last few years.  I'd like to send a test job to each printer, with a note for any user who sees the note on the printer to call me. ...
Score [MSH] handling of command line parameters
forestial - 2 Feb 2006 7:31 PM - 7 messages
The MSH shell behaves differently from CMD.EXE in the way it passes command line parameters to a program. The following C# program: static void Main(string[] args)     {       foreach (string arg in args) ...
Score Delete Folders and contents based on date
lunj69 - 2 Feb 2006 5:49 PM - 2 messages
Hello, Can anyone show me a script to delete folders in a directory and all of the subfolders' contents based on a date. ...
Score Script to replace a file in Application data folder
altria - 2 Feb 2006 4:33 PM - 2 messages
Hello All, Is there a way that i can script to all my users a file to be placed into application data folder of the currently logged on user (such as what would be the wildcard value for username in vbs?) ...
Score file property list
King_K_Rool - 2 Feb 2006 3:30 PM - 3 messages
Does anybody know where i can find a list with ALL file properties, eg. duration of a mp3 file (objFile.****) ...
Score script RUNAS for mapping access to a drive
altria - 2 Feb 2006 3:01 PM - 4 messages
Hello All, I would like to know how I can create a VBS script to prompt for credentials in order to map a drive, such as using RUNAS command with .MapNetworkDrive method? I have disabled right-click on machines, thus that option is not available. ...
Score Printer scripting
Antonio Ceacero - 2 Feb 2006 8:14 AM - 2 messages
Hi group, I have installed a printer queue in a Windows 2003 server. I need to add the printer to all workstations depending of DC, How can I automatize this in the start script on Netlogon? Thankyou for advanced. ...
Score removing local admin rights
AdminKen - 2 Feb 2006 7:54 AM - 5 messages
I have hundreds of XP (sp2) and W2k workstations PCs across several sites on one domain.  Many of the users have local administrative rights. At some point their domain user account or security group has been added to their ...
Score tools that allow to delete file based on x days
James - 2 Feb 2006 7:04 AM - 5 messages
are there any 3rd party tool that allow me to delete files on a certain directory based on x number of days from the filename date ? ...
Score [Moand] MSH Crashes when changing prompt
Umesh Thakur - 2 Feb 2006 1:14 AM - 2 messages
Hi, When changing prompt using following function, it works: function prompt { "$env:username:" } OR function prompt { $env:username + ":"} prompt is changed to (if logged-on user name is "Umesh"): Umesh: However, if following functions is used, to do the same, MSH crashes: ...
Score Help needed for script to check for folder and delete content
jessi - 2 Feb 2006 12:53 AM - 2 messages
Hi, I'm new to scripting and need some help for VBscript.  I need the script to check if the user profile folder exists in C:\Document and Settings and if it doesn't exist I would require to delete the content of particular folder ...
Score Active Directory Users Homedirectory
Chris Watson - 1 Feb 2006 10:29 PM - 2 messages
Hi, I'm looking for a way to script changing the homedirectory for all the users in an OU to \\server\share\username. Is there an easy to loop through all the users in an organisational unit? Thanks, Chris ...
Score [Monad] Unexpected get-childitem result
Andrew Watt [MVP] - 1 Feb 2006 9:55 PM - 4 messages
If I use get-childitem * -include * or get-childitem ./* -include * the results recurse which I must admit I didn't expect. Is that the intended behaviour? Andrew Watt MVP ...
Score [Monad] Another get-childitem question
Andrew Watt [MVP] - 1 Feb 2006 9:36 PM - 6 messages
If I have .txt files in a directory the command get-childitem * -path *.txt works in that it returns all the .txt files. But why doesn't it give an error - that the path parameter has been specified twice? Once as a positional parameter (*) and once as a ...
Score [Monad] get-childitem -include problem
Andrew Watt [MVP] - 1 Feb 2006 8:32 PM - 7 messages
I am having problems with the include parameter for get-childitem. Suppose I am in a directory with four .txt files. I can use get-childitem *.txt and all four files are listed. If I use get-childitem . -include *.txt ...
Score [Monad] Ordering and presence using format-list
Andrew Watt [MVP] - 1 Feb 2006 4:16 PM - 3 messages
I am a little puzzled about the detail of results that are sometimes displayed using format-list. For example, take get-provider registry | format-list then compare the results to those from get-provider registry | format-list * -force The ordering of properties is different. Why? ...
Score [MSH] How to emulate 'tail'
forestial - 1 Feb 2006 2:19 PM - 12 messages
The get-content cmdlet can emulate the unix 'head' command:    get-content -TotalCount 10 abc.txt produces the first 10 lines of the file. Is there a way to emulate 'tail'? Better yet, how about 'tail -f' (which keeps watching the file, outputting ...
Score What happened to the out-excel cmdlet?
Andrew Watt [MVP] - 1 Feb 2006 1:16 PM - 7 messages
I am reasonably sure that "way back" there was a demo of an out-excel (or similarly named) cmdlet. What happened to it? Has it been removed from Monad version 1? Or has the approach been re-thought? Thanks Andrew Watt ...
Score [Monad] Missing description for FileSystem provider
Andrew Watt [MVP] - 1 Feb 2006 1:14 PM - 4 messages
If you run get-drive | format-list all the providers except for the FileSystem provider have a value for Description. Minor bug that needs tidying? Andrew Watt MVP ...
Score Rename users from file csv o xls
Kelly - 1 Feb 2006 1:01 PM - 6 messages
Hi, I have the necessity to rename 1000 users in Active Directory. Do you know by chance how to make a script that renames 1000 users taking the information from a file excel or csv? For example in the file excel is here  : ...
Score vbscript timeout
webhokc - 1 Feb 2006 7:44 AM - 2 messages
How can I instruct the script to wait for a certain period of time, and then move on to the next line? I am using http.get, and want to terminate that part if I do not get a response within 2 seconds. Is is possible using vbscript? Please let me ...
Score [MSH] proxy authentication?
Jason - 31 Jan 2006 11:09 PM - 2 messages
I'm using the sample script from the Channel9 website for gathering RSS fee titles.  My question is how do I use $webRequest to authenticate through a proxy server?  Here's the pagelink:  [link] ...
Score Scripts for IIS
gralet - 31 Jan 2006 9:05 PM - 5 messages
How can I create a virtual directory with a script in IIS 5.1?, I found that I can't use WMI but I hope there is another way. ...
Score Running MSH Files
ebgreen - 31 Jan 2006 7:56 PM - 4 messages
I am having a problem with running MSH files. I will save the file as *.msh then from within a monad command prompt type the name of the file either with or without the extension and I get the following eror: ...
Score [Monad] Missing help about_switch
Andrew Watt [MVP] - 31 Jan 2006 6:39 PM - 6 messages
I am unable to locate help about switch in Beta 3. Is it there? Or still to be added? Thanks Andrew Watt MVP ...
Score Script to set a local user account password to never expire
BC - 31 Jan 2006 4:27 PM - 3 messages
I am looking for a quick fix to write a script that will set a local user accout password to never expires.  Our notebooks are part of a windows 2003 domain.  I attempted to user the net user comman, however the expires syntax ...
Score Distribute files from the server to client machines
Dietmar21 - 31 Jan 2006 11:24 AM - 5 messages
I want to be able to take the variable "computername" (if it exists?) and look for the corresponding file within a folder on the server (computername.txt) and distribute the file to a location on that machine e.g %programfiles%\computerinfo. ...
Score Scripting DNS
Guy Austrian - 31 Jan 2006 10:03 AM - 7 messages
Could someone point me to documentation on scripting DNS using VBS & WMI? All I could find, with any amount of details, applied to C++ on MSDN. Thanks in advance! ...
Score script to write out first 10 chars of line 1 of a txt file
joe cullen - 31 Jan 2006 5:38 AM - 2 messages
I have the following code supplied earlier that loops through all files in a folder, but the echo command to write out the char string in position 1-10 of line 1 of each file in the list is failing (object doesn't support this ...
Score Renaming Groups
Zaipai - 31 Jan 2006 3:20 AM - 8 messages
I setup a script to rename some groups. The scripts works, but I don't know how to get the Pre-Windows2000 group name changed also. Any Ideas? Thanks ahead. ...
Score Can no one tell me how to script password change for Sch. Tasks on multiple servers?
Marc - 31 Jan 2006 2:30 AM - 2 messages
Premium support at MS said they didn't have anything. Got no responses the first time I posted this here. Figured I'd try again. I'm trying to write a script that changes the password of the scheduled tasks accounts on multiple servers in the same domain. ...
Score [Monad] get-property -property parameter
Andrew Watt [MVP] - 30 Jan 2006 6:26 PM - 10 messages
I am using the HKLM registry drive. If I use get-property . -property ProductVersion I expected to get back the value for ProductVersion. Instead I get values for six properties including ProductVersion. Since I supplied only a single value for the property parameter why do ...
Score [Monad] Snapins
RichS - 30 Jan 2006 5:08 PM - 6 messages
In the production version of Monad will there be any controls around who can add snapins into the shell and will these permissions be controllable via group policy ...
Score [MSH] get-childitem and file attributes...
Mark Rochotte - 30 Jan 2006 4:57 PM - 11 messages
Hi all, I would like to get a list of just directories from the get-childitem cmdlet. I just can't quite figure this one out. Any help would be appreciated. thanks, m ...
Score Add users to group Windows 2003
ryanmhuc - 30 Jan 2006 4:27 PM - 4 messages
I was wondering 2 things. 1. How to add users to a group? 2. How to set "Password Never Expires" to a user? I have searched but haven't found anything. Using net group gives me a "This command can only be used on a Windows Domain Controller" which ...
Score [Monad] Suggestion for default behaviour of cmdlets with side effects
Andrew Watt [MVP] - 30 Jan 2006 11:43 AM - 8 messages
It may be too late to suggest this for Monad v1 but it strikes me that it could be beneficial to make the default behaviour of Monad cmdlets with side effects  to be the same as cmdlets with the  -confirm ...
Score Changing sTimeFormat
Hugh Janus - 30 Jan 2006 11:24 AM - 6 messages
Hi all, I am deploying 500 servers.  OS in english but the regional settings in Spanish.  I am trying to change the registry key "HKEY_USERS\.DEFAULT\Control Panel\International\sTimeFormat" to "HH:mm:ss" by doing the following in a script before logging on as any ...
Score Too long file names on file server...
Sofia Engvall - 30 Jan 2006 10:28 AM - 2 messages
Hi! :-) Every time I need to move files from one server to another or between partitions on the same I get the same problem... There are paths that are too long. Most of the time the reason is that the user has a mapped drive somewhere ...
Score Tab Completion Errors in Japanese XP
GarWaynne - 30 Jan 2006 12:18 AM - 2 messages
When tab completion displays a file name with full-size Japanese and/or Chinese Han characters, using the escape key usually won't clean out the command line. This looks like a bug. ...
Score [Monad] Version command?
Andrew Watt [MVP] - 29 Jan 2006 9:37 PM - 3 messages
How do I find from within Monad which version of Monad is running? I assume I am missing something obvious. Thanks Andrew Watt MVP ...
Score [MSH] copy-item across providers?
Nick - 29 Jan 2006 9:01 PM - 2 messages
I've written an FTP provider for MSH (actually, surprisingly easy) with FTPS (FTP over SSL) support, caching, and login requests (i.e. you don't have to specify the credential beforehand); I'm actually rather proud of it. I do, however, have a slight problem: I want to be able to upload files from ...
Score [MSH] how can I print image files through "out-printer"?
DontBotherMeWithSpam - 29 Jan 2006 5:31 PM - 4 messages
I was playing around with "out-printer" cmdlet and I was able to print text files without any problems. But when I was trying to print image files by creating a bitmap file object and used that bitmap file as an input object of "out-printer", ...
Score [MSH] Thoughts on Monad, Monad-enabled editors, virtual filesystems and more
Lionel Fourquaux - 29 Jan 2006 2:20 PM - 2 messages
This post is a collection of ideas and suggestions that I'd like to share with the community. MSH intoduce an extensible filesystem-like view for many system resources. Currently, this includes the physical filesystems and the registry, and several extensions exist or were proposed (WMI namespaces, .Net classes). ...
Score Mentally Challenged
Alex Mieles - 29 Jan 2006 8:24 AM - 3 messages
Hi Everyone, Thank you for reading and your assistance in advance. At my wits end, have been trying for the last 3 nights to write a little vb script that examines a CSV file and replaces the "New Registered Users" string with another word if ...
Next »