header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Search
Search Area
Criteria Options
Search Topics From
Search By User
Search in Forum(s)
Included Forums: ALL
Topic
RE: Querying a CSV file
Wow simple and fast. I'd not thought of using 'where' like thatThank you very muchPaul
by PaulB in General PowerShell on 03 Mar 2010 10:38 AM
RE: Querying a CSV file
I did consider whether I should use dotNet and datasets but was looking for other peoples opinion on the best way to do this task
by PaulB in General PowerShell on 02 Mar 2010 11:15 PM
Querying a CSV file
Evening,I'm looking for some advice on the best / most efficient way of querying information in a CSV file. The file has around 30,000 rows and 7 columns, each row is already unique based on the first column value. I can use Import-CSV to bring the ...
by PaulB in General PowerShell on 02 Mar 2010 01:05 PM
Reading a web page which uses form-based security
Evening all,I'm trying to pull reports our of our Ironport server but struggling for a couple of reasons. The Ironport device accepts a URL like https://192.168.10.1/monitor/reports?TLS_Connections and returns a page representing a table of domains ...
by PaulB in Working with .NET on 15 Feb 2010 02:10 PM
RE: Reading locked file like Notepad can
Okay working with a guy in the office this looks to work:$LogIO = New-Object system.IO.filestream  filepath, ([io.filemode]::Open), ([io.fileaccess]::Read), ([io.fileshare]::ReadWrite)$LogReader = New-Object System.IO.StreamR ...
by PaulB in General PowerShell on 23 Sep 2009 10:26 AM
RE: Reading locked file like Notepad can
For a small file then the following will work: $variable = [string]::Join("`n", (Get-Content -Path $NBULogPath)) Tested this by opening a text file in a collection with Word then iterating over this and other files. Get-Content does no ...
by PaulB in General PowerShell on 23 Sep 2009 06:06 AM
Reading locked file like Notepad can
Afternoon, Is it possible to use Powershell / .Net to access a file that is locked? I have some log files that I need to parse in order to find out how far through a process they are. From the GUI I can open the file in Notepad. How can I achieve th ...
by PaulB in General PowerShell on 22 Sep 2009 08:11 AM
Regular Expression not matching
I've been learning the power of regular expressions and have grabbed a copy of Regex Buddy. But I'm having a problem with a carriage return sequence.My Pattern is:$regexec_sdcli = [regex] "Storage System:\t{1,}(\S+)\r\n\tStorage System Path: ...
by PaulB in General PowerShell on 02 Sep 2009 05:52 AM
RE: Powershell -match & Regular Expressions
Kirk it's much more likely to be me.I've now re-written the code as follows:$test = "Target: 0 LUN: 0 Size: 179225 DiskID: 1 Volume Name: \\?\Volume{4900ad67-6fad-11de-83d5-0014c23d0f3e}\ " $pattern = [regex] "Size:\s+(\d+)" $lunsize = $patt ...
by PaulB in General PowerShell on 16 Jul 2009 08:50 AM
RE: Powershell -match & Regular Expressions
Funnily enough that book arrived yesterday and already it is proving very useful. It'll probably end up as well thumbed as O'Reilly's " Windows 2000 Commands Pocket Reference" by AELeen Frisch.One final issue I'm having is assigning $matches to a va ...
by PaulB in General PowerShell on 16 Jul 2009 06:03 AM
RE: Powershell -match & Regular Expressions
Thank you tojo2000 that was perfect.What method did you find best for picking up the complexities of regular expressions when you first started working with them? Do you use a "helper"? I've doenloaded "The Regex Coach" which seems ok but doesn't su ...
by PaulB in General PowerShell on 15 Jul 2009 09:27 AM
Powershell -match & Regular Expressions
After a previous thread I've been looking at regular expressions. I know this isn't specific to Powershell but I'm hoping some guru can walk me through.Part of the output I am trying to capture is like:$test = "Target:    0    LUN:    0    Size:     ...
by PaulB in General PowerShell on 15 Jul 2009 07:43 AM
RE: Running Executable from Powershell
Lots of views to this post but no comments ;o)Anyone got any views or suggestions? If not I'm probably going to go back to using invoke-command and then do a string comparison on the output to check for errorsPaul
by PaulB in General PowerShell on 13 Jul 2009 07:55 AM
RE: Get-QADUser
Thanks Kirk I always thought they were but Shay's post made me question this assumption
by PaulB in Active Directory on 09 Jul 2009 02:13 PM
RE: Get-QADUser
Does the use of -IncludedProperties infer the use of -DontUseDefaultIncludedProperties as well?
by PaulB in Active Directory on 09 Jul 2009 10:04 AM
Running Executable from Powershell
I trying to run an executable from within a Powershell session then checking what happened.I started with:$sdcli = "sdcli.exe disk connect"invoke-expression $sdcliAll works fine but if the child executable returns an error how do I get hold of the e ...
by PaulB in General PowerShell on 09 Jul 2009 09:00 AM
RE: Build Array in Pipeline
Glenn,That sure looks like a neat approach. I know nothing about Regular expressions apart from the fact they exist. I just wonder which method is preffered in general especially if other people need to reference the code?Paul
by PaulB in General PowerShell on 09 Jul 2009 08:05 AM
RE: Build Array in Pipeline
Thank you Marco and Shay. @Marco you answer was short and perfectly simple@Shay I had no idea you could do this with foreeach-object having a begin, during and endIn actual fact the script got more complicated so I ended up chucking it into a functi ...
by PaulB in General PowerShell on 08 Jul 2009 10:53 AM
Build Array in Pipeline
I have a one-liner to grab the PortWWN of a HBA using Microsoft's FCInfo utility.By default FCInfo returns:PS C:\> fcinfo There are 2 adapters: com.emulex-LP10000-0: PortWWN: 10:00:00:00:c9:49:aa:54 \\.\Scsi2: com.emulex-LP10000-1: PortWWN: 10:00:00 ...
by PaulB in General PowerShell on 08 Jul 2009 05:51 AM
Active Forums 4.3
right
footer   footer
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
footer   footer