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  
VsCmdShell still not compatible!!
VsCmdShell is supposed to integrate PowerShell into Visual Studio, but this has been broken since RC2. We're now WAY past RTM... When will this be fixed?! http://www.codeplex.com/VSCmdShell/WorkItem/View.aspx?WorkItemId=5175 Jon ...
2 02.05.2007 18:08:23
Accessing last line executed in a script
It would be very handy to be able to get access to the last line executed in a script. We have $^ and $$ but not $^.*$ :-). I use this for throwing on legacy console app failures: tf get $TrunkDir /r $AllPref /noprompt 2>&1 | out-string -stream -width 1000 | tee $TfGetLogFile >> $LogFile CheckLastExitCode "tf get $TrunkDir /r $AllPref /noprompt 2>&1" @(0,1) 2>&1 >&...
9 02.05.2007 17:05:27
turn off remote computers - part 2
"/\/\o\/\/ [MVP]" wrote: > looks like a pasting problem : > > I Pasted the first line double (before connectiing), so leave that away : > > $os = (Get-WmiObject Win32_OperatingSystem -Com server) > $os.psbase.Scope.Options.EnablePrivileges = $true > $os.reboot() > > greetings /\/\o\/\/ > no, it doesent work. error: Get-WmiObject : The RPC serv...
4 02.05.2007 15:38:01
What views are available for a given object set?
I have got a set of objects and I am going to display them using, say, Format-Table. Format-Table supports [-view <string>] parameter. Question: how do I know what views are available for this object set? (I am interested in any answer but in my case I would prefer to know automated kind of solution). -- Thanks, Roman Kuzmin ...
10 02.05.2007 06:18:37
Powershell Analyzer RC1 Released
Powershell Analyzer RC1 has been released: you can read about it here: http://powershelllive.com/blogs/shelltools/default.aspx or use the following link for a direct download: http://www.powershellanalyzer.com/downloads/PowershellAnalyzerRC1.zip Enjoy, Karl Prosser / Shelltools LLC ...
1 02.05.2007 06:02:42
Using system.drawing.imageconverter (to go from .jpg to .gif)
I can't seem to find an online example I can understand/apply to my needs. Can I use imageconverter to change an image from .jpg to .gif? Marco...
4 01.05.2007 19:14:30
$MyCSVTable export csv
All, I'm currently playing around with web spiders in-order export html <table> to CSV files. However I'm having trouble understanding why I can't take a string containing values (eg v1,v2,v3) and output it as valid csv. example "a1,a2,a3" >> c:\my.CSV "b1,b2,b3" >> c:\my.CSV why can't my spreadsheet can't handle this? cheers...
2 01.05.2007 18:58:09
Syntax of Pipleline question
I am trying to grab a CSV file and unistall all the software listed. $fileName = "c:\testUninstall.csv" Import-csv $fileName |% {gwmi win32_product -filter "IdentifyingNumber='$($_.IdentifyingNumber)' "} the next step is what has me.. For a dry run, I was just trying to take the above and | write-host $_.Name, but apparantly that doesn;t do it. I also tried that inside the % loop, and t...
3 01.05.2007 18:55:29
CDOEXM.IMailboxStore
Hi everybody. I'm filing miserably at instantiating the CDOEXM.IMailBoxStore interface in powershell. I can create an instance of CDOEXM.MailBoxDB: PS H:\ # $MailboxDB = New-Object -comobject CDOEXM.MailboxStoreDB PS H:\ # $mailboxDB | gm TypeName: System.__ComObject#{25150f4a-5734-11d2-a593-00c04f990d8a} Name MemberType Definition ---- ...
1 01.05.2007 18:06:03
patch installation script
So, I'm just starting to get in and play around with this powershell stuff. I put this script together to automate the creation of a qchain batch file for my monthly patches: <begin script> $patch_directory = read-host -prompt "Enter the full directory path to the patches" Get-ChildItem -name $patch_directory | ForEach-Object {Add-Content $patch_directory\patches.bat "$_ /passi...
1 01.05.2007 17:47:30
Can I use the uuid with new-object -comobject
I would like to access a com object but I only have the uuid. Can this be done? -- Douglas Woods...
3 01.05.2007 16:32:19
Issue need your help: How to control combox/dropdownlist in web page?
Hi, Here is an issue need your help, very appricate you if can provide any ideas... [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Web") $webclient = new-object System.Net.WebClient $oIE=new-object -com internetexplorer.application $oIE.visible=$true $oIE.navigate2($passportSignUP) while ($oIE.busy) { sleep -milliseconds 1000 } sleep -milliseconds 3000 $oIE.documen...
2 01.05.2007 15:47:52
Binary prefix
I'd like the PowerShell team to consider using binary prefixes (byte quantifiers) as they are defined by IEC to disambiguate base-2 and base-10 values (1024 vs 1000). For more information please see http://en.wikipedia.org/wiki/Binary_prefix ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggest...
1 01.05.2007 08:48:01
Error handling in scripts question
This is a multi-part message in MIME format. ------=_NextPart_000_00DF_01C78B35.547B4200 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable If I create a script (call it foo.ps1) and put the following in it: function TrapHandler($err) { "Type of '$err' is $($err.GetType().Fullname)" "Error: $($Error[0].ErrorRecord)" "Err: $($err...
3 01.05.2007 05:31:29
use a variable for -whatif argument
I have this function which cleans a directory and by default runs the WhatIf scenario. The only differerence between the two calls to is the passing of the -WhatIf argument. I would like to put the -WhatIf argument in string variable something like this: $wi = "-WhatIf" .... { remove-item $_.fullname -Force -Recurse $wi } It doesn't work. Is there a way to do this? Here is the functio...
2 30.04.2007 21:11:15
System.DirectoryServices.DirectoryEntry & the accountExpires property
This is a multi-part message in MIME format. ------=_NextPart_000_0029_01C7874C.6B1EE6C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm trying to set an account expiration date for an AD user and cannot = deduce how to get at the accountexpires property to set it. The property can be retrieved like so (thank you everyone who has = tack...
9 30.04.2007 14:29:33
Balloon Tip
How can I be notified on a computer (one local and one remote) when I file has changed?...
9 30.04.2007 13:36:00
How do I escape the wildcard character in a path string?
I'm trying to add some shell extensions for all files, so I need to add keys and values to this registry path: HKLM:\Software\Classes\*\Shell But the standard cmdlets (Test-Path, New-Item, Set-Item) are interpreting that path as having a wildcard. How do I get them to treat the asterisk as a regular character?...
2 30.04.2007 13:11:25
PS launched from VisualBuild gets stuck: Pipeline not executed...
I'm using a tool 'Visual Build (6.3)' to launch various processes (e.g. msdev etc.)making up an automated build process. When I launch PowerShell as a system command PS gets stuck displaying the PS> prompt. Typing any command in the PS shell result in the message: "Pipeline not executed because a pipeline is already executing. Pipelines cannot be executed concurrently." The command-lin...
2 30.04.2007 11:24:01
Bitwise limitation
Are bitwise operators limited to System.Int32 by design, or does the user's Processor limit them? [math]::Pow(2,31) -band 1 Cannot convert value "2147483648" to type "System.Int32". Error: "Value was either too large or too small for an Int32." At line:1 char:24 + [math]::Pow(2,31) -band <<<< 1 [math]::Pow(2,31) -bor 1 Cannot convert value "2147483648" to type "Syste...
7 29.04.2007 19:06:01
Searching for deleted AD objects in PowerShell
I have a PowerShell script that searches the AD for deleted objects. I have conected to the root of the domain and use a directory searcher object to return the deleted objects. I would really like to bind to the deleted objects container so that the scope of the search is reduced. I know that the LDAP string needed is of the form "LDAP://<WKGUID=18e2ea80684f11d2b9aa00c04f79f805,...
2 29.04.2007 13:06:02
PowerShell Wiki
I've been thinking about how many different sites I visit everytime I'm trying figure out how to do something in PowerShell. It would be nice if there were one site that would group that information together in a logical way and then send you in the right direction. I have just started to put together the shell of a Wiki where we could share what we have learned and found useful on the m...
4 28.04.2007 17:23:57
Launch Process & return to prompt immediately
Does powershell have an execution modifier that tells the shell not to wait for the called process to exit before returning to the prompt such as the '&' modifier in bash? Happy Friday! ~Clint ...
4 28.04.2007 17:13:30
need help
$path_wap = "D:\test\25" $path_pc1 = "D:\test\26" $path_pc2 = "D:\test\27" $path_pc3 = "D:\test\28" $t_wap = Test-Path $path_wap $t_pc1 = Test-Path $path_pc1 $t_pc2 = Test-Path $path_pc2 $t_pc3 = Test-Path $path_pc3 $t_wap $t_pc1 $t_pc2 $t_pc3 if ($t_wap, $t_pc1, $t_pc2, $t_pc3 –eq "True") {write-host "ok 4 folders here"} else {write-host "one or more missing"} ok, ...
5 28.04.2007 09:14:01
Strange Bug starting Windows Form from PowerShell
I have this strange bug starting a form, after using export-CliXml or Export-Csv to export the object the form does not show up anymore. # Works $form = new-Object System.Windows.Forms.Form $form.ShowDialog() # Does Not Work $form = new-Object System.Windows.Forms.Form $form | Export-Clixml FormStart.xml $form.ShowDialog() Same with Export-Csv if i try to export the form before...
3 27.04.2007 21:20:31
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