Home All Groups Group Topic Archive Search About



Scripting for Windows Server

microsoft.public.windows.server.scripting
Score Add username and password to connect
Avi G - 19 May 2006 8:39 PM - 4 messages
Hi, i've this script that reboot atl-dc-01 that this is my local machine strComputer = "atl-dc-01" Set objWMIService = GetObject("winmgmts:" _     & "{impersonationLevel=impersonate,(Shutdown)}!\\" & _         strComputer & "\root\cimv2") ...
Score [PSH] Ascii question
ebgreen - 19 May 2006 7:50 PM - 4 messages
I realize this is really a .Net framework question, but I don't know the framework and haven't had any luck figuring this out so far. All I really need is the PSH equivalent of this: strCharA = Chr(65) ...
Score Error 800A01CE - HELP!!!!
MJG - 19 May 2006 6:07 PM - 2 messages
I receive the error above when running a vbs script.  It stops while executing the line listed below.  This only occurs when the windows XP SP2 firewall is on.  I have enabled remote administration via group policy with ...
Score Includes in .ps1 scripts
paulthegeez - 19 May 2006 10:54 AM - 5 messages
Is it possible to include a script within a script in windows powershell? I want to be able to define a number of functions in script1.ps1 and import/use it in script2.ps1. Thanks. ...
Score microsoft.public.windows.powershell newsgroup is up!!!
William Stacey [MVP] - 19 May 2006 2:19 AM - 3 messages
Check it out.  Guess all PS stuff can not be posted over there.  Cheers. ...
Score [PS] Getting a default registry value into a string cleanly
Alex K. Angelopoulos [MVP] - 18 May 2006 11:25 PM - 5 messages
I get the default value of a registry key like this: PS> $clsid = Get-ItemProperty -Path hklm:\SOFTWARE\Classes\Word.Document\CLSID -Name:"" Unfortunately, it is VERY difficult to get to the actual underlying string value. If I just echo $clsid, I definitely get the value in the output: ...
Score Extension file name
ppsy - 18 May 2006 6:32 PM - 4 messages
Would anyone tell me the extension file name of Powershell script thanx ...
Score [PS] Ignoring host formatting
Dave - 18 May 2006 6:26 PM - 7 messages
If I want to get all the information from a command in a nice format regardless of the number of columns available, how can I do it? For example if I do: [PS] gps | ft * All the information columns get trucated into extremely small columns. So if ...
Score list all groups and members of those groups
Villain - 18 May 2006 6:13 PM - 5 messages
Does anyone know of a script that will display a list of all groups on a domain as well as the members of those groups? I can deal with it showing global, local, distribution, etc. groups. However, I need to find a way to export the entire tree, showing ...
Score [PS] Escaping from line continuation?
Pete Gomersall - 18 May 2006 5:32 PM - 6 messages
This may seem a dumb question but how do you escape from the use of line continuation? e.g. In the Powershell documentation on page 64 there is this example of use of the line continuation character: PS> set-location ` ...
Score connect to wmi across Static NAT
Sergio - 18 May 2006 5:16 PM - 3 messages
Dear all, this is my scenario I need to manage some server in the remote offices. I have a pix-firewall and also the remote networks have it. A remote server ( well i call it MYSERVER from now) is reachable with the ...
Score [PS] Bug? Move-Item on folder to non-existing folder is equivalent to rename
Alex K. Angelopoulos [MVP] - 18 May 2006 4:20 PM - 8 messages
I have a folder New.Directory in C:\temp. If I do this:     Move-Item C:\temp\New.Directory c:\ it is then moved to C:\New.Directory with all items it contains. If I then do this: ...
Score [PS] New-Item: Should -Name support multiple values?
Alex K. Angelopoulos [MVP] - 18 May 2006 4:13 PM - 5 messages
Looking at New-Item, it occurs to me a useful behavior would be changing -Name <String> to -Name <String[]>. It would be nice if it supported semi-globbing or sequences, but that's probably over-integration. ...
Score Login Script to Garther Information
Andrew - 18 May 2006 4:01 PM - 2 messages
I'd like to create a login script that will gather some information about the computer being used.  I'm learning to script so any pointers would be helpful or sites I can do some reading at would be great! ...
Score [PS] Bug? Misleading error message for Rename-Item when specifying a path
Alex K. Angelopoulos [MVP] - 18 May 2006 3:52 PM - 3 messages
Note the following actions and error message: PS> Rename-Item -Path C:\temp\New.Directory\file1 fileOne PS> Rename-Item -Path C:\temp\New.Directory\fileOne c:\temp\fileOne Rename-Item : Cannot rename because the target specified is not a path. ...
Score [PSH] get-credential automation
ebgreen - 18 May 2006 3:45 PM - 3 messages
I often have the need to run automated scripts that will use a local admin name and password on a remote machine to get WMI info. I can not find a way to avoid the password prompt that comes from using get-credential or using ...
Score [p] Bug? New-Item should support more generic -ItemType values
Alex K. Angelopoulos [MVP] - 18 May 2006 2:52 PM - 5 messages
In using New-Item with the filesystem provider, I've noticed that it's pretty picking about the -ItemType being explicitly either file or directory.This obviously needs to be a named value, but I think it should probably support the following as well, some of them VERY generic: ...
Score [PS] Bug? New-Item's -ItemType parameter should have a -Type alias
Alex K. Angelopoulos [MVP] - 18 May 2006 2:44 PM - 3 messages
We can create a new file or directory with New-Item using the -ItemType parameter:     PS> New-Item c:\temp\users -ItemType directory     PS> New-Item c:\temp\users.txt -ItemType File ...
Score Problem with several of my servers
Tcs - 18 May 2006 1:25 PM - 6 messages
I have a script to monitor disk space on our servers.  To complicate matters, we currently have two domains.  Some of our servers are on the old, some on the new.  All the servers on the new domain, I ...
Score [PS] psdrive inconsistency
dreeschkind - 18 May 2006 12:49 PM - 5 messages
I can do PoSh 1 E:\>C:testfile.txt or PoSh 2 E:\>C:\testfile.txt but I can not do PoSh 3 E:\>env:path 'env:path' is not recognized as a cmdlet, function, operable program, or ...
Score [PS] Unexpected (to me) behaviour of "No to all"
Andrew Watt [MVP] - 18 May 2006 8:59 AM - 2 messages
I was trying out a pipeline that would allow me to remove all folders that include "test" in the folder name. For obvious reasons of safety I used the -confirm parameter with the command. get-childitem -Path C:\* -include test* -recurse | ...
Score [PSH] Formatting output of GroupInfo objects
Keith Hill [MVP] - 18 May 2006 7:40 AM - 6 messages
Anybody know how to simplify this: set-location hklm:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Get-ItemProperty * | where { $_.DisplayName.length -gt 0 } | select Publisher, DisplayName | group Publisher | sort count -desc | % {$_.Group} | format-Table DisplayName -groupby Publisher It seems a waste to have to blow apart the GroupInfo after creating it (which I need to do to sort by publisher count) in order to use ft -groupby Publisher to get the output the way I want.   ...
Score [PSH] Get-Member oddity
Keith Hill [MVP] - 18 May 2006 6:06 AM - 3 messages
I just tried this: 9 # gps | select name,id | gm    TypeName: System.Management.Automation.PSCustomObject Name        MemberType   Definition ----        ----------   ---------- Equals      Method       System.Boolean Equals(Object obj) ...
Score Group Memeberships
Adam Collins - 17 May 2006 10:56 PM - 2 messages
Hi. I've been asked to create a login script that automatically assigns printers through domain membership.  I need to be able to populate the group memberships of the computer that the person logs onto. Would anyone have an idea on how to do this. ...
Score [PS] foreach keyword alias
Mark Ayers - 17 May 2006 10:49 PM - 4 messages
foreach is refered to as a keyword in some places while it is an alias to ForEach-Object. Does it matter? ...
Score [PS] User Guide p.79
Andrew Watt [MVP] - 17 May 2006 9:06 PM - 2 messages
The description of the meaning of the ? metacharacter on p.79 is incorrect. It matches 0 or 1 occurences of the preceding character or pattern, not as stated. Also the + metacharacter has been, I assume inadvertently, omitted from the table. ...
Score Transport failed to connect to the server
Brian - 17 May 2006 7:43 PM - 2 messages
I wrote a script that sends an email message.  It works fine on Windows 2003 servers, but it won't run on our lone Windows 2000 server.  Here's the script, it generates a "Transport failed to connect to the server" ...
Score [PS] How much memory should PowerShell.exe use?
Andrew Watt [MVP] - 17 May 2006 6:04 PM - 4 messages
As a follow up to my post about "extra" PowerShell.exe processes running in Task Manager I've been keeping an eye on that and another little quirk came to the surface. I am seeing memory usage from ~1MB to ~44MB for a PowerShell.exe ...
Score [PS] Can I get 24 hour clock times on PowerShell?
Andrew Watt [MVP] - 17 May 2006 5:08 PM - 5 messages
When I use start-transcript in a profile I expect to get 24 hour times in the file names (it's ~18:00 now in the UK), since I have my Regional Settings set to display in that way. Am I right in thinking that US English PowerShell won't allow display ...
Score [PS] Get-ChildItem and Get-ChildItem -Name have different ordering - Bug this?
Alex K. Angelopoulos [MVP] - 17 May 2006 4:50 PM - 15 messages
The command     Get-ChildItem and     Get-ChildItem -Name appear to use different ordering for output. Although we shouldn't make assumptions about enumeration order anyway, this looks like it could be confusing to entry-level users. Should I bug it? ...
Score [PS] PowerShell doesn't seem to clean up after itself.
Andrew Watt [MVP] - 17 May 2006 4:26 PM - 5 messages
Has anyone else noticed that if you have multiple PowerShell windows open, then close them (all) that there are still PowerShell.exe processes running in Task Manager? I think my record is 14 running when I didn't have a single PowerShell ...
Score [PS] Should PSConfiguration be in "My Documents"?
Andrew Watt [MVP] - 17 May 2006 4:21 PM - 8 messages
I just want to sound out the opinion of others on the fact that the PSConfiguration folder is in "My Documents". That seems an odd place to put configuration information. In fact, isn't it at odds with Microsoft's (implicit?) intention to keep ...
Score [PS] Design reason for Get-ChildItem distinct from Get-Item?
Alex K. Angelopoulos [MVP] - 17 May 2006 4:04 PM - 2 messages
What's the reason that Get-ChildItem was made a distinct command, again? I was recently comparing Get-Item and Get-ChildItem and it isn't immediately apparent why we _need_ two distinct commands. It looks like Get-Item could ...
Score How to display top 5 lines of a text file...
D.R. - 17 May 2006 3:37 PM - 12 messages
Hi All, I have the following; set bcp-line=1 for /f "tokens=*" %%a in (a.txt) do (   echo %%a   set /a bcp-line=%bcp-line% + 1   if %bcp-line%==5 goto :done ) But this doesn't work because the component "if %bcp-line%==5" is evaluated ...
Score [PS] (Bug?) Drive commands access floppy if A: removed with Remove-PSDrive
Alex K. Angelopoulos [MVP] - 17 May 2006 2:56 PM - 2 messages
If you run Get-PSDrive, there is no attempt to directly access drives that I can see. However, if I do this:     PS> Remove-PSDrive A     PS> Get-PSDrive Each time I invoke Get-PSDrive, Windows tries to access A:. ...
Score Powershell
zamdrist - 17 May 2006 1:51 PM - 7 messages
I've just started looking into Powershell. Looks pretty cool, and really powerful. I was struck though by, what I thought was, the obvious intent to woo *nix die-hards. While it all seems very useful, most everything, if not ...
Score [PS] InvocationInfo - PipelineLength and PipelinePosition
Andrew Watt [MVP] - 17 May 2006 1:43 PM - 2 messages
Deliberately create an error by using this command ($fred is undefined) get-process * | stop-process $fred Then look at the content of $Error[0] $Error[0].InvocationInfo PS C:\Documents and Settings\Andrew Watt> $Error[0].InvocationInfo MyCommand        : Stop-Process ...
Score strange bug
klumsy - 17 May 2006 9:19 AM - 7 messages
$(dir hklm: -r) works fine.. but try $a = $(dir hklm: -r) and watch the multitude of errors.. Karl ...
Score [PS] start-transcript in a profile - a logging tool? Seems useful but ...
Andrew Watt [MVP] - 17 May 2006 8:32 AM - 8 messages
I was exploring how start-transcript can be used in a profile. If you have, as the last (perhaps) command in a profile, start-transcript then you can automatically log all you do in a PowerShell session. So, when you want to go back to some "brilliant" one-liner that you ...
Score uninstall MSI using msiexec
Fabrussio - 17 May 2006 7:38 AM - 2 messages
I have installed a product (Java RTE) using: msiexec /i "\\server\msi\java" but now I want to uninstall it using: msiexec /x "\\server\msi\java" I get the error 'You already have this version installed please uninstall using add\remove programs" ...
Score [PS] Is colorization possible/feasible with extensible format system?
Alex B Chalmers - 17 May 2006 5:28 AM - 3 messages
I have been looking at various ways to colorize various outputs.  My two favorite use cases here are the output of get-childitem and the various error output.  I started using /\/\o\/\/'s ls replacement ([link]), and ...
Score [PSH] How do you pass ranges (1..10) as a parameter?
Keith Hill [MVP] - 17 May 2006 5:09 AM - 4 messages
I have a function to allow me to dump history to a file which is handy when you are done playing at the prompt and want to create a script file from your messing around.  Here it is: param([string]$indices, [string]$path) ...
Score [PS] Get-Command -commandType filter
Mark Ayers - 17 May 2006 1:56 AM - 7 messages
Get-Command -commandType filter returns the functions. I don't find that remarkable since they are a type of function still, the documentation for get-command describes a filter commandtype and a commandtype switch. ...
Score writing to a log-file with multiple users at the same time
Peter - 16 May 2006 10:53 PM - 2 messages
Hey all, I'm really new to scripting and i'm stuck with this script i have written. I would like to use this as a logon script but the problem is that when 2 users logon at the same time, there will be only one entry for 1 user and not 2 ...
Score vbscript vs. jscript
AdminL - 16 May 2006 10:05 PM - 3 messages
What are the pros and cons of vbscript vs. jscript when using them in an html environment: web page, IIS, SharePoint. ...
Score [PS] Different display of object's type
Andrew Watt [MVP] - 16 May 2006 9:13 PM - 4 messages
If I type get-help get-command | get-member the object type is displayed as MamlCommandHelpInfo If I type (get-help get-command).GetType() PSCustomObject is displayed. Yet, if I type (get-help get-command).GetMember() I get an error message that indicates that it is a MamlCommandHelpInfo ...
Score Open Internet Explorer to a specific URL
sams9 - 16 May 2006 8:35 PM - 3 messages
I am totally new to scripting and was wondering if there is a way to write a script to open a certain website or url in internet explorer without changing the home page on a windows XP client machine? Any help would be appreciated. ...
Score Error checking in my script
SA - 16 May 2006 7:01 PM - 2 messages
Hi all, I have a simple script that deletes and adds printers: ' RemovePrinterConnection.vbs - Windows logon script Option Explicit Dim objNetwork, strUNCPrinter strUNCPrinter = "\\server1\printer1" Set objNetwork = CreateObject("WScript.Network") ' Section which removes the network printer objNetwork.RemovePrinterConnection strUNCPrinter ' Printers.vbs - Windows Logon Script. ...
Score [psh] Updated PowerShell Scripts
Thomas Lee - 16 May 2006 6:44 PM - 7 messages
I've gone through the scripts up on my PowerShell subsite ([link]) converting them and testing them to RC1.1. There were a couple of gotchas - some cmdlets changed names (new-drive becomes new-pshdrive, etc) but mainly things worked pretty well and the ...
Score [PSH] How do I trap an exe that does not exist?
Thomas Lee - 16 May 2006 6:42 PM - 5 messages
Hi, I'm working on a script and want to do some error checking. I'd like to do something like this: $e=myexe.exe -silentlycontinue if (!$e) {do some error handling} I can't quite get my head around how to do this (particularly since ...
Score [PS] Poor performance
Grzegorz Niemirowski - 16 May 2006 5:49 PM - 14 messages
I wanted to count number of semicolons in a text file. This file is quite large (498 238 bytes) but I expected PowerShell to parse in a few seconds. Instead of seconds I got minutes. I don't know whether .NET overhead is the ...
Score [PS] Commands Pasted into the Shell
Mark Ayers - 16 May 2006 4:56 PM - 9 messages
When I paste these commands into the shell, as a whole, I expect to see feed1 then feed2. Instead the second feed fails with the error below. It seems some of the last pasted line was lost somewhere. "$f2.Items | ...
Score [PS] User Guide p.35
Andrew Watt [MVP] - 16 May 2006 4:47 PM - 3 messages
The command rm -rf / on page 35 doesn't run. I guess it was intended to mean something like remove-item \ -recurse -force but the syntax was wrong, if that is what was intended. Andrew Watt MVP ...
Score List or count users that are members of two AD groups
Jan H - 16 May 2006 4:22 PM - 2 messages
I'm new to scripting and need a script for that allows me to list users or count users that are members of ALL specified AD groups. Need to be able to specifiy the name of at least two groups. ...
Score [PS] get-command -type and -commandType
Andrew Watt [MVP] - 16 May 2006 4:21 PM - 3 messages
As far as I can see the -Type and -CommandType parameters of get-command are one and the same. I can find no documentation on -Type. As far as I can see it's not mentioned in the Help file for ...
Score [PS] format documentation
Mark Ayers - 16 May 2006 4:04 PM - 3 messages
Has anyone a pointer to documentation on formatting. Update-FormatData discusses how to add additional ps1xml files into the mix but I'm not finding anything on how to build my own ps1xml. There are a few examples of snippets ...
Score Terminate process script fails to terminate processes run by Syste
Andy - 16 May 2006 3:46 PM - 3 messages
The following script fails to kill a process that is being run as the System account.  Is there a reason why this script cannot kill processes run as the System Account? strComputer = "." Set objWMIService = GetObject("winmgmts:" _     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") ...
Score Exchange e-mail address attributes?
Sofia Engvall - 16 May 2006 3:06 PM - 5 messages
Hi! :-) I'm writing a script to find all a users e-mail addresses (to get rid of old sub domains) but I'm not sure I'm looking in all the available attributes... A list of these would be perfect! ...
Score how to wait for an external program to finish in PowerShell
Matthew - 16 May 2006 3:03 PM - 3 messages
I am working on a simple script to run ntbackup, zip the resulting file, and copy it to my off computer storage. A code fragment is below:    C:\WINDOWS\system32\ntbackup.exe backup <various bunch of parameters here> ...
Score [PS] Using & to run a command with an argument in a foreach loop
Matt - 16 May 2006 2:52 PM - 5 messages
I'm trying to run a command passing an argument which is contained in a variable: 'nslookup server1' is not recognized as a cmdlet, function, operable program, or script file. At line:1 char:2 + &$ <<<< ("nslookup server1") ...
Score How to save a CMD DOS box session to a text file?
D.R. - 16 May 2006 2:33 PM - 9 messages
Hi All, Does anyone know how to save the contents of a CMD DOS box to a text file? I know I can do it manually with "Select All, Copy, New text file, paste", etc... but I want to do it programmatically/automatically?  I have a long ...
Score [PS] ShellIDs
Andrew Watt [MVP] - 16 May 2006 1:13 PM - 4 messages
Can someone either point me to further information about ShellIDs or explain a bit more than the current documentation why PowerShell has been designed so that it can behave differently for different Shell IDs? I'm not asking how I can find the ShellID, I know about $ShellID and ...
Score Consistency check cmdlet ?
Varun Bansal - 16 May 2006 6:37 AM - 3 messages
Hi, Is there any exchange 2007 cmdlet which does the consistency check on database? Will eseutil.exe functionalities (like defragmentation, consistency check etc) OR esebcli2.dll functionalities (like backup database etc) be provided via cmdlets too ? Thanks, Varun ...
Score How to find SQL Server edition "Standard or Enterprise"
Samiuddin - 16 May 2006 4:44 AM - 2 messages
I looking a script to run remotely and find out the SQL server edition... Is it Standard or Enterprise version. I can find out the viersion number and service pack lavel but I would like to search for Edition information. ...
Score ADODB.Connection question
Alexis Mieles - 15 May 2006 10:50 PM - 2 messages
Attempting to query an AS400 DB2 DB via visual basic, does anyone know if  this connection object can be used to do this? I can't seem to find the syntax anywhere for a DB2 table query so I can then output into my script. ...
Score Hex Codes
Bytelink - 15 May 2006 9:40 PM - 3 messages
I am very new to scripting and am having trouble locating a good reference that provides me with the hex code for the system folders etc. For example the desktop is 10 and system32 is 25 hex is there list or reference book I ...
Score [PS] Getting Started document - Registry section
Andrew Watt [MVP] - 15 May 2006 9:21 PM - 5 messages
The text and results shown in the first example in the Registry section do not correspond with each other. Also, the second example's explanation could be significantly improved. Andrew Watt MVP ...
Score [PS] Getting Started document - inconsistent terminology
Andrew Watt [MVP] - 15 May 2006 8:56 PM - 4 messages
The Getting Started document refers to both "pipelines" and "pipes". I suggest use of terms be consistent. I prefer "pipelines". Reference is made in the document to "common parameters". The built-in help files use the term "ubiquitous parameters". Again, consistency in ...
Score [PS] Difference between "get-command" and "get-command *"
Andrew Watt [MVP] - 15 May 2006 8:51 PM - 4 messages
If I use the command get-command only cmdlets are returned. If I use the command get-command * I get commands of several command types. Why? Thanks Andrew Watt MVP ...
Score How to pass arguments to external program
OK - 15 May 2006 8:39 PM - 6 messages
I was trying to run a program and pass arguments to it. Some arguments are quoted strings. ../echo.exe 1 "`"2 3`" " 1 2 3 ../echo.exe 1 " `"2 3`" " 1 2 3 Below is the text of my external program ...
Score [PS] foreach Help - VBScript style example?
Andrew Watt [MVP] - 15 May 2006 8:06 PM - 2 messages
In light of the recent complaints about VBScript style in the Script Center examples I wonder if the same issue applies to this example in the foreach Help file:         foreach ($file in Get-ChildItem) ...
Score [PS] new-alias and set-alias - why do we have both?
Andrew Watt [MVP] - 15 May 2006 7:56 PM - 5 messages
I suspect this has been asked before but why do we have both set-alias and new-alias cmdlets? Set-alias can create a new alias as well as changing the semantics of an existing one. So what function does new-alias serve? ...
Score [PS] HOME
Mark Ayers - 15 May 2006 7:32 PM - 6 messages
Why should HOME be readonly? I can conceive lots of reasons to change it. Set it in a profile. Temporarily change it in a script. I realize I can set-variable with a -force. But why should I need to do so. ...
Score [PS] Doc bug - about_filter.help.txt
Andrew Watt [MVP] - 15 May 2006 6:49 PM - 2 messages
In the latter part of the about_filter.help.txt file there is a reference to using help about_filter. The self reference seems unnecessary to me. I think it ought to be removed. Andrew Watt MVP ...
Score [PS] Positionality of wildcards? Bug?
Andrew Watt [MVP] - 15 May 2006 6:41 PM - 7 messages
In PowerShell wildcards seem to be implicitly positional. Try this PS C:\Documents and Settings\Andrew Watt> "pam", "amateur", "sam" | where-object  {$_.ToString() -match "[a-m].*"} pam amateur sam PS C:\Documents and Settings\Andrew Watt> "pam", "amateur", "sam" | ...
Score [PS] Consistency among "out-*" cmdlets
forestial - 15 May 2006 6:10 PM - 4 messages
We have 6 different cmdlets for output: Out-Null Out-Default Out-Host Out-File Out-Printer Out-String which differ in where they send their output.  Why do we need all of these?  What does this design do for us that redirection using ">" could not? ...
Score [PS] Select-string "The file cannot not (sic) be read." error message
Andrew Watt [MVP] - 15 May 2006 5:38 PM - 3 messages
I was creating a file counter and line counter and used the select-string cmdlet to match selected regular expressions. With some files (not sure why yet) I get a "Select-string: file cannot not be read" error message. Note the double negative in the error message. ...
Score Learning to Script
Andrew - 15 May 2006 2:47 PM - 2 messages
Hi, I'd like to get into scripting, in particular VB.  I used to program in Turbo Pascal and C with some C++ background.  However it's been 10-15 years since I did any coding. I'm wanting to use it within our domain for a variety of tasks, some ...
Score [PS] Misleading error message for get-childitem -Path parameter
Andrew Watt [MVP] - 15 May 2006 1:13 PM - 2 messages
Try get-childitem -Path c:\ and it works nicely. Add an Include parameter, get-childitem -Path C:\ -Include *.txt and you get an error: PS C:\PowerShellScripts> get-childitem -Path C:\ -Include *.txt Get-ChildItem : Cannot process argument because the value of argument ...
Score Log File
Ade - 15 May 2006 10:34 AM - 3 messages
Everynight a batch file downloads the latest anti virus definitions from an ftp site. The results are recorded in a text file.  When the download is complete, I would like the text file emailed, so that I can see if there has ...
Score [PS]what about "-comp" operator's meaning?
applepwc - 15 May 2006 1:57 AM - 3 messages
get-help  about_where We can find the "-comp" operator. But I can't find any usage about this operator. Is there anyone konw it? Thanks! ...
Score want really awesome powershell examples
klumsy - 15 May 2006 1:10 AM - 3 messages
I'm planning on doing a webcast of powershell and powershell analyzer. It will have a little introduction for people who might not know what either is, but will go to some very advanced examples as well. I would love if people could share some of their most interesting one liners, ...
Score [PoSh] -replace operator
dreeschkind - 14 May 2006 9:36 PM - 7 messages
I generally like the new special operators, but the -replace operator had tricked me now. I wanted to replace every dot '.' in a string with something else... and it did not work as expected :( PoSh 1 PS:\>$foo = 'foo.bar' ...
Score [PS] Bug? Get-PSDrive has a Provider column, not PSProvider
Alex K. Angelopoulos [MVP] - 14 May 2006 8:41 PM - 3 messages
Note that when enumerating drives using Get-Drive, the PSProvider column has a header "Provider" (Get-Member reports the property name as Provider as well, naturally). Should this change to PSProvider? Name       Provider      Root                                CurrentLocatio ...
Score close childwindow
Gottfried Ehmann - 14 May 2006 12:21 PM - 2 messages
The process is AcroRd32 which I can stop with stop-process I don't want to stop the whole Acrobat Reader but just a specific window where I know the window name from It is "Acrobat Reader - [my.pdf]" Any help? ...
Score [PS] PSDrive name length limit?
Alex K. Angelopoulos [MVP] - 14 May 2006 1:43 AM - 9 messages
Is there a maximum possible length for the name of a PSDrive when creating a drive from script? I did some experimenting and noticed that we don't hit a hard PS-based limit when using New-Drive interactively - I slammed into a ...
Score cans' move a computer account to a new OU within same domain
Daniel - 14 May 2006 12:28 AM - 2 messages
I don't understand why this does not work, I took this straight from the technet script repository and amended it to my domain. I am signed on as the domain admin when I run this script. Why does it not work? ...
Next »