<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Jesse Tedoff</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jtedoff/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jtedoff/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:14:21 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to Enable Kerberos Authentication for Accessing Exchange in a Resource Forest</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/how-to-enable-kerberos-authentication-for-accessing-exchange-in-a-resource-forest</link>
      <pubDate>Wed, 24 Aug 2016 12:20:18 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/?p=135</guid>
      <description><![CDATA[https://blogs.technet.microsoft.com/exchange/2016/07/14/how-to-enable-kerberos-authentication-for-ac...]]></description>
      <content:encoded><![CDATA[https://blogs.technet.microsoft.com/exchange/2016/07/14/how-to-enable-kerberos-authentication-for-accessing-exchange-in-a-resource-forest/]]></content:encoded>
    </item>
    <item>
      <title>Another script to run Get-FolderPermission against all the folders in a mailbox</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/another-script-to-run-get-folderpermission-against-all-the-folders-in-a-mailbox</link>
      <pubDate>Sat, 24 May 2014 14:08:05 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/2014/05/24/another-script-to-run-get-folderpermission-against-all-the-folders-in-a-mailbox/</guid>
      <description><![CDATA[I think this script might be helpful for administrators in organizations where sharing of mailbox...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:medium;">I think this script might be helpful for administrators in organizations where sharing of mailbox folders is extensive.&nbsp; I&rsquo;ve tested it both in remote PowerShell for Exchange Online, and in Exchange Management Shell for Exchange 2013 SP1.&nbsp; There are others like it out there, but I like this one for its singularity of purpose . . . just running a read-only &ldquo;Get&rdquo; for an entire mailbox&rsquo;s folder permissions.<br> <br> The impetus to write it came when one of my customers asked to check some mailboxes to see if a particular user had access to some folders in them.&nbsp; You may already be aware that in Exchange Management Shell it&rsquo;s not really possible to run Get-MailboxFolder beyond the scope of the presently logged on user.&nbsp; So as wonderful as it would be, it&rsquo;s not possible to feed the output of Get-MailboxFolder to Get-MailboxFolderPermission for other users in the organization.<br> <br> Nevertheless I knew from other examples that PowerShell would make it possible to take the output of another cmdlet, Get-MailboxFolderStatistics, and reshape it for piping into Get-MailboxFolderPermission.&nbsp; So I set about writing a script that would take a single user mailbox&rsquo;s alias as input, enumerate all the folders visible in the mailbox, then run Get-MailboxFolderPermission against that output.<br> <br> The following is the result of that effort.&nbsp; I wrote it to display the folders and permissions on screen, and then also write the data to a text file.&nbsp; I recommend use either as is or modify it for your own purposes as you see fit.</span><p></p><p></p><p>#############################################################################<br>#<br># This script runs Get-MailboxFolderPermission for a valid mailbox specified<br># by the user.&nbsp; It displays the folder-level permissions on screen and also<br># dumps them to a text file.<br>#<br># Created by jtedoff@microsoft.com<br># Last modified 5/24/2014<br>#<br>#############################################################################</p><p></p><p># This function collects a mailbox from the user. It checks that the mailbox exists and that the input results in only one mailbox.</p><p></p><p>Function GetMailbox<br>{<br>$mb = Read-Host "Alias of mailbox to retrieve folder permissions?"</p><p></p><p>$check = Get-Mailbox -Identity $mb -erroraction silentlycontinue<br>If ($check){<br>&nbsp;$chk = $check.count<br>&nbsp;If ($chk -and $chk -gt 1){<br>&nbsp;&nbsp;Write-Host ""<br>&nbsp;&nbsp;Write-Host "Please specify only one mailbox" -ForeGroundColor Yellow<br>&nbsp;&nbsp;Write-Host ""<br>&nbsp;&nbsp;GetMailbox<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;Else {<br>&nbsp;&nbsp;Enumerate<br>&nbsp;&nbsp;}<br>&nbsp;}<br>&nbsp;Else {<br>&nbsp;Write-Host ""<br>&nbsp;Write-Host "This is not a valid mailbox alias, please retry" -ForeGroundColor Red<br>&nbsp;Write-Host ""<br>&nbsp;GetMailbox<br>&nbsp;}<br>}</p><p></p><p># This function runs Get-MailboxFolderStatistics for the mailbox found in GetMailbox. It then takes the output and reformats it for a foreach loop that runs Get-MailboxFolderPermission for each folder path found</p><p></p><p>Function Enumerate<br>{<br>&nbsp;Write-Host ""<br>&nbsp;Write-Host "Analyzing mailbox" $check -ForeGroundColor Green<br>&nbsp;Write-Host ""</p><p></p><p>$file = ("." + $check.alias + "-" + $check.DisplayName + ".txt")</p><p></p><p>$mbfs = Get-MailboxFolderStatistics -Identity $check.Identity</p><p></p><p>$flist = $mbfs.folderpath</p><p></p><p>$flist | foreach {$chg = $_ -replace "/" , ""<br>&nbsp;$pchg = ($check.alias + ":" + $chg)<br>&nbsp;$go = Get-MailboxFolderPermission -Identity $pchg -erroraction silentlycontinue<br>&nbsp;If ($go) {<br>&nbsp;&nbsp;Write-Host ""&nbsp;&nbsp;<br>&nbsp;&nbsp;Write-Host "Folder permission for" $pchg -ForegroundColor Green<br>&nbsp;&nbsp;$pchg | Out-File $file -append<br>&nbsp;&nbsp;$go<br>&nbsp;&nbsp;$go | Out-File $File -append<br>&nbsp;}<br>&nbsp;Else {}<br>&nbsp;}</p><p></p><p>}</p><p></p><p># After the functions are defined the script calls the first one</p><p></p><p>GetMailbox</p><p><span style="font-family:Times New Roman;font-size:medium;">&nbsp;</span></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>My blog series on VSS backups for Exchange</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/my-blog-series-on-vss-backups-for-exchange</link>
      <pubDate>Mon, 09 Jul 2012 20:46:33 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/2012/07/09/my-blog-series-on-vss-backups-for-exchange/</guid>
      <description><![CDATA[https://blogs.technet.com/b/exchange/archive/2012/06/04/everything-you-need-to-know-about-exchange-ba...]]></description>
      <content:encoded><![CDATA[<p><a href="https://blogs.technet.com/b/exchange/archive/2012/06/04/everything-you-need-to-know-about-exchange-backups-part-1.aspx">https://blogs.technet.com/b/exchange/archive/2012/06/04/everything-you-need-to-know-about-exchange-backups-part-1.aspx</a><p><a href="https://blogs.technet.com/b/exchange/archive/2012/06/14/everything-you-need-to-know-about-exchange-backups-part-2.aspx">https://blogs.technet.com/b/exchange/archive/2012/06/14/everything-you-need-to-know-about-exchange-backups-part-2.aspx</a></p><p><a href="https://blogs.technet.com/b/exchange/archive/2012/07/09/everything-you-need-to-know-about-exchange-backups-part-3.aspx">https://blogs.technet.com/b/exchange/archive/2012/07/09/everything-you-need-to-know-about-exchange-backups-part-3.aspx</a></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>A little script to check for the NT AUTHORITYSELF full access right on mailboxes</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/a-little-script-to-check-for-the-nt-authorityself-full-access-right-on-mailboxes</link>
      <pubDate>Mon, 23 Apr 2012 06:56:00 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/2012/04/23/a-little-script-to-check-for-the-nt-authorityself-full-access-right-on-mailboxes/</guid>
      <description><![CDATA[In case someone is looking for a script that works with mailbox permissions like this, here's a...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: verdana,geneva;">In case someone is looking for a script that works with mailbox permissions like this, here's a small example of what I came up with to help someone check that all mailboxes have the SELF right in the permissions:</span><p><span style="color: #0000ff;">#Script to check mailboxes for fullaccess rights for NT AUTHORITYSELF</span><br><span style="color: #0000ff;">#Written by <a href="mailto:jtedoff@microsoft.com"><span style="color: #0000ff;">jtedoff@microsoft.com</span></a> 4/21/2012</span></p><p><br><span style="color: #0000ff;">$logfile = "c:selfrightstest.log"</span><br><span style="color: #0000ff;">if (test-path $logfile) {remove-item $logfile}</span></p><p><span style="color: #0000ff;">function WriteLog</span><br><span style="color: #0000ff;">{</span><br><span style="color: #0000ff;">&nbsp;PARAM($msg)</span><br><span style="color: #0000ff;">&nbsp;END</span><br><span style="color: #0000ff;">&nbsp;{</span><br><span style="color: #0000ff;">&nbsp;Add-Content -Path $logfile -encoding ASCII -value $msg</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">}</span></p><p><span style="color: #0000ff;">#Modify the next line to narrow the scope of the Get-Mailbox results</span><br><span style="color: #0000ff;">#For example, set it to -&gt; $mailboxes = Get-Mailbox -server &lt;servername&gt; -resultsize unlimited &lt;- to only check mailboxes on a particular server</span></p><p><span style="color: #0000ff;">$mailboxes = Get-ExchangeServer | ?{$_.ServerRole -like "*mailbox*"} | Get-Mailbox -resultsize unlimited</span></p><p><span style="color: #0000ff;">WriteLog "Checking for FullAccess rights for NT AUTHORITYSELF"</span></p><p><span style="color: #0000ff;">$mailboxes | foreach {</span><br><span style="color: #0000ff;">&nbsp;$perms = get-mailboxpermission $_.identity | ?{$_.user -like "NT AUTHORITYSELF" -and $_.accessrights -like "*fullaccess*"}</span><br><span style="color: #0000ff;">&nbsp;if ($perms) {</span><br><span style="color: #0000ff;">&nbsp;&nbsp;Write-Host "Mailbox for $_" -nonewline</span><br><span style="color: #0000ff;">&nbsp;&nbsp;Write-Host " OK" -foregroundcolor green</span></p><p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;}</span><br><span style="color: #0000ff;">&nbsp;else { $erruser = $_.Identity</span><br><span style="color: #0000ff;">&nbsp;&nbsp;Write-Host "FullAccess right for NT AUTHORITYSELF not detected on the mailbox for " -foregroundcolor red -nonewline</span><br><span style="color: #0000ff;">&nbsp;&nbsp;Write-Host $_.Identity -foregroundcolor red -backgroundcolor white</span><br><span style="color: #0000ff;">&nbsp;&nbsp;WriteLog "FullAccess right for NT AUTHORITYSELF not detected on the mailbox for $erruser"</span><br><span style="color: #0000ff;">&nbsp;&nbsp;}</span><br><span style="color: #0000ff;">&nbsp;}</span></p><p><span style="font-family: verdana,geneva; color: #000000;">Here's an output example where&nbsp;one user doesn't in fact have SELF rights over their mailbox:</span></p><p><span style="font-family: verdana,geneva; color: #000000;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/65/3733.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-65/3733.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/65/3733.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-65/3733.Capture.JPG"></a></span></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Recurring Meeting Requests with Conflicting Instances 2: The Power of Delegates</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/recurring-meeting-requests-with-conflicting-instances-2-the-power-of-delegates</link>
      <pubDate>Fri, 27 Jan 2012 05:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/2012/01/27/recurring-meeting-requests-with-conflicting-instances-2-the-power-of-delegates/</guid>
      <description><![CDATA[https://blogs.technet.com/b/exchange/archive/2012/01/23/recurring-meeting-requests-with-conflicting-i...]]></description>
      <content:encoded><![CDATA[<p><a href="https://blogs.technet.com/b/exchange/archive/2012/01/23/recurring-meeting-requests-with-conflicting-instances-2-the-power-of-delegates.aspx">https://blogs.technet.com/b/exchange/archive/2012/01/23/recurring-meeting-requests-with-conflicting-instances-2-the-power-of-delegates.aspx</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>Automatic Processing of Recurring Meeting Requests with Conflicting Instances</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/automatic-processing-of-recurring-meeting-requests-with-conflicting-instances</link>
      <pubDate>Fri, 27 Jan 2012 05:35:00 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/2012/01/27/automatic-processing-of-recurring-meeting-requests-with-conflicting-instances/</guid>
      <description><![CDATA[https://blogs.technet.com/b/exchange/archive/2011/02/07/3411956.aspx
]]></description>
      <content:encoded><![CDATA[<p><a href="https://blogs.technet.com/b/exchange/archive/2011/02/07/3411956.aspx">https://blogs.technet.com/b/exchange/archive/2011/02/07/3411956.aspx</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>A PowerShell Script to Remove Duplicate ACE's from Public Folders</title>
      <link>https://docs.microsoft.com/archive/blogs/jtedoff/a-powershell-script-to-remove-duplicate-aces-from-public-folders</link>
      <pubDate>Fri, 01 Jul 2011 09:07:00 GMT</pubDate>
      <dc:creator><![CDATA[Jesse Tedoff]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/jtedoff/2011/07/01/a-powershell-script-to-remove-duplicate-aces-from-public-folders/</guid>
      <description><![CDATA[I was talking with a colleague about&nbsp;some of the PowerShell&nbsp;scripts I've written,&nbsp;and...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: verdana,geneva;">I was talking with a colleague about&nbsp;some of the PowerShell&nbsp;scripts I've written,&nbsp;and he suggested I start sharing them&nbsp;in the blogosphere.&nbsp; So without further delay I'll begin with one that I wrote to help&nbsp;someone with a particularly unpleasant permissions problem with public folders.</span><p><span style="font-family: verdana,geneva;">The scenario was that somehow the MAPI folder permissions on hundreds of public folders got duplicated when an out-of-sync DC passed incorrect data to Exchange as replicas got added to the organization.&nbsp;&nbsp;Whatever the cause we wound up with a folder that would have, for example, a permission list like this:</span></p><p><span style="font-family: courier new,courier;">Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Role:</span><br><span style="font-family: courier new,courier;">Default&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; None</span><br><span style="font-family: courier new,courier;">John Smith&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</span><br><span style="font-family: courier new,courier;">John Smith&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</span><br><span style="font-family: courier new,courier;">Merle Biggs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Author</span><br><span style="font-family: courier new,courier;">Merle Biggs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Author</span><br><span style="font-family: courier new,courier;">Anonymous&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reviewer</span></p><p><span style="font-family: verdana,geneva;">The effective result was that users who should have had access the folder didn't have it.&nbsp; Now we knew that if we deleted the duplicate ACE's then access was restored.&nbsp; The problem was that there were hundreds of folders affected and we needed a way to go through and remove the duplicates automatically.</span></p><p><span style="font-family: verdana,geneva;">PowerShell to the rescue!</span></p><p><span style="font-family: verdana,geneva;">We set out to clean up the permissions with a script that first captured the existing permissions on a folder and populated a variable with them.&nbsp; We then cleared the entire ACL by removing every permission on the folder.&nbsp; Finally we used the array of permissions originally captured and had PowerShell simply add them back to the folder they came from.&nbsp; The result was that Exchange rejected duplicates when the script attempted to add them, as expected, and so the above example would be corrected to look like this:</span></p><p><span style="font-family: courier new,courier;">Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Role:</span><br><span style="font-family: courier new,courier;">Default&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; None</span><br><span style="font-family: courier new,courier;">John Smith&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Owner</span><br><span style="font-family: courier new,courier;">Merle Biggs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Author</span><br><span style="font-family: courier new,courier;">Anonymous&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reviewer</span></p><p><span style="font-family: verdana,geneva;">So how did the script work?&nbsp; Here it is, with comments before each section to explain what's happening:</span></p><p></p><p><span style="color: #0000ff;"># The GetTreeTop function asks the user for the path to the public folder we want to work on first and puts the result into the $treetop variable</span><br><span style="color: #0000ff;"># It then checks to see if the entered path is valid and requests the user to try again if it's not</span></p><p><span style="color: #0000ff;">Function GetTreeTop</span><br><span style="color: #0000ff;">{</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">$treetop = Read-Host "Enter public folder to reset permissions on?"</span></p><p><span style="color: #0000ff;">#Check validity of public folder path</span><br><span style="color: #0000ff;">$check = Get-PublicFolder $treetop -erroraction silentlycontinue</span><br><span style="color: #0000ff;">If ($check){</span><br><span style="color: #0000ff;">&nbsp;FindOut</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">&nbsp;Else {</span><br><span style="color: #0000ff;">&nbsp;Write-Host ""</span><br><span style="color: #0000ff;">&nbsp;Write-Host "Public folder name $treetop is not valid, please re-enter the path, using format -&gt; FolderSubfolder" -foregroundcolor Red</span><br><span style="color: #0000ff;">&nbsp;Write-Host ""</span><br><span style="color: #0000ff;">&nbsp;GetTreeTop</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">}</span></p><p><span style="color: #0000ff;"># The FindOut function asks the user if we want to operate just against the one public folder specified in GetTreeTop, or do we want to work against all the subfolders&nbsp; </span><br><span style="color: #0000ff;">as well?</span><br><span style="color: #0000ff;"># Based on the Y or N answer we go to either the DoRecurse or the DontRecurse function.&nbsp; If the answer isn't Y or N we ask again.</span></p><p><span style="color: #0000ff;">Function FindOut</span><br><span style="color: #0000ff;">{</span><br><span style="color: #0000ff;">&nbsp;$recrse = Read-Host "Do you want to reset permissions on all subfolders beneath this tree? (Y/N)"</span><br><span style="color: #0000ff;">&nbsp;if ($recrse -eq "Y")</span><br><span style="color: #0000ff;">&nbsp;{</span><br><span style="color: #0000ff;">&nbsp;DoRecurse</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">&nbsp;elseif ($recrse -eq "N")</span><br><span style="color: #0000ff;">&nbsp;{</span><br><span style="color: #0000ff;">&nbsp;DontRecurse</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">&nbsp;else</span><br><span style="color: #0000ff;">&nbsp;{</span><br><span style="color: #0000ff;">&nbsp;FindOut</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">}</span></p><p><span style="color: #0000ff;"># The DontRecurse function runs Get-PublicFolderClientPermission on the folder that $treetop provides, except where the AccessRights value is "None", and puts the result&nbsp; </span><br><span style="color: #0000ff;">into an array called $perm</span><br><span style="color: #0000ff;"># It then removes all the permissions on the folder</span><br><span style="color: #0000ff;"># Finally, it runs a ForEach loop with $perm as the input, so that each entry in the array goes through the Add-PublicFolderClientPermission cmdlet, and we put the same&nbsp; </span><br><span style="color: #0000ff;">ACEs back that were present to begin with, minus the duplicates (since Exchange rejects them)</span></p><p><br><span style="color: #0000ff;">Function DontRecurse</span><br><span style="color: #0000ff;">{</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">Write-Host "Removing permissions on public folder $treetop"</span><br><span style="color: #0000ff;">Write-Host ""</span></p><p><span style="color: #0000ff;">$perm = get-publicfolderclientpermission $treetop | ?{$_.accessrights -ne "None"}</span></p><p><span style="color: #0000ff;">$perm | remove-publicfolderclientpermission $treetop -confirm:$false</span></p><p><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">Write-Host "Replacing permissions on public folder" $treetop -ForeGroundColor Green</span><br><span style="color: #0000ff;">Write-Host ""</span></p><p><span style="color: #0000ff;">$perm | foreach {</span><br><span style="color: #0000ff;">&nbsp;add-publicfolderclientpermission -Identity $_.Identity -user $_.user -accessrights $_.accessrights</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">Write-Host "COMPLETED"</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">exit</span><br><span style="color: #0000ff;">}</span></p><p><span style="color: #0000ff;"># The DoRecurse function is the same as the DontRecurse function, except we add create an array of public folder paths based on the original path getting fed to Get- </span><br><span style="color: #0000ff;">PublicFolder with the -recurse switch</span><br><span style="color: #0000ff;">#We then feed each path into a foreach loop, which itself has a foreach loop just like the DontRecurse function</span></p><p><span style="color: #0000ff;">Function DoRecurse</span><br><span style="color: #0000ff;">{</span><br><span style="color: #0000ff;">$treepath = get-publicfolder $treetop -recurse -resultsize unlimited</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">Write-Host "Removing permissions on public folder tree $treetop"</span><br><span style="color: #0000ff;">Write-Host ""</span></p><p><span style="color: #0000ff;">$treepath | foreach {</span><br><span style="color: #0000ff;">&nbsp;$pf = $_.Identity</span><br><span style="color: #0000ff;">&nbsp;$perm = get-publicfolderclientpermission $pf | ?{$_.accessrights -ne "None"}</span><br><span style="color: #0000ff;">&nbsp;$perm | remove-publicfolderclientpermission $pf -confirm:$false</span><br><span style="color: #0000ff;">&nbsp;Write-Host ""</span><br><span style="color: #0000ff;">&nbsp;Write-Host "Replacing permissions on public folder" $pf -ForeGroundColor Green</span><br><span style="color: #0000ff;">&nbsp;Write-Host ""</span><br><span style="color: #0000ff;">&nbsp;$perm | foreach {</span><br><span style="color: #0000ff;">&nbsp;add-publicfolderclientpermission -Identity $_.Identity -user $_.user -accessrights $_.accessrights</span><br><span style="color: #0000ff;">&nbsp; }</span><br><span style="color: #0000ff;">&nbsp;}</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">Write-Host "COMPLETED"</span><br><span style="color: #0000ff;">Write-Host ""</span><br><span style="color: #0000ff;">exit</span><br><span style="color: #0000ff;">}</span></p><p><br><span style="color: #0000ff;"># Once all the above functions are defined we call the one we want to execute first:</span></p><p><span style="color: #0000ff;">GetTreeTop</span></p></p>
]]></content:encoded>
    </item>
  </channel>
</rss>