RE: PowerShell date calculations

2012-01-12 Thread Paul Noone
That's what I thought to but as soon as you apply formatting the object seems 
to get converted to a string and you can no longer perform calculations. Also 
turns out New-TimeSpan has no built-in formatting capability.

Mitch provided the simple solution of just using .net methods which work treat. 
:)

i.e. $duration = $end.Subtract($start)

Regards,

Paul

--
Online Developer/SharePoint Administrator,
ICT Infrastructure Team
CEO Sydney

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Prashanth Thiyagalingam
Sent: Thursday, 12 January 2012 3:17 PM
To: ozmoss@ozmoss.com
Subject: RE: PowerShell date calculations

you could use
Get-Date -Format "hh:mm:ss"



From: paul.no...@ceosyd.catholic.edu.au
To: ozmoss@ozmoss.com
Date: Thu, 12 Jan 2012 13:10:05 +1100
Subject: PowerShell date calculations
I've managed to produce what I want below but have first had to convert the 
Get-Date objects to datetime. Is there a more straightforward way? I tried the 
New-TimeSpan cmdlet but couldn't see a way to just extract what I needed 
-TotalSeconds - and then reformat it.
# Backup the site and calculate time taken
$start = Get-Date
$startNow = [system.datetime]$start
$startTime = $start.ToString('hh:mm:ss')

Backup-SPSite -Identity $site.Url -Path $backupPath

$end = Get-Date
$endNow = [system.datetime]$end
$endTime = $start.ToString('hh:mm:ss')

$duration = ($endNow - $startNow)

Start

12:56:26

$startTime

End

12:56:27

$endTime

Duration

00:00:00.5937538

$duration


Kind regards,

Paul Noone

---
Online Developer/SharePoint Administrator
Infrastructure Team, ICT
Catholic Education Office, Sydney
p: (02) 9568 8461
f: (02) 9568 8483
e: paul.no...@ceosyd.catholic.edu.au
w: http://www.ceosyd.catholic.edu.au/


___ ozmoss mailing list 
ozmoss@ozmoss.com 
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


RE: SPS2010 Search woes

2012-01-12 Thread Nigel Hertz
..

What is it they say about some problems having so simple a cause that it always 
gets overlooked?

Thanks to Chris, I logged onto the indexing server to install Fiddler, so I 
could run the tests. I open up IE, and of course it tries to load the intranet, 
as that is what the homepage is set to. Guess what didn't load? I load up IIS 
and lo and behold, the website for the main portal site is stopped, as is the 
application pool for it. The mysites one was fine, as was the CA, which is why 
the user profile database and mysites were indexing correctly.

Of course, everything is working fine on the WFE so I didn't even think of 
looking at IIS. I'm not going to ask why the portal and mysites are set up on 
the IDX server - I'm assuming someone decided to set up load balancing or 
something. But yeah, start up the IIS site and it suddenly starts indexing 
fine. (at least I assume it's fine, as it's now successfully indexed 9831 pages 
and going strong (here as before it had a nice fat zero).

Thanks for the help guys :)

Nigel

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Chris Howell
Sent: Thursday, 12 January 2012 7:48 PM
To: ozMOSS
Subject: Re: SPS2010 Search woes

Hi Nigel,

This may also be of use in addition to what Paul has suggested:
http://www.ableblue.com/blog/archive/2012/01/04/troubleshooting-sharepoint-search-crawl/

Cheers,

Chris
On 12 January 2012 19:37, Nigel Hertz 
mailto:nigel.he...@stockland.com.au>> wrote:
Thanks Paul, I'll check that out now :)

From: ozmoss-boun...@ozmoss.com 
[mailto:ozmoss-boun...@ozmoss.com] On Behalf 
Of Paul Culmsee
Sent: Thursday, 12 January 2012 7:30 PM

To: ozMOSS
Subject: RE: SPS2010 Search woes

Hiya

Have you looked at the IIS logs for the site and filtered by the search? The 
HTTP codes would be interesting... Also this smells like AD policies that route 
things to a proxy server that is blocking what it thinks are invalid HTTP 
requests.

Regards

Paul

From: ozmoss-boun...@ozmoss.com 
[mailto:ozmoss-boun...@ozmoss.com] On Behalf 
Of Nigel Hertz
Sent: Thursday, 12 January 2012 4:23 PM
To: ozMOSS
Subject: RE: SPS2010 Search woes

And now it's giving me this..
[cid:image001.png@01CCD167.F03566D0]

From: ozmoss-boun...@ozmoss.com 
[mailto:ozmoss-boun...@ozmoss.com] 
On Behalf Of Nigel Hertz
Sent: Thursday, 12 January 2012 7:13 PM
To: ozMOSS (ozmoss@ozmoss.com)
Subject: SPS2010 Search woes

Hi all

Our new SPS2010 environment has been running for about a month and a half now, 
without any major issues - until today. Since this afternoon, search isn't 
working anymore - I get the below error message.

Item not crawled due to one of the following reasons: Preventive crawl rule; 
Specified content source hops/depth exceeded; URL has query string parameter; 
Required protocol handler not found; Preventive robots directive. ( The item 
was deleted because it was either not found or the crawler was denied access to 
it. )

The search crawl account still works (I can log into the site with it and 
browse around). It's not an external site - purely internal. I'm at a complete 
loss as to what might have happened. I've double checked the content source URL 
and there are no query string parameters, it's the root site's url, and I'm 
pretty sure no preventative rules have been set up.

Does anyone have ideas?

Nigel



Kind Regards,
Nigel Hertz

SharePoint Administrator & Developer, Information Technology
Stockland, Level 25, 133 Castlereagh Street, Sydney NSW 2000
T: +61 2 9035 2617  M: +61 4 0103 
4605
F: +61 2 8988 2617   E:  
nigel.he...@stockland.com.au
www.stockland.com.au
Before printing this email, please consider the environment.



Stockland Notice: If this communication has been sent to you by mistake, please 
delete and notify us. If it has been sent to you by mistake, legal privilege is 
not waived or lost and you are not entitled to use it in any way. Stockland and 
its subsidiaries reserve the right to monitor e-mail communication through its 
networks.

___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

<>___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


Re: SPS2010 Search woes

2012-01-12 Thread Chris Howell
Hi Nigel,

This may also be of use in addition to what Paul has suggested:
http://www.ableblue.com/blog/archive/2012/01/04/troubleshooting-sharepoint-search-crawl/

Cheers,

Chris

On 12 January 2012 19:37, Nigel Hertz  wrote:

> Thanks Paul, I’ll check that out now J
>
> ** **
>
> *From:* ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] *On
> Behalf Of *Paul Culmsee
> *Sent:* Thursday, 12 January 2012 7:30 PM
>
> *To:* ozMOSS
> *Subject:* RE: SPS2010 Search woes
>
> ** **
>
> Hiya
>
> ** **
>
> Have you looked at the IIS logs for the site and filtered by the search?
> The HTTP codes would be interesting… Also this smells like AD policies that
> route things to a proxy server that is blocking what it thinks are invalid
> HTTP requests.
>
> ** **
>
> Regards
>
> ** **
>
> Paul
>
> ** **
>
> *From:* ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] *On
> Behalf Of *Nigel Hertz
> *Sent:* Thursday, 12 January 2012 4:23 PM
> *To:* ozMOSS
> *Subject:* RE: SPS2010 Search woes
>
> ** **
>
> And now it’s giving me this..
>
> 
>
> ** **
>
> *From:* ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] *On
> Behalf Of *Nigel Hertz
> *Sent:* Thursday, 12 January 2012 7:13 PM
> *To:* ozMOSS (ozmoss@ozmoss.com)
> *Subject:* SPS2010 Search woes
>
> ** **
>
> Hi all
>
> ** **
>
> Our new SPS2010 environment has been running for about a month and a half
> now, without any major issues – until today. Since this afternoon, search
> isn’t working anymore – I get the below error message.
>
> ** **
>
> Item not crawled due to one of the following reasons: Preventive crawl
> rule; Specified content source hops/depth exceeded; URL has query string
> parameter; Required protocol handler not found; Preventive robots
> directive. ( The item was deleted because it was either not found or the
> crawler was denied access to it. )
>
> ** **
>
> The search crawl account still works (I can log into the site with it and
> browse around). It’s not an external site – purely internal. I’m at a
> complete loss as to what might have happened. I’ve double checked the
> content source URL and there are no query string parameters, it’s the root
> site’s url, and I’m pretty sure no preventative rules have been set up.***
> *
>
> ** **
>
> Does anyone have ideas?
>
> Nigel
>
> ** **
>
> * *
>
> *
> Kind Regards,*
> *Nigel Hertz
> *
> *SharePoint Administrator & Developer, Information Technology* 
>
> Stockland, Level 25, 133 Castlereagh Street, Sydney NSW 2000
>
> T: +61 2 9035 2617  M: +61 4 0103 4605
> F: +61 2 8988 2617   E:  nigel.he...@stockland.com.au
>
> www.stockland.com.au
>
> Before printing this email, please consider the environment.
>
> ** **
>
> ** **
> --
>
> Stockland Notice: If this communication has been sent to you by mistake,
> please delete and notify us. If it has been sent to you by mistake, legal
> privilege is not waived or lost and you are not entitled to use it in any
> way. Stockland and its subsidiaries reserve the right to monitor e-mail
> communication through its networks.
>
> ___
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
<>___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


RE: SPS2010 Search woes

2012-01-12 Thread Nigel Hertz
Thanks Paul, I'll check that out now :)

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Paul Culmsee
Sent: Thursday, 12 January 2012 7:30 PM
To: ozMOSS
Subject: RE: SPS2010 Search woes

Hiya

Have you looked at the IIS logs for the site and filtered by the search? The 
HTTP codes would be interesting... Also this smells like AD policies that route 
things to a proxy server that is blocking what it thinks are invalid HTTP 
requests.

Regards

Paul

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Nigel Hertz
Sent: Thursday, 12 January 2012 4:23 PM
To: ozMOSS
Subject: RE: SPS2010 Search woes

And now it's giving me this..
[cid:image001.png@01CCD161.A3B717A0]

From: ozmoss-boun...@ozmoss.com 
[mailto:ozmoss-boun...@ozmoss.com] 
On Behalf Of Nigel Hertz
Sent: Thursday, 12 January 2012 7:13 PM
To: ozMOSS (ozmoss@ozmoss.com)
Subject: SPS2010 Search woes

Hi all

Our new SPS2010 environment has been running for about a month and a half now, 
without any major issues - until today. Since this afternoon, search isn't 
working anymore - I get the below error message.

Item not crawled due to one of the following reasons: Preventive crawl rule; 
Specified content source hops/depth exceeded; URL has query string parameter; 
Required protocol handler not found; Preventive robots directive. ( The item 
was deleted because it was either not found or the crawler was denied access to 
it. )

The search crawl account still works (I can log into the site with it and 
browse around). It's not an external site - purely internal. I'm at a complete 
loss as to what might have happened. I've double checked the content source URL 
and there are no query string parameters, it's the root site's url, and I'm 
pretty sure no preventative rules have been set up.

Does anyone have ideas?

Nigel



Kind Regards,
Nigel Hertz

SharePoint Administrator & Developer, Information Technology
Stockland, Level 25, 133 Castlereagh Street, Sydney NSW 2000
T: +61 2 9035 2617  M: +61 4 0103 4605
F: +61 2 8988 2617   E:  
nigel.he...@stockland.com.au
www.stockland.com.au
Before printing this email, please consider the environment.



Stockland Notice: If this communication has been sent to you by mistake, please 
delete and notify us. If it has been sent to you by mistake, legal privilege is 
not waived or lost and you are not entitled to use it in any way. Stockland and 
its subsidiaries reserve the right to monitor e-mail communication through its 
networks.
<>___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


RE: SPS2010 Search woes

2012-01-12 Thread Paul Culmsee
Hiya

Have you looked at the IIS logs for the site and filtered by the search? The 
HTTP codes would be interesting... Also this smells like AD policies that route 
things to a proxy server that is blocking what it thinks are invalid HTTP 
requests.

Regards

Paul

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Nigel Hertz
Sent: Thursday, 12 January 2012 4:23 PM
To: ozMOSS
Subject: RE: SPS2010 Search woes

And now it's giving me this..
[cid:image001.png@01CCD147.65972830]

From: ozmoss-boun...@ozmoss.com 
[mailto:ozmoss-boun...@ozmoss.com] 
On Behalf Of Nigel Hertz
Sent: Thursday, 12 January 2012 7:13 PM
To: ozMOSS (ozmoss@ozmoss.com)
Subject: SPS2010 Search woes

Hi all

Our new SPS2010 environment has been running for about a month and a half now, 
without any major issues - until today. Since this afternoon, search isn't 
working anymore - I get the below error message.

Item not crawled due to one of the following reasons: Preventive crawl rule; 
Specified content source hops/depth exceeded; URL has query string parameter; 
Required protocol handler not found; Preventive robots directive. ( The item 
was deleted because it was either not found or the crawler was denied access to 
it. )

The search crawl account still works (I can log into the site with it and 
browse around). It's not an external site - purely internal. I'm at a complete 
loss as to what might have happened. I've double checked the content source URL 
and there are no query string parameters, it's the root site's url, and I'm 
pretty sure no preventative rules have been set up.

Does anyone have ideas?

Nigel



Kind Regards,
Nigel Hertz

SharePoint Administrator & Developer, Information Technology
Stockland, Level 25, 133 Castlereagh Street, Sydney NSW 2000
T: +61 2 9035 2617  M: +61 4 0103 4605
F: +61 2 8988 2617   E:  
nigel.he...@stockland.com.au
www.stockland.com.au
Before printing this email, please consider the environment.



Stockland Notice: If this communication has been sent to you by mistake, please 
delete and notify us. If it has been sent to you by mistake, legal privilege is 
not waived or lost and you are not entitled to use it in any way. Stockland and 
its subsidiaries reserve the right to monitor e-mail communication through its 
networks.
<>___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


RE: SPS2010 Search woes

2012-01-12 Thread Nigel Hertz
And now it's giving me this..
[cid:image001.png@01CCD15F.A0658D90]

From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of 
Nigel Hertz
Sent: Thursday, 12 January 2012 7:13 PM
To: ozMOSS (ozmoss@ozmoss.com)
Subject: SPS2010 Search woes

Hi all

Our new SPS2010 environment has been running for about a month and a half now, 
without any major issues - until today. Since this afternoon, search isn't 
working anymore - I get the below error message.

Item not crawled due to one of the following reasons: Preventive crawl rule; 
Specified content source hops/depth exceeded; URL has query string parameter; 
Required protocol handler not found; Preventive robots directive. ( The item 
was deleted because it was either not found or the crawler was denied access to 
it. )

The search crawl account still works (I can log into the site with it and 
browse around). It's not an external site - purely internal. I'm at a complete 
loss as to what might have happened. I've double checked the content source URL 
and there are no query string parameters, it's the root site's url, and I'm 
pretty sure no preventative rules have been set up.

Does anyone have ideas?

Nigel



Kind Regards,
Nigel Hertz

SharePoint Administrator & Developer, Information Technology
Stockland, Level 25, 133 Castlereagh Street, Sydney NSW 2000
T: +61 2 9035 2617  M: +61 4 0103 4605
F: +61 2 8988 2617   E:  
nigel.he...@stockland.com.au
www.stockland.com.au
Before printing this email, please consider the environment.



Stockland Notice: If this communication has been sent to you by mistake, please 
delete and notify us. If it has been sent to you by mistake, legal privilege is 
not waived or lost and you are not entitled to use it in any way. Stockland and 
its subsidiaries reserve the right to monitor e-mail communication through its 
networks.
<>___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss


SPS2010 Search woes

2012-01-12 Thread Nigel Hertz
Hi all

Our new SPS2010 environment has been running for about a month and a half now, 
without any major issues - until today. Since this afternoon, search isn't 
working anymore - I get the below error message.

Item not crawled due to one of the following reasons: Preventive crawl rule; 
Specified content source hops/depth exceeded; URL has query string parameter; 
Required protocol handler not found; Preventive robots directive. ( The item 
was deleted because it was either not found or the crawler was denied access to 
it. )

The search crawl account still works (I can log into the site with it and 
browse around). It's not an external site - purely internal. I'm at a complete 
loss as to what might have happened. I've double checked the content source URL 
and there are no query string parameters, it's the root site's url, and I'm 
pretty sure no preventative rules have been set up.

Does anyone have ideas?

Nigel



Kind Regards,
Nigel Hertz

SharePoint Administrator & Developer, Information Technology
Stockland, Level 25, 133 Castlereagh Street, Sydney NSW 2000
T: +61 2 9035 2617  M: +61 4 0103 4605
F: +61 2 8988 2617   E:  nigel.he...@stockland.com.au
www.stockland.com.au
Before printing this email, please consider the environment.



Stockland Notice: If this communication has been sent to you by mistake, please 
delete and notify us. If it has been sent to you by mistake, legal privilege is 
not waived or lost and you are not entitled to use it in any way. Stockland and 
its subsidiaries reserve the right to monitor e-mail communication through its 
networks.
___
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss