<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for vmweaver.com</title>
	
	<link>http://vmweaver.com</link>
	<description>Mindless ramblings of a geek...</description>
	<lastBuildDate>Mon, 22 Feb 2010 20:16:58 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CommentsForVmweavercom" /><feedburner:info uri="commentsforvmweavercom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Powershell – Recursive Group Membership by PowerShell Script: Retrieving Distinguished name (DN) from A Fully Qualified Domain Name (FQDN) « Business and Information Technology Tangents</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/rU-f8Ty2vD4/</link>
		<dc:creator>PowerShell Script: Retrieving Distinguished name (DN) from A Fully Qualified Domain Name (FQDN) « Business and Information Technology Tangents</dc:creator>
		<pubDate>Mon, 22 Feb 2010 20:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=146#comment-455</guid>
		<description>[...] A. Weaver’s post Powershell – Recursive Group Membership, he describes the methods by which you can convert to and from multiple variables. Here is how Mr. [...]</description>
		<content:encoded><![CDATA[<p>[...] A. Weaver’s post Powershell – Recursive Group Membership, he describes the methods by which you can convert to and from multiple variables. Here is how Mr. [...]</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/rU-f8Ty2vD4" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/08/powershell-recursive-group-membership/comment-page-1/#comment-455</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell – Recursive Group Membership by Felix</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/pUOlIgPN3u8/</link>
		<dc:creator>Felix</dc:creator>
		<pubDate>Thu, 12 Nov 2009 07:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=146#comment-451</guid>
		<description>Hi Mark,
the HTLM-ized notation of "&amp;" and "&gt;" I corrected already. This is working now. But thx for the hint. ;-)
The other problem I fixed also: I changed the function definition from
"function Convert-DNtoDNS ($DN)" to "function Convert-DNtoDNS ([string]$DN)". Even if a lot of people dont like it: Declaration of variables makes code safer.
Now It is working.
Thx for the publishing of this script.
Felix</description>
		<content:encoded><![CDATA[<p>Hi Mark,<br />
the HTLM-ized notation of &#8220;&amp;&#8221; and &#8220;&gt;&#8221; I corrected already. This is working now. But thx for the hint. <img src='http://vmweaver.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
The other problem I fixed also: I changed the function definition from<br />
&#8220;function Convert-DNtoDNS ($DN)&#8221; to &#8220;function Convert-DNtoDNS ([string]$DN)&#8221;. Even if a lot of people dont like it: Declaration of variables makes code safer.<br />
Now It is working.<br />
Thx for the publishing of this script.<br />
Felix</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/pUOlIgPN3u8" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/08/powershell-recursive-group-membership/comment-page-1/#comment-451</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell – Recursive Group Membership by Mark A. Weaver</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/WCXkxxgoFxs/</link>
		<dc:creator>Mark A. Weaver</dc:creator>
		<pubDate>Wed, 11 Nov 2009 16:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=146#comment-450</guid>
		<description>Felix,
  This script should walk your nested groups and pull out the list of users from all of those sub-groups.
I did a search through my post and I realize that the "special" characters got HTML-ized when I posted.

The "&amp;" should just be an ampersand character....and the "&gt;" is a GreaterThan symbol.
I have corrected it, so I would recopy the script...

I think this is why you may have been getting errors with ".Split".

The ".Split" that I am doing is a Method of the [String] type.  This is part of Poweshell V1.0.  On what line are getting this error?

Hope this helps and thanks for pointing out the errors...
 -- Mark</description>
		<content:encoded><![CDATA[<p>Felix,<br />
  This script should walk your nested groups and pull out the list of users from all of those sub-groups.<br />
I did a search through my post and I realize that the &#8220;special&#8221; characters got HTML-ized when I posted.</p>
<p>The &#8220;&amp;&#8221; should just be an ampersand character&#8230;.and the &#8220;&gt;&#8221; is a GreaterThan symbol.<br />
I have corrected it, so I would recopy the script&#8230;</p>
<p>I think this is why you may have been getting errors with &#8220;.Split&#8221;.</p>
<p>The &#8220;.Split&#8221; that I am doing is a Method of the [String] type.  This is part of Poweshell V1.0.  On what line are getting this error?</p>
<p>Hope this helps and thanks for pointing out the errors&#8230;<br />
 &#8212; Mark</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/WCXkxxgoFxs" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/08/powershell-recursive-group-membership/comment-page-1/#comment-450</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell – Recursive Group Membership by Felix</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/N4oew-QaIjs/</link>
		<dc:creator>Felix</dc:creator>
		<pubDate>Wed, 11 Nov 2009 15:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=146#comment-449</guid>
		<description>This looks very interesting. I tried the script on an exchange 2007 server. For certain administrative reasons I need to find all users (with their principalnames) which are members in a certain group. But in this group are also groups nested, where other groups may be nested. What I need is the list of users in a flat list.

Your script is a very close to a solution for that problem. But on out exchange server we have mostly no addons running. It is still using powershell 1.0. so your script does not work.
The notation with "&amp;" is not know by out powershell. ASlso the function .split is not known.

Do You have an idea what I could do about that? What addons do you use?
Thx &amp; greetings Felix</description>
		<content:encoded><![CDATA[<p>This looks very interesting. I tried the script on an exchange 2007 server. For certain administrative reasons I need to find all users (with their principalnames) which are members in a certain group. But in this group are also groups nested, where other groups may be nested. What I need is the list of users in a flat list.</p>
<p>Your script is a very close to a solution for that problem. But on out exchange server we have mostly no addons running. It is still using powershell 1.0. so your script does not work.<br />
The notation with &#8220;&amp;&#8221; is not know by out powershell. ASlso the function .split is not known.</p>
<p>Do You have an idea what I could do about that? What addons do you use?<br />
Thx &amp; greetings Felix</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/N4oew-QaIjs" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/08/powershell-recursive-group-membership/comment-page-1/#comment-449</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell and DFSR by Mark A. Weaver</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/OLthp1id8JM/</link>
		<dc:creator>Mark A. Weaver</dc:creator>
		<pubDate>Wed, 28 Oct 2009 20:33:55 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=126#comment-446</guid>
		<description>Steve,
 Wow! Thanks for the update. I am sure that will help a bunch of folks out.  I appreciate the effort on this.

 -- Mark</description>
		<content:encoded><![CDATA[<p>Steve,<br />
 Wow! Thanks for the update. I am sure that will help a bunch of folks out.  I appreciate the effort on this.</p>
<p> &#8212; Mark</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/OLthp1id8JM" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/04/powershell-and-dfsr/comment-page-1/#comment-446</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell and DFSR by Steve</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/LALMV_1Xg8E/</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 28 Oct 2009 20:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=126#comment-445</guid>
		<description>For anyone that wants emails sent out I have updated the script to include HTML emails with formatting. (Added by Moderator from previous post)
Moderator please remove all other comments from me..  This should work now:

        $SuccessAuditHTML = "HTML"
	$SuccessAuditHTML += "BODY"
	
	$WarningAuditHTML = "HTML"
	$WarningAuditHTML += "BODY"
	
	$ErrorAuditHTML = "HTML"
	$ErrorAuditHTML += "BODY"
	
foreach ($Group in $RGroups)
{
	## Cycle through all Replication groups found
	$DFSRGFoldersWMIQuery = "SELECT * FROM DfsrReplicatedFolderConfig WHERE ReplicationGroupGUID='" + $Group.ReplicationGroupGUID + "'"
	$RGFolders = Get-WmiObject -Namespace "root\MicrosoftDFS" -Query $DFSRGFoldersWMIQuery
 
	## Grab all connections associated with a Replication Group
	$DFSRConnectionWMIQuery = "SELECT * FROM DfsrConnectionConfig WHERE ReplicationGroupGUID='" + $Group.ReplicationGroupGUID + "'"
	$RGConnections = Get-WmiObject -Namespace "root\MicrosoftDFS" -Query $DFSRConnectionWMIQuery	
	foreach ($Connection in $RGConnections)
	{
 
		$ConnectionName = $Connection.PartnerName.Trim()
		$IsInBound = $Connection.Inbound
		$IsEnabled = $Connection.Enabled
 
		## Do not attempt to look at connections that are Disabled
		if ($IsEnabled -eq $True)
		{  
			## If the connection is not ping-able, do not attempt to query it for Backlog info
			$Reply = $ping.send("$ConnectionName")
			if ($reply.Status -eq "Success")
			{
 
 
				## Cycle through the Replication Folders that are part of the replication group and run DFSRDIAG tool to determine the backlog on the connection partners.
				foreach ($Folder in $RGFolders)
				{
					$RGName = $Group.ReplicationGroupName
					$RFName = $Folder.ReplicatedFolderName
 
					## Determine if current connect is an inbound connection or not, set send/receive members accordingly
					if ($IsInBound -eq $True)
					{
						$SendingMember = $ConnectionName
						$ReceivingMember = $ComputerName
					}
					else
					{
						$SendingMember = $ComputerName
						$ReceivingMember = $ConnectionName
					}
					   $Out = $RFName +  " - S:"+$SendingMember + " R:" + $ReceivingMember 
					   Write-Host $Out
						## Execute the dfsrdiag command and get results back in the $Backlog variable
						$BLCommand = "dfsrdiag Backlog /RGName:'" + $RGName + "' /RFName:'" + $RFName + "' /SendingMember:" + $SendingMember + " /ReceivingMember:" + $ReceivingMember
						$Backlog = Invoke-Expression -Command $BLCommand
 
						$BackLogFilecount = 0
						foreach ($item in $Backlog)
						{
							if ($item -ilike "*Backlog File count*")
							{
								$BacklogFileCount = [int]$Item.Split(":")[1].Trim()
							}
 
						}
 
						if ($BacklogFileCount -eq 0)
						{
							#Update Success Audit 
							$SuccessAudit += $RFName + " : 0 files backlogged from "+ $SendingMember + " to " + $ReceivingMember +".`n`r"	
							$SuccessAuditHTML += $RFName + " : 0 files backlogged from "+ $SendingMember + " to " + $ReceivingMember + "BR"
						}
						elseif ($BacklogFilecount -lt $BacklogErrorLevel)
						{
							#Update Warning Audit
							$WarningAudit += $RFName + " " + $BacklogFileCount + " backlogged files from " + $SendingMember + " to " + $ReceivingMember + ".`n`r"
							$WarningAuditHTML += $RFName + " " + $BacklogFileCount + " backlogged files from " + $SendingMember + " to " + $ReceivingMember + "BR"
						}
						else
						{
							#Update Error Audit
							$ErrorAudit += $RFName + " " + $BacklogFilecount + " backlogged files from " + $SendingMember + " to " + $ReceivingMember + ".`n`r"
							$ErrorAuditHTML += $RFName + " " + $BacklogFileCount + " backlogged files from " + $SendingMember + " to " + $ReceivingMember + "BR"
						}
						#Write-Host + $Folder.ReplicatedFolderName "- " $BackLogFilecount -foregroundcolor $FGColor
					}
				}
				else
				{ 
				Write-Host $ConnectionName "is not pingable" 
				$NoPingMessage = "Server """ + $ConnectionName + """ could not be reached.`nPlease verify it is on the network and pingable."
				Write-Event $EventSource $NoPingEventID "Warning" $NoPingMessage "Application"
				}
			}
	}
	$SuccessAuditHTML += "BR"
	$WarningAuditHTML += "BR"
	$ErrorAuditHTML += "BR"
 
}
## Write my events to the local Application log.
 
 $SuccessAuditHTML += "/BODY"
 $SuccessAuditHTML += "/HTML"
 
 $WarningAuditHTML += "/BODY"
 $WarningAuditHTML += "/HTML"

 $ErrorAuditHTML += "/BODY"	
 $ErrorAuditHTML += "/HTML"

 Write-Host $SuccessAuditHTML
 
if ($SuccessAudit -ne $Null)
{
	Write-Event $EventSource $SuccessEventID "Information" $SuccessAudit "Application"
}
 
if ($WarningAudit -ne $Null)
{
	Write-Event $EventSource $WarningEventID "Warning" $WarningAudit "Application"
}
 
if ($ErrorAudit -ne $Null)
{
	Write-Event $EventSource $ErrorEventID "Error" $ErrorAudit "Application"
}

## This is to create an email content
$Mail = New-Object System.Net.Mail.MailMessage($Sender,$Recipient)
$Mail.IsBodyHTML = $True

## Setup SMTP Mail Server info
$MailClient = New-Object System.Net.Mail.SmtpClient
$MailClient.Host = $Mailserver

if ($SuccessAudit -ne $NULL)
{
$MailTxt = “Information ”
$Mail.Subject = $MailTxt + “: DFS-R Report on ” + (Get-Date)
$Mail.Body = $SuccessAuditHTML

# Send the message
$MailClient.Send($Mail)
}

if ($WarningAudit -ne $NULL)
{
$MailTxt = “Warning ”
$Mail.Subject = $MailTxt + “: DFS-R Report on ” + (Get-Date)
$Mail.Body = $WarningAuditHTML

# Send the message
$MailClient.Send($Mail)
}

if ($ErrorAudit -ne $NULL)
{
$MailTxt = “Error ”
$Mail.Subject = $MailTxt + “: DFS-R Report on ” + (Get-Date)
$Mail.Body = $ErrorAuditHTML

# Send the message
$MailClient.Send($Mail)
}

You will need to add the HTML Tags "" to HTML, BODY, and BR within the script.  

Sorry for the multiple comments</description>
		<content:encoded><![CDATA[<p>For anyone that wants emails sent out I have updated the script to include HTML emails with formatting. (Added by Moderator from previous post)<br />
Moderator please remove all other comments from me..  This should work now:</p>
<p>        $SuccessAuditHTML = &#8220;HTML&#8221;<br />
	$SuccessAuditHTML += &#8220;BODY&#8221;</p>
<p>	$WarningAuditHTML = &#8220;HTML&#8221;<br />
	$WarningAuditHTML += &#8220;BODY&#8221;</p>
<p>	$ErrorAuditHTML = &#8220;HTML&#8221;<br />
	$ErrorAuditHTML += &#8220;BODY&#8221;</p>
<p>foreach ($Group in $RGroups)<br />
{<br />
	## Cycle through all Replication groups found<br />
	$DFSRGFoldersWMIQuery = &#8220;SELECT * FROM DfsrReplicatedFolderConfig WHERE ReplicationGroupGUID=&#8217;&#8221; + $Group.ReplicationGroupGUID + &#8220;&#8216;&#8221;<br />
	$RGFolders = Get-WmiObject -Namespace &#8220;root\MicrosoftDFS&#8221; -Query $DFSRGFoldersWMIQuery</p>
<p>	## Grab all connections associated with a Replication Group<br />
	$DFSRConnectionWMIQuery = &#8220;SELECT * FROM DfsrConnectionConfig WHERE ReplicationGroupGUID=&#8217;&#8221; + $Group.ReplicationGroupGUID + &#8220;&#8216;&#8221;<br />
	$RGConnections = Get-WmiObject -Namespace &#8220;root\MicrosoftDFS&#8221; -Query $DFSRConnectionWMIQuery<br />
	foreach ($Connection in $RGConnections)<br />
	{</p>
<p>		$ConnectionName = $Connection.PartnerName.Trim()<br />
		$IsInBound = $Connection.Inbound<br />
		$IsEnabled = $Connection.Enabled</p>
<p>		## Do not attempt to look at connections that are Disabled<br />
		if ($IsEnabled -eq $True)<br />
		{<br />
			## If the connection is not ping-able, do not attempt to query it for Backlog info<br />
			$Reply = $ping.send(&#8220;$ConnectionName&#8221;)<br />
			if ($reply.Status -eq &#8220;Success&#8221;)<br />
			{</p>
<p>				## Cycle through the Replication Folders that are part of the replication group and run DFSRDIAG tool to determine the backlog on the connection partners.<br />
				foreach ($Folder in $RGFolders)<br />
				{<br />
					$RGName = $Group.ReplicationGroupName<br />
					$RFName = $Folder.ReplicatedFolderName</p>
<p>					## Determine if current connect is an inbound connection or not, set send/receive members accordingly<br />
					if ($IsInBound -eq $True)<br />
					{<br />
						$SendingMember = $ConnectionName<br />
						$ReceivingMember = $ComputerName<br />
					}<br />
					else<br />
					{<br />
						$SendingMember = $ComputerName<br />
						$ReceivingMember = $ConnectionName<br />
					}<br />
					   $Out = $RFName +  &#8221; &#8211; S:&#8221;+$SendingMember + &#8221; R:&#8221; + $ReceivingMember<br />
					   Write-Host $Out<br />
						## Execute the dfsrdiag command and get results back in the $Backlog variable<br />
						$BLCommand = &#8220;dfsrdiag Backlog /RGName:&#8217;&#8221; + $RGName + &#8220;&#8216; /RFName:&#8217;&#8221; + $RFName + &#8220;&#8216; /SendingMember:&#8221; + $SendingMember + &#8221; /ReceivingMember:&#8221; + $ReceivingMember<br />
						$Backlog = Invoke-Expression -Command $BLCommand</p>
<p>						$BackLogFilecount = 0<br />
						foreach ($item in $Backlog)<br />
						{<br />
							if ($item -ilike &#8220;*Backlog File count*&#8221;)<br />
							{<br />
								$BacklogFileCount = [int]$Item.Split(&#8220;:&#8221;)[1].Trim()<br />
							}</p>
<p>						}</p>
<p>						if ($BacklogFileCount -eq 0)<br />
						{<br />
							#Update Success Audit<br />
							$SuccessAudit += $RFName + &#8221; : 0 files backlogged from &#8220;+ $SendingMember + &#8221; to &#8221; + $ReceivingMember +&#8221;.`n`r&#8221;<br />
							$SuccessAuditHTML += $RFName + &#8221; : 0 files backlogged from &#8220;+ $SendingMember + &#8221; to &#8221; + $ReceivingMember + &#8220;BR&#8221;<br />
						}<br />
						elseif ($BacklogFilecount -lt $BacklogErrorLevel)<br />
						{<br />
							#Update Warning Audit<br />
							$WarningAudit += $RFName + &#8221; &#8221; + $BacklogFileCount + &#8221; backlogged files from &#8221; + $SendingMember + &#8221; to &#8221; + $ReceivingMember + &#8220;.`n`r&#8221;<br />
							$WarningAuditHTML += $RFName + &#8221; &#8221; + $BacklogFileCount + &#8221; backlogged files from &#8221; + $SendingMember + &#8221; to &#8221; + $ReceivingMember + &#8220;BR&#8221;<br />
						}<br />
						else<br />
						{<br />
							#Update Error Audit<br />
							$ErrorAudit += $RFName + &#8221; &#8221; + $BacklogFilecount + &#8221; backlogged files from &#8221; + $SendingMember + &#8221; to &#8221; + $ReceivingMember + &#8220;.`n`r&#8221;<br />
							$ErrorAuditHTML += $RFName + &#8221; &#8221; + $BacklogFileCount + &#8221; backlogged files from &#8221; + $SendingMember + &#8221; to &#8221; + $ReceivingMember + &#8220;BR&#8221;<br />
						}<br />
						#Write-Host + $Folder.ReplicatedFolderName &#8220;- &#8221; $BackLogFilecount -foregroundcolor $FGColor<br />
					}<br />
				}<br />
				else<br />
				{<br />
				Write-Host $ConnectionName &#8220;is not pingable&#8221;<br />
				$NoPingMessage = &#8220;Server &#8220;&#8221;" + $ConnectionName + &#8220;&#8221;" could not be reached.`nPlease verify it is on the network and pingable.&#8221;<br />
				Write-Event $EventSource $NoPingEventID &#8220;Warning&#8221; $NoPingMessage &#8220;Application&#8221;<br />
				}<br />
			}<br />
	}<br />
	$SuccessAuditHTML += &#8220;BR&#8221;<br />
	$WarningAuditHTML += &#8220;BR&#8221;<br />
	$ErrorAuditHTML += &#8220;BR&#8221;</p>
<p>}<br />
## Write my events to the local Application log.</p>
<p> $SuccessAuditHTML += &#8220;/BODY&#8221;<br />
 $SuccessAuditHTML += &#8220;/HTML&#8221;</p>
<p> $WarningAuditHTML += &#8220;/BODY&#8221;<br />
 $WarningAuditHTML += &#8220;/HTML&#8221;</p>
<p> $ErrorAuditHTML += &#8220;/BODY&#8221;<br />
 $ErrorAuditHTML += &#8220;/HTML&#8221;</p>
<p> Write-Host $SuccessAuditHTML</p>
<p>if ($SuccessAudit -ne $Null)<br />
{<br />
	Write-Event $EventSource $SuccessEventID &#8220;Information&#8221; $SuccessAudit &#8220;Application&#8221;<br />
}</p>
<p>if ($WarningAudit -ne $Null)<br />
{<br />
	Write-Event $EventSource $WarningEventID &#8220;Warning&#8221; $WarningAudit &#8220;Application&#8221;<br />
}</p>
<p>if ($ErrorAudit -ne $Null)<br />
{<br />
	Write-Event $EventSource $ErrorEventID &#8220;Error&#8221; $ErrorAudit &#8220;Application&#8221;<br />
}</p>
<p>## This is to create an email content<br />
$Mail = New-Object System.Net.Mail.MailMessage($Sender,$Recipient)<br />
$Mail.IsBodyHTML = $True</p>
<p>## Setup SMTP Mail Server info<br />
$MailClient = New-Object System.Net.Mail.SmtpClient<br />
$MailClient.Host = $Mailserver</p>
<p>if ($SuccessAudit -ne $NULL)<br />
{<br />
$MailTxt = “Information ”<br />
$Mail.Subject = $MailTxt + “: DFS-R Report on ” + (Get-Date)<br />
$Mail.Body = $SuccessAuditHTML</p>
<p># Send the message<br />
$MailClient.Send($Mail)<br />
}</p>
<p>if ($WarningAudit -ne $NULL)<br />
{<br />
$MailTxt = “Warning ”<br />
$Mail.Subject = $MailTxt + “: DFS-R Report on ” + (Get-Date)<br />
$Mail.Body = $WarningAuditHTML</p>
<p># Send the message<br />
$MailClient.Send($Mail)<br />
}</p>
<p>if ($ErrorAudit -ne $NULL)<br />
{<br />
$MailTxt = “Error ”<br />
$Mail.Subject = $MailTxt + “: DFS-R Report on ” + (Get-Date)<br />
$Mail.Body = $ErrorAuditHTML</p>
<p># Send the message<br />
$MailClient.Send($Mail)<br />
}</p>
<p>You will need to add the HTML Tags &#8220;&#8221; to HTML, BODY, and BR within the script.  </p>
<p>Sorry for the multiple comments</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/LALMV_1Xg8E" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/04/powershell-and-dfsr/comment-page-1/#comment-445</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell – Recursive Group Membership by Maria</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/yxeTuG9vULc/</link>
		<dc:creator>Maria</dc:creator>
		<pubDate>Mon, 26 Oct 2009 16:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=146#comment-441</guid>
		<description>No there is no issue. I understand what will be needed – I have done something similar in VBS. I agree that to handle circular references properly I would need to keep a list of group names that have already been processed (we have cross-domain nesting so I would need to keep the distinguished names). I do not yet have much powershell experience and I was just being lazy, hoping that you might already have a script that handles circular references. Your nice clean script will be more than enough to get me started. It will be the errohandling/retrying and testing that will take the time. So far I have only been experimenting; I am not even allowed to invoke PS1 files and everything has to be pasted into the PS window. Thanks again</description>
		<content:encoded><![CDATA[<p>No there is no issue. I understand what will be needed – I have done something similar in VBS. I agree that to handle circular references properly I would need to keep a list of group names that have already been processed (we have cross-domain nesting so I would need to keep the distinguished names). I do not yet have much powershell experience and I was just being lazy, hoping that you might already have a script that handles circular references. Your nice clean script will be more than enough to get me started. It will be the errohandling/retrying and testing that will take the time. So far I have only been experimenting; I am not even allowed to invoke PS1 files and everything has to be pasted into the PS window. Thanks again</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/yxeTuG9vULc" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/08/powershell-recursive-group-membership/comment-page-1/#comment-441</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell – Recursive Group Membership by Maria</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/xK6iffdyEKc/</link>
		<dc:creator>Maria</dc:creator>
		<pubDate>Mon, 26 Oct 2009 16:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=146#comment-440</guid>
		<description>&lt;a href="#comment-429" rel="nofollow"&gt;@Mark A. Weaver  &lt;/a&gt; 
No there is no issue. I have a fair idea of what's involved for recursion - I have done something similar in VBS. I keep the nesting level on the stack with a limit of 10 as a safety net. I agree that to handle circular references properly  I would need to keep a list of group names (we have cross-domain nesting so I would need to keep the distinguished names). I do not yet have much powershell experience and I was just being lazy, hoping that you might already have a recursive script. Your nice clean script will be more than enough to get me started. It will be the errohandling/retrying and testing that will take the time. So far I have only been experimenting; I am not even allowed to invoke PS1 files and everything has to be pasted into the PS window. Thanks again
== Maria</description>
		<content:encoded><![CDATA[<p><a href="#comment-429" rel="nofollow">@Mark A. Weaver  </a><br />
No there is no issue. I have a fair idea of what&#8217;s involved for recursion &#8211; I have done something similar in VBS. I keep the nesting level on the stack with a limit of 10 as a safety net. I agree that to handle circular references properly  I would need to keep a list of group names (we have cross-domain nesting so I would need to keep the distinguished names). I do not yet have much powershell experience and I was just being lazy, hoping that you might already have a recursive script. Your nice clean script will be more than enough to get me started. It will be the errohandling/retrying and testing that will take the time. So far I have only been experimenting; I am not even allowed to invoke PS1 files and everything has to be pasted into the PS window. Thanks again<br />
== Maria</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/xK6iffdyEKc" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/08/powershell-recursive-group-membership/comment-page-1/#comment-440</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell and DFSR by Mark A. Weaver</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/mz9djDyhFkA/</link>
		<dc:creator>Mark A. Weaver</dc:creator>
		<pubDate>Thu, 15 Oct 2009 23:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=126#comment-434</guid>
		<description>Sharon,
 Do your replication groups or replicated folder names have spaces in them? 
 There was a change made that put quotes around the replication groups and folder names.  Please see the previous comments to make sure you have this.

I probably need to do some more error checking to make sure no false-positives are generated.
 
-- Mark</description>
		<content:encoded><![CDATA[<p>Sharon,<br />
 Do your replication groups or replicated folder names have spaces in them?<br />
 There was a change made that put quotes around the replication groups and folder names.  Please see the previous comments to make sure you have this.</p>
<p>I probably need to do some more error checking to make sure no false-positives are generated.</p>
<p>&#8211; Mark</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/mz9djDyhFkA" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/04/powershell-and-dfsr/comment-page-1/#comment-434</feedburner:origLink></item>
	<item>
		<title>Comment on Powershell and DFSR by Sharon</title>
		<link>http://feedproxy.google.com/~r/CommentsForVmweavercom/~3/_CChNbaj9l4/</link>
		<dc:creator>Sharon</dc:creator>
		<pubDate>Thu, 15 Oct 2009 16:27:04 +0000</pubDate>
		<guid isPermaLink="false">http://vmweaver.com/?p=126#comment-432</guid>
		<description>Mark,
I was very pleased to find this script and see others have had success in its implementation.  I have scheduled this script to run on our hub dfsr servers and I see the check-dfsr events in the eventlog.  I have left the backlogerrorlevel at the default value of 10.  The problem I am having is it is only reporting 9500 events and indicating all of the replication group connections are in sync with 0 backlog even when there are really backlogs greater than 100 (verified by running the dfsrdiag backlog manually).  Do you have any ideas of what could cause the script to report incorrectly?  

Any ideas would really be appreciated,
Thank you,
Sharon</description>
		<content:encoded><![CDATA[<p>Mark,<br />
I was very pleased to find this script and see others have had success in its implementation.  I have scheduled this script to run on our hub dfsr servers and I see the check-dfsr events in the eventlog.  I have left the backlogerrorlevel at the default value of 10.  The problem I am having is it is only reporting 9500 events and indicating all of the replication group connections are in sync with 0 backlog even when there are really backlogs greater than 100 (verified by running the dfsrdiag backlog manually).  Do you have any ideas of what could cause the script to report incorrectly?  </p>
<p>Any ideas would really be appreciated,<br />
Thank you,<br />
Sharon</p>
<img src="http://feeds.feedburner.com/~r/CommentsForVmweavercom/~4/_CChNbaj9l4" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://vmweaver.com/index.php/2009/04/powershell-and-dfsr/comment-page-1/#comment-432</feedburner:origLink></item>
</channel>
</rss>
