setting Public folder limits on many folders using powershell commands
It busy here since so many people have been let go. I am trying see how I can import a TXT file with a group of folders names and paths into the PS command below to set limits on the PFs. Would I create the txt.file with PF information as shown below in red and then pipe this txt file into the PS command with the new limits and these limits would be applied to all the PFs in the TXT file? The problem I have is there are hundreds of thousands of PFs at various sizes so I would like to group these public folders based on a size range ( > 1mB & < 2MB) and set the limits for all these PFs to 2.2MB. Also, is there a way to edit the system message that is genereated when a PF has reached its limit to add additional information to tell the user what to do? I would like to put our companys helpdesk number in the message for user assistance if they receive a over the limit message. xxx\xxx\xxx\Dell PMO\DELL 2005\_INVOICED\Q3\0509\AU000613 Kraft Image Asset tag Set-PublicFolder to specify a PostStorageQuota, StorageQuota and UseDatabaseQuotaDefaults:$false
September 8th, 2009 9:00pm

Hi Dana, You have to create a TXT file for each groups with different size limits. provide the identity of public folders in txt files which you want to set the limits on and execute below command using each file with different sizes. Get-Content "Path of file" | Foreach {Set-publicfolder -id $_ -IssueWarningQuota "size of PF to issue warning" -ProhibitPostQuota "Max Size of PF to block posts" -UserDatabaseQuotaDefaults:$false} Above command is good if you have all PF folders IDs in Txt files including children. If you want to have certain PF trees set with Limits then group them in a single TXT file which you want to set for same size and execute below command... Get-Content "Path of file" | Foreach {Get-PublicFolder -id $_ -Recurse | Set-PublicFolder -UseDatabaseQuotaDefaults:$false -IssueWarningQuota "Size of PF to issue warning" -ProhibitPostQuota "Size of PF to block posts"} Hope this helps. Thanks. Vishal Ramnani | MCITP - Exchange 2007 | MCSE Messaging | MCTS - Win 2008 Config
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 10:56pm

You actually have 2 things you need to do here. First, you want to set PF limits on a list of public folders supplied from a text file and then second, you want to change the "over limits" notification message. I may be misinterpreting what you want, though. For ALL public folders, did you want to apply these limits or only for folders over 1MB but under 2MB? For the first, you are going to need a PowerShell script that reads the text file and loops through the lines and applies the limit. Your text file should have a header like this:Name\xxx\xxx\xxx\Dell PMO\DELL 2005\_INVOICED\Q3\0509\AU000613 Kraft Image Asset tagNote that I think the folder name will need to start with the "\" character. The entire folder path may need to be in quotes, too.Next, create a .ps1 file such as "PFUPDATE.PS1" to update ALL folders. $Folders = Import-Csv c:\FolderList.txtFor-Each ($Folder in $Folders) { Set-PublicFolder $Folder -UseDatabaseQutoaDefaults:$False -PostStorageQuota:2.2MB -StorageQuote:2.2MB} You may also need to change the exection policy so that you can run this script. Set-ExecutionPolicy -ExecutionPolicy Unrestricted Take a look at these article to read about changing thequota messages. http://technet.microsoft.com/en-us/library/bb124325.aspxhttp://technet.microsoft.com/en-us/library/bb232173.aspxhttp://technet.microsoft.com/en-us/library/bb232089.aspxJim McBee - Blog - http://mostlyexchange.blogspot.com
September 8th, 2009 10:59pm

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

Other recent topics Other recent topics