header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Group List Verification
Last Post 18 Jun 2008 07:29 PM by valdezdj. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
TimParkerUser is Offline
New Member
New Member
Posts:4
Avatar

--
09 Jun 2008 08:59 PM  

I am working on what I thought would be a simple script to grab a few items from a Security or Distribution group in AD and email the "manager" for verification of its members. I have come up with the following and am apparently missing something the concatenation of the information. I can pull what I need just fine to compose my email but can't seem to get my message body and the members of the list together. The email comes through fine, but without the list. What am I missing?!? I have included the code for everything but the email sending as it works.

TIA. 

$mgr= (get-qadgroup $list).directoryentry.managedby | get-qaduser | select name, email = get-qadgroupmember $list | select Name = "The following people are currently members of [$list] that you are currently listed as the manager.`

$message

 

= $message + $members

$list = "QA Mailing List"

 

$members

$message = "Please check the list to make sure that all members are current. If anyone is missing, please contact the MIS department to have them added."

TimParkerUser is Offline
New Member
New Member
Posts:4
Avatar

--
09 Jun 2008 09:01 PM  
Well it looks like my formatting got all whacked. I just tried to edit it and messed it up a bit more. I hope someone can still help.
valdezdjUser is Offline
New Member
New Member
Posts:62

--
18 Jun 2008 07:29 PM  
Add-PSSnapin Quest.ActiveRoles.ADManagement
Write-Host

$list = 'groupname'

$email = get-qadgroupmember $list

$message1 = "The following people are currently members of $list that you are currently listed as the manager."

$message1
Write-Host


$mgr = (get-qadgroup $list).directoryentry.managedby|ft firstname -auto #|select displayname

$members = get-qadgroupmember $list | select displayname

$mgr

$members

$message2 = 'Please check the list to make sure that all members are current. If anyone is missing, please contact the MIS department to have them added.'

$message = $message2 + $members
Write-Host `r
$message
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer