Group:  English: General ยป microsoft.public.windows.powershell

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Threads Replies Last Post
22 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  
Reading Zip, GZip
I have found the Community Extensions to create zip and gzip files but I can not find anything to read or extract files from an archive. I have a large set of gz files that I need to expand to a new location, does anyone know of any other scripts out there that I may have missed? I did start looking at System.IO.Compression, but could not get anything to work in PS. Many Thanks Rob...
7 13.06.2007 07:29:24
Whatever happened to...
....WMI support for IE7 on Vista? It's there on XP, but on Vista I get an invalid class notification if I try this: gwmi -namespace "root/cimv2/applications/MicrosoftIE" -list Cheers, Rick...
2 13.06.2007 06:01:19
supplying help option and throwing on empty option
Just wanted to poll the collective brain on the best way to go about this . . . I have a script which takes a number of options at run-time (of which defaults are stored in 'param'). One of the options is -help which gives the user a nice help description. However, one of the options should throw an error if left blank. But if the user issues -help and the required option is blank then,...
4 12.06.2007 14:24:06
Equivalent to $0?
How does one capture the name of the script one is in with PS? In ksh this would be $0. But I can't seem to find the equivalent here. -- Charlie. ...
11 12.06.2007 05:51:13
how to get rid of header - directory subtree names
Hi, I have an array with the listings of directories via: $arrary = dir -r | ?{$_.psiscontainer -eq $true} | select fullname but when I try to use it, I get extranous headers, ie. foreach ($rec in $array){ "Doing $rec" } I get: Doing @{FullName=C:\test\PowerShell} Doing @{FullName=C:\test\sql} How do I just get the directory names? Thanks, ...
6 12.06.2007 01:56:09
AddressOf .. whats the Powershell equivalent ?
What would be the Powershell equivalent of this bit of code ? Dim sr As StreamReader Dim myschema As XmlSchema m_Success = True sr = New StreamReader(infilename) myschema = XmlSchema.Read(sr, AddressOf ValidationCallBack) myschema.Compile(AddressOf ValidationCallBack) where ValidationCallBack is , Private Sub ValidationCallBack(ByVal sender As Object, ByVal...
3 12.06.2007 01:06:00
Powershell on Windows 2008 x64
I'm having trouble installing Powershell on the Windows 2008 beta (and I need it installed to install the new Exchange). First off, there is no Powershell download for 2008, and secondly, when I try any of the others (like Windows 2003 x64), I'm getting error messages such as "not enough storage space". Is there a way to install powershell on Windows Server 2008? Thanks, -Matt...
3 11.06.2007 21:52:24
Copy directory structure with permissions intact and shares
Hi, What is the best way to copy a directory structure with permissions intact? Also, can we use the same method with shares? I know I can start with: dir -r | ?{$_.psiscontainer -eq $true} Thanks, ...
2 11.06.2007 17:26:15
Text File Compare
Folks: I have 2 separate text file each containing a bunch of IP addresses. The first text file (TextIP-1.txt) contains 100 IP addresses; list 1 below the other. The second text file (TextIP-2.txt) contains 56 IP addresses; listed 1 below the other. I am look for a script that would allow me to compare the content of these 2 text files & identify those overlapping IP addresses that...
11 11.06.2007 16:46:03
Get-eventlog
I have checked help get-eventlog, and can find no reference to a -computer or -computerName parameter. Question: Is there any way that PowerShell can interrogate the Eventlogs on another machine? Guy ...
5 11.06.2007 15:49:24
interested in a "Powershell Scripting for the System Administrator" book?
I'm just tossing this out there as a project that I'm considering working on. It would be different from some other books I've seen so far in that it would specifically not teach you to program, maybe not even get that detailed in the scripting. The idea is that a working sysadmin doesn't have time to find all of the resources, scrape together examples, and so on. So this book would do tho...
3 11.06.2007 13:55:12
Status of PowerShell v.2.0 ???
What's the status of the next version of PowerShell? Anybody know? What's the target release quarter, Q1'2008? Will a full set of Active Directory cmdlets be built in? Will telnet-like remote shell support be included? What other important changes are planned/rumored? ...
3 10.06.2007 11:04:29
Embedded testing method in scripts?
Is there a standard way to embed a testing method within a script? What I'm looking for is something similar to the idiom you seen in Python at the bottom of .py files to include a component for testing? In Python it is often used for creating an entry point for something that might otherwise be used as a function library, but it can also be used for testing. if __name__ == '__main__': ...
2 09.06.2007 14:34:53
local groups
I have a list of local users and I have text file that matches the local users with new passwords I would like to write a script that match the local user and then reset to the new password the text sample is jdoe,password Please let me know if that correct as well Thanks in advance...
3 08.06.2007 23:10:24
notification
We have many remote users they complain that they not getting notify when the password is about to expire I want to write a script that will notify them three times once 15 days before, then 3 days before and finnaly 1 day befor Please help Thanks in advance...
7 08.06.2007 20:41:04
http://ms.helifan.net/ - For Microsoft employees
I am sorry that this is horribly off topic, but for the life of me I do not know where to ask this question, but I want somebody at Microsoft to address this question. Recently in some google searches regarding Microsoft technology I received results that pointed me to the ms.helifan.net domain. Clicking on those results gives me pages that look identical to Microsoft's web pages. Is this...
2 08.06.2007 19:48:06
rename files (lots of files for newbie)
I have a list of files which has 3 parts name, liked the following: a.system.ini a.appl.ini a.ado.ini b.web.ini c.custom.ini .. .. .. The leading a.* b.* c.* portion are needed to be removed. I've played with this two. First one only append something to the name. 2nd doesn't work. I've got >> after finishing the command. dir |Rename-Item -NewName {$_.Name + "1"} get-ch...
4 08.06.2007 17:36:37
oscdimg and PowerShell - quirks?
Hi people, I've been playing around with converting some old CMD scripts to PowerShell :) I've encountered what I consider to be strange behavior, but I'm sure a programmer-type can probably explain ;) I was trying to work out how to execute an EXE from within a PoSh script, and I found a few references that prefix your command with the &. This appears to work, though I haven't found ...
3 08.06.2007 15:28:42
Using Powershell for administration of Software Restriction Polici
Hi, Just wondering whether anyone has had experience using PoSH to import policy settings into GP for Software Restriction Policies? I would like to be able to import a list of additional rules, but I'm not sure whether or not it's possible in PoSH. Thanks K :)...
1 08.06.2007 13:30:01
path to item returned from get-childitem
I'm having difficulty extracting the path to a file from the output of get-childitem. If I run "test.ps1" by entering .\test where test.ps1 contains: foreach ($childx in $(get-childitem "test" -recurse -filter "*.txt")) { echo("childx=" + $childx) echo ($childx) $child =resolve-path $childx echo ("child=" + $child) } with location set to a directory with a single .txt f...
5 08.06.2007 13:14:36
Scheduled script prematurely exits with [PipelineStoppedException]
Hi, I have a really tough problem with a rather huge script that runs as a scheduled task. Without digging too much into the details: This script (which actually consists of several script files with about 3000 lines of code) represents a job consisting of several tasks. Each task logs its status into a HTML file. So far so good. I tested the script on my developing machine and on ...
9 08.06.2007 09:32:53
powershell + domino server ?
Hi there, do you know how to use domino's dotnet classes with powershell ? i've made it in c#, but i don't know if i can do it in PS bye Nico ...
4 08.06.2007 09:22:07
removing computer accounts from AD
I'm working on a script that involves unbinding machines from Active Directory. I'm Using UnjoinDomainOrWorkgroup from the win32_ComputerSystem class. The machine is successfully removed from the domain but the machine account is still in AD. When I pass a 2 to FUnjoinOptions the account is not disabled. The return value is 0 and I'm specifying domain admin credentials for the passwo...
2 08.06.2007 07:32:45
PowerShell from a BlackBerry!
/n software just released a "PowerShell Remoting" application. Ever wanted to run PowerShell commands from your BlackBerry?! ;-) http://marcoshaw.blogspot.com/2007/06/powershell-from-blackberry.html...
2 07.06.2007 19:01:50
Deleting/Filtering lines of text based on a pattern
I am working on a powershell script that produces a text file that resembles the file that is displayed below. I would like to be able either filter the contents and write them to a new file or delete them in the existing file. Original file results PS C:\scripts> get-content c:\scripts\rawlist.txt 1 Line to Keep 2 Line to Keep Test 987 3 Line to Keep 4 Line to Keep Test 925 5 Li...
3 07.06.2007 18:12:22
22 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net