header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

extract certain areas
Last Post 30 Sep 2008 04:40 PM by bsonposh. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
alanrenoufUser is Offline
New Member
New Member
Posts:25

--
30 Sep 2008 03:19 PM  

Hi,

Im trying to grab some information from the citrix license server on our site, I tried using WMI but there is a known problem with the WMI information for this so that is a no go.

 

I then came up with the idea of grabbing the info from the webpage, I can get the info but i need to get a specific area, please can you help....

an extract of what i get is in the attached file.

What I need is the 5,000 number in this case (which is a number that can change) and the 4,738 which again is a number that will change.

 

Any ideas how I can get this info ?

 

Thanks


Attachment: 1930192962571.txt

bsonposhUser is Offline
Basic Member
Basic Member
Posts:393
Avatar

--
30 Sep 2008 03:50 PM  
What exactly is the "known" problem with WMI?


Brandon Shell
----------------
Microsoft Powershell MVP
https://mvp.support.microsoft.com/profile/Brandon
Blog: http://www.bsonposh.com
alanrenoufUser is Offline
New Member
New Member
Posts:25

--
30 Sep 2008 04:05 PM  

Im trying to get the licence numbers, funny enough using your script !

http://bsonposh.com/archives/310

But it doesnt list them all, I googled it and apparently this is a known issue and there is a 'private fix' which we are looking to get hold of.

In the meantime I thought I would brush up on my PS skills and try and get the info straight from the webpage.

 

I think I have just worked it out, as the line number stays the same i can do the following..

 

@(gc e:\lictest.txt)[277]

 

Then I can tidy up the results, is this the best way ?



bsonposhUser is Offline
Basic Member
Basic Member
Posts:393
Avatar

--
30 Sep 2008 04:40 PM  
I would guess a RegEx would be the next best thing as using line numbers could be very problematic.

Something like:
"(?\\d*\W\d*<\/td\>)"


Brandon Shell
----------------
Microsoft Powershell MVP
https://mvp.support.microsoft.com/profile/Brandon
Blog: http://www.bsonposh.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer