Configure Email Signature in Outlook using PowerShell

This commit is contained in:
AdminDroid 2024-08-01 19:16:20 +05:30
parent 0c2d1ebfb7
commit 805f83c6c3

View File

@ -228,7 +228,7 @@ function Get-UsersForAssignSignature
{ {
$Headers = (Import-Csv -Path $Path | Get-Member -MemberType NoteProperty).Name $Headers = (Import-Csv -Path $Path | Get-Member -MemberType NoteProperty).Name
$UsersCollection = Import-Csv -Path $Path | Select-Object -Property UserPrincipalName | Sort-Object -Property UserPrincipalName -Unique -ErrorAction Stop $UsersCollection = Import-Csv -Path $Path | Select-Object -Property UserPrincipalName | Sort-Object -Property UserPrincipalName -Unique -ErrorAction Stop
if ('UserPrincipalName' -in $Headers -and $UsersCollection.count -gt 1) if ('UserPrincipalName' -in $Headers -and $UsersCollection.count -ge 1)
{ {
$Output = $Output + "to $($UsersCollection.count) users in the CSV file..." $Output = $Output + "to $($UsersCollection.count) users in the CSV file..."
Write-Host $Output Write-Host $Output