1
vote
1answer
475 views

How to correctly dispose spweb and spsite on powershell foreach!

Title of the question is pretty simple, I have 18000 site collections and this script is showing 1GB of ram used, so I wonder how can I dispose correctly the spweb and spsite object $webapplication = ...
0
votes
1answer
243 views

PowerShell - Dispose SP Objects

I want to use PowerShell to loop through my SharePoint and dispose all objects properly. I donĀ“t want to generate entrys in the SharePoint log like this: An SPRequest object was not disposed ...
0
votes
2answers
98 views

How to properly dispose of sp 2007 object in powershell?

First and foremost I've done A LOT of googling and even went past the first page or 2 :) so feel free to direct me to the proper post if necessary. I am trying to loop through a bunch of webs and ...
8
votes
2answers
2k views

SPWeb being closed when getting list by powershell. What's wrong?

When I run this little piece of powershell code: $w = Get-SPWeb http://localhost $l = $w.List["some list"] I get Unexpected error message to my Sharepoint ULS log Detected use of SPRequest for ...