Is there a power shell command to pipe all public folders not modified or logged into for several years into a csv file
Is there a power shell command to pipe all public folders not modified or logged into for several years into a csv file. In exchange 2007. I need to clean up the public folder which were not in use or not modified. Is there any alternate way to do so.Server Admin
August 2nd, 2011 5:35am

On Tue, 2 Aug 2011 09:28:59 +0000, nanu4567 wrote: >Is there a power shell command to pipe all public folders not modified or logged into for several years into a csv file. In exchange 2007. I need to clean up the public folder which were not in use or not modified. Is there any alternate way to do so. I don't think there's any sort of date associated with a public folder. Item _in_ a PF have a modified date, but that won't really tell you if there's been activity in the PF if the only activity was to delete items from it. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2011 9:15pm

Hi, First, you can use Get-PublicFolderStatisticsto retrieve statistical information about public folders, such as folder name, folder size, item count and last logon time and so on. The following command is to export public folder information to C:\1.csv: Get-PublicFloderStatistics | Export –csv C:\1.csv And then you can use Remove-PublicFolder to remove existing public folders according to your need. Hope this helps. ThanksSophia Xu
August 3rd, 2011 10:55pm

On Thu, 4 Aug 2011 02:48:15 +0000, Sophia Xu wrote: > > >Hi, > >First, you can use Get-PublicFolderStatisticsto retrieve statistical information about public folders, such as folder name, folder size, item count and last logon time and so on. The following command is to export public folder information to C:\1.csv: > >Get-PublicFloderStatistics | Export ?csv C:\1.csv When you're right, you're right. I forgot about that cmdlet. It *does* have the LastModificationTime property. But I think the modification time refers to the folder itself and not the last time content was added or removed or modified. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
August 4th, 2011 12:12am

Ok so if I pipe the lastmodificationtime it will give me the details of the folder. But I am inerested in the folder which are not in use . it can be done by confirming there is not new item added or removed from the folder. Till date I have ran few comdlets as below but its not giving me the correct info. Get-PublicFolderStatistics | where {$_.LastAccessTime -lt "08/01/2011"} | where {$_.LastModificationTime -lt "08/01/2011"} | where {$_.LastUserAccessTime -lt "08/01/2011"} | select-object Name, LastAccessTime, LastModificationTime, LastUserAccessTime | Export-CSV 'E:\Temp\Public-Folders.CSV' Just correct if something is wrong.Server Admin
August 9th, 2011 1:41am

On Tue, 9 Aug 2011 05:35:35 +0000, nanu4567 wrote: > > >Ok so if I pipe the lastmodificationtime it will give me the details of the folder. But I am inerested in the folder which are not in use . it can be done by confirming there is not new item added or removed from the folder. Till date I have ran few comdlets as below but its not giving me the correct info. > >Get-PublicFolderStatistics | where {$_.LastAccessTime -lt "08/01/2011"} | where {$_.LastModificationTime -lt "08/01/2011"} | where {$_.LastUserAccessTime -lt "08/01/2011"} | select-object Name, LastAccessTime, LastModificationTime, LastUserAccessTime | Export-CSV 'E:\Temp\Public-Folders.CSV' > >Just correct if something is wrong. The LastModificationTime refers to mofifications made to the folder, not to the contents of the folder. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2011 5:06am

Hi, You can try the following command: Get-PublicFolderStatistics | select Name, ItemCount, LastAccessTime, LastModificationTime, LastUserAccessTime | where {$_.LastModificationTime –lt “8/1/2011”} | where {$_.LastAccessTime –lt “8/1/2011”} | where {$_.LastuserAccessTime –lt “8/1/2011”} Get-PublicFolderStatistics | select Name, ItemCount, LastAccessTime, LastModificationTime, LastUserAccessTime | where {$_.LastModificationTime –lt “8/1/2011”} | where {$_.LastAccessTime –lt “8/1/2011”} | where {$_.LastuserAccessTime –lt “8/1/2011”} | Export –csv ‘E:\Temp\Public-Folders01.csv’ Hope this helps. ThanksSophia Xu
August 16th, 2011 2:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics