I'm glad to hear that the animation is annoying ;) I wiped my screen a few times before I realised it wasn't real, so I'm just spreading the wealth. It's the power of the interweb ;>
From: Richard Stovall [mailto:rich...@gmail.com] Sent: 14 September 2010 15:02 To: NT System Admin Issues Subject: Re: Really simple powershell query - text formatting... Sucker. Now off to the dungeon with you! On Tue, Sep 14, 2010 at 9:52 AM, William Robbins <dangerw...@gmail.com> wrote: That was an animation? Damnit, I set off that fogger in my cube for no reason! They told me if I did that again I'd have to move to the basement! - WJR On Tue, Sep 14, 2010 at 07:08, James Rankin <kz2...@googlemail.com> wrote: Totally unrelated, but....how annoying is that animation in your signature? On 14 September 2010 12:46, Palmer, Neal <npal...@uwic.ac.uk> wrote: Hi all, I'm trying to do the most simple of things, so I can start writing in Powershell instead of vbscript, but can't find a way to do it... Basically I'm processing a large input stream (30k+ users from a remote data source) of text, in two columns of Variable Name and Variable Data, starting with a Unique ID, followed by 3 lines related to that ID, then it repeats for the next user, e.g ID User1 FN John SN Thomas ID User2 FN Rick SN Rubin . Etc What I want to do is group each variable per Unique ID and process them. So I get something like ID(1) = "User1" FN(1) = "John" SN(1) = "Thomas" Simple, but as my columns don't have column headings, I can't find the Powershell command to separate the Variable Name and Variable Data string into variables I can use. This seems to be the universal example of basic manipulation of columns, but the get-process command gives column headers, which I don't have $tring = get-process |select-object Name,VM -first 10 "{0} is the second process, VM is {1}" -f $tring[1].Name,$tring[1].VM So I'm looking to isolate the Variables. I've tried using the formatstring command, but I can't get it to return the entire variable, only 1 character of text $test = "ABCD EFGH" $first = "{0}" -f $test[0] echo $first A I need the whole word assign so, I'd like to do $test = "ABCD EFGH" $first = "{0}" -f $test[<first word>] $second = ""{0}" -f $test[<second word>] echo $first John echo $second Thomas Also these variables are of variable length, so $first = "{0}" -f $test[1-4] Wouldn't work. Help!?! Many thanks, Neal P.S. My goal is to write something that will process the entire dataset in Powershell. I can write the lot to a text file and do whatever I like in vbscript, that's easy for me, but I'm trying to use Powershell in a more intelligent way so that I don't have to store and process the data locally. It may be that this 'online' method is too slow anyway, but I want to try... ___________________________________________________________ Neal Palmer Senior Technical Support Officer Systems and Communications Services Information Services Division UWIC, Cardiff, Wales, CF5 2YB UWIC Mysite <http://mysites.staff.uwic.ac.uk/Person.aspx?accountname=CAMPUS%5Ccc0078 > ___________________________________________________________ P SAVE PAPER - Please do not print this e-mail unless absolutely necessary ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ < http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin -- "On two occasions...I have been asked, 'Pray, Mr Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
<<image001.gif>>