What I have I've never done this before but my boss gave me a hint how to go about this..but im still confused..can anyone help me out
enter code here$a = get-aduser -filter * -SearchBase 'OU=_Users,OU=Head Office,OU=1_A,OU=1_Oceania,OU=L,DC=l,DC=global' -SearchScope OneLevel -Properties employeeId,pager | Select name,EMPLOYEEid,PAGER | Where-Object -Property EmployeeId -EQ $null| Out-GridView
FOREACH ($B IN $A) {if (($B.pager-ne $null) -AND ($B.EmployeeID -eq $null)) {
$emp_Email = ''
$emp_Name = ''
$emp_Job = ''
$emp_Company = ''
$emp_Mobile = ''
$emp_DirectPhone= ''
$emp_empyloeeID = ''
$emp_mainnumber= ''
$emp_url=''
$emp_from=''
Hi <<UserName>>,
On the Jan 20th a new email sign software will be installed. This will standardize all email signs across all devices. Please check the below to ensure the details are correct. If there is missing data please reply to this email to have this addressed:
Name: <<Name>>
EmployeeId : <<EmpId>>
Job Title: <<Position>>
Company: <<Company>>
Mobile : <<Mobile>>
Direct Land Line: <<Direct>>
Main Number: <<Telephone>>
URL: <<URL>>
Please note that if some of the fields provided are empty do not panic the fields will be filled in.
}
}
I'm guessing the properties to use for the labels you give them in your code, but you could build on this.
It uses Here-Strings, ConvertTo-Html and Splatting
Of course, try this out on a dummy user first and make sure the email is sent to yourself to test the result.