Can we have an example of the webpage ?, (I mean something like the web saved into an HTML or something) because the question is to vague to be answered.
edrz01
ASKER
Thanks Jose.
So I am trying to get the date for this particular file...
or
$R.AllElements | where {$_.innerhtml -like "11/26/2017"}
It's hard to tell the exact query because i don't have the link. sorry.
edrz01
ASKER
First one:
PS C:\WINDOWS\system32> $R = Invoke-WebRequest -URI "http://mcafee.xxx.xxx.xxx/css_content/current/VSCANDAT1000/DAT/0000/"
then do
$R.AllElements | gm
then : The term 'then' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:2 char:2
+ then do
+ ~~~~
+ CategoryInfo : ObjectNotFound: (then:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Well, the question can't be answered because of the lack of details, you can keep exploring the innerhtml and look for the properties you are looking for, or maybe if you can get the information in CSV or XML that would be helpful to your proposes.
Jose, I appreciate you trying to find a solution however not sure what you mean by 'lack of details'. I provided you everything I could.
The URL I am accessing looks like this (can't provide actual link since it is restricted)
On that listing is a filename called 'avvdat.ini'
I am trying to get the date to the left of that filename.
When I hit F12 on the webpage it shows the data as below. I put blocks around the date and the file.
Jose Gabriel Ortega Castro
I don't think that any can give you an answer with the information you have provided. What I suggest you here, it's to save the HTML file in your desktop and remove the information that is not relevant to the question, (like enterprise, number of McAfee account or whatever). and left the HTML structure intact so we can finish the answer. What I mean with incomplete or it can't be answered is that we're not wizards. We need to have the full HTML structure so we can provide an answer or do the query accordingly to your SPECIFIC NEEDS. each web page is different.