mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 10:45:52 +03:00
[GH-ISSUE #85] Getting MSAL token not working on Windows Server 2016 #31
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @halatovic on GitHub (Aug 25, 2023).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/85
Hello Markus,
we have deployed your script in organisation and it works fine on Windows 10/11 computers running Outlook. However, the organisation has RDSH terminal server running Windows Server 2016 and script is not working on the server. It throws error: Get-MsalToken : An error occurred while sending the request. I have checked and tried all troubleshooting hints given in error message but issue remains. Furthermore, I did script run on other servers running Windows Server 2016 and it throws same error. I have tried script on Windows Server 2019 machines and it worked fine just like on Windows 10/11 machines.
Best Regards
Haris Alatovic
@GruberMarkus commented on GitHub (Aug 25, 2023):
Hi @halatovic,
Please run the script with the '-verbose' parameter and provide the full output as text file.
@halatovic commented on GitHub (Aug 25, 2023):
Hello Markus,
I have attached output.txt file. In addition I have noticed that on Windows Server 2016 machine default browser does not start and no O365 authentication happen.
Best Regards
Haris
From: Markus Gruber @.>
Sent: Friday, August 25, 2023 5:37 PM
To: GruberMarkus/Set-OutlookSignatures @.>
Cc: Haris Alatovic @.>; Mention @.>
Subject: Re: [GruberMarkus/Set-OutlookSignatures] Getting MSAL token not working on Windows Server 2016 (Issue #85)
[EXTERNE E-MAIL]
Hi @halatovichttps://github.com/halatovic,
Please run the script with the '-verbose' parameter and provide the full output as text file.
—
Reply to this email directly, view it on GitHubhttps://github.com/GruberMarkus/Set-OutlookSignatures/issues/85#issuecomment-1693555084, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHAISOQPBPWKY5H6LG2L2FDXXDBEPANCNFSM6AAAAAA36PDCLY.
You are receiving this because you were mentioned.Message ID: @.***>
ALTEN Consulting Services GmbH
Geschäftsführer: Dr. Matthias Göhner, Sandra Berger | Prokurist: Gabriele Lipfert
Sitz der Gesellschaft: München
Amtsgericht München HRB 285726
Diese Mitteilung ist ausschließlich für den beabsichtigten Empfänger bestimmt. Sie kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Jede(r) unberechtigte Gebrauch, Kopie, Weitergabe oder Veröffentlichung ist untersagt. Sollten Sie diese E-Mail irrtümlich erhalten haben, benachrichtigen Sie uns bitte sofort durch Antwortmail und löschen Sie diese E-Mail nebst etwaigen Anlagen und einschließlich aller angefertigten Kopien von Ihrem System.
Wir nehmen den Schutz Ihrer Daten ernst. Bitte informieren Sie sich unter https://www.alten-consulting.de/service/datenschutz über den Datenschutz bei uns.
This message is for the sole use of the intended recipient(s) and may contain trade secrets or other confidential and privileged information. Any unauthorized review, use, copy, disclosure or distribution is prohibited. If you are not the intended recipient, please inform us immediately by reply e-mail and delete this message including any attachment or copies thereof from your system.
We take the protection of your personal data seriously. Please find additional information at https://www.alten-consulting.de/service/datenschutz
PS Microsoft.PowerShell.Core\FileSystem::\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures> . \osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\Set-OutlookSignatures.ps1 -UseHtmTemplates true -SetCurr
entUserOutlookWebSignature true -SetCurrentUserOOFMessage false -SignatureTemplatePath '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\templates\Signatures HTML' -SignaturesForAutomappedAndAdditionalMailboxes
true -SignatureIniPath '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\templates\Signatures HTML_Signatures.ini' -GraphOnly true -Verbose
Start script @2023-08-25T18:03:44+02:00@
Script notes @2023-08-25T18:03:44+02:00@
Script : Set-OutlookSignatures
Version: v3.6.1
Web : https://github.com/GruberMarkus/Set-OutlookSignatures
License: MIT license (see '.\docs\LICENSE.txt' for details and copyright)
Check parameters and script environment @2023-08-25T18:03:44+02:00@
PowerShell: '5.1.14393.5582', 'Desktop'
PowerShell bitness: 64-bit process on a 64-bit operating system
PowerShell parameters: '. \osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\Set-OutlookSignatures.ps1 -UseHtmTemplates true -SetCurrentUserOutlookWebSignature true -SetCurrentUserOOFMessage false -SignatureTem
platePath '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\templates\Signatures HTML' -SignaturesForAutomappedAndAdditionalMailboxes true -SignatureIniPath '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSi
gnatures\templates\Signatures HTML_Signatures.ini' -GraphOnly true -Verbose'
Script path: '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\Set-OutlookSignatures.ps1'
TrustsToCheckForGroups: ''
IncludeMailboxForestDomainLocalGroups: 'False'
SignatureTemplatePath: '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\templates\Signatures HTML'
SignatureIniPath: '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\templates\Signatures HTML_Signatures.ini'
VERBOSE: Original ini content
VERBOSE: # This sample ini file covers all signatures in the '.\templates\Signatures DOCX' folder
VERBOSE: #
VERBOSE: # If you want to give template creators control over the ini file, place it in the same folder as the templates
VERBOSE:
VERBOSE: # Comments can start with '#' or ';'
VERBOSE: ; Whitespace(s) at the beginning and the end of a line are ignored
VERBOSE: # Empty lines are ignored
VERBOSE:
VERBOSE:
VERBOSE: # Step 1: Put file names with extensions in square brackets
VERBOSE: # Example: [Company external English formal.htm]
VERBOSE: # Putting file names in single or double quotes is possible, but not necessary
VERBOSE: # File names are case insensitive
VERBOSE: # [file a.htm] is the same as ["File A.htm"] and ['fILE a.htm']
VERBOSE: # When there are two or more sections for a filename:
VERBOSE: # The keys and values are not combined, each section is considered individually (SortCulture and SortOrder still apply).
VERBOSE: # File names not mentioned in this file are not considered,
VERBOSE: # even if they are available in the file system.
VERBOSE: # Step 2: Add tags in the lines below the filename
VERBOSE: # Example: defaultNew
VERBOSE: # Do not enclose tags in square brackets.
VERBOSE: # This is not allowed here, but required when you add tags directly to file names.
VERBOSE: # When this ini file is used, tags in file names are not considered as tags
VERBOSE: # but as part of the file name, so the Outlook signature name will contain them.
VERBOSE: # Only one tag per line is allowed
VERBOSE: # Adding not a single tag to file name section is valid.
VERBOSE: # The signature template is then classified as a common template.
VERBOSE: # Putting file names in single or double quotes is possible, but not necessary
VERBOSE: # Tags are case insensitive
VERBOSE: # defaultNew is the same as "DefaultNew" and 'dEFAULTnEW'
VERBOSE: # You can override the automatic Outlook signature name generation by setting OutlookSignatureName
VERBOSE: # With this option, you can have different template file names for the same Outlook signature name
VERBOSE: # Search for "Marketing external English formal" in this file for examples
VERBOSE: # Take care of signature group priorities (common, group, e-mail address) and SortOrder parameter
VERBOSE: # Step 3: Remove the tags from the file names in the file system
VERBOSE: # Else, the file names in the ini file and the file system do not match,
VERBOSE: # which will result in some templates not being applied.
VERBOSE: # It is recommended to create a copy of your template folder for tests
VERBOSE: # Step 4: Make the script use this ini file by passing the 'SignatureIniPath' parameter
VERBOSE:
VERBOSE:
VERBOSE: []
VERBOSE: # This is a special section, using an identifier that is not valid as a file name.
VERBOSE:
VERBOSE: # SortOrder
VERBOSE: # Define the application order of templates within each template group (common, group specific, mailbox specific)
VERBOSE: # The templates are applied from the first to the last entry of the sorted list
VERBOSE: # Example:
VERBOSE: # An ini file with the following content
VERBOSE: # [a.htm]
VERBOSE: # defaultNew
VERBOSE: # [c.htm]
VERBOSE: # defaultNew
VERBOSE: # [b.htm]
VERBOSE: # defaultNew
VERBOSE: # results in the following final defaultNew signature:
VERBOSE: # Ascending: c.htm
VERBOSE: # Descending: a.htm
VERBOSE: # AsInThisFile: b.htm
VERBOSE: # Default: Ascending
VERBOSE: # Possible values: Ascending, asc, up, Descending, desc, down, AsInThisFile
VERBOSE: SortOrder = Ascending
VERBOSE:
VERBOSE: # SortCulture
VERBOSE: # Define the culture used to sort the file list
VERBOSE: # Default: empty (system default)
VERBOSE: #
VERBOSE: # Sort order differences
VERBOSE: # Samples taken from https://flylib.com/books/en/3.147.1.80/1/
VERBOSE: # LCID list: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f
VERBOSE: # Strings to sort: 'a', 'z', 'ä', 'Æ', 'ch', 'h', 'i', '¥', ''
VERBOSE: # de-AT: , ¥, a, ä, Æ, ch, h, i, z
VERBOSE: # sv-SE: , ¥, a, Æ, ch, h, i, z, ä
VERBOSE: # da-DK: , ¥, a, ch, h, i, z, Æ, ä
VERBOSE: # cs-CZ: , ¥, a, ä, Æ, h, ch, i, z
VERBOSE: # en-US: , ¥, a, ä, Æ, ch, h, i, z
VERBOSE: # en-GB: , ¥, a, ä, Æ, ch, h, i, z
VERBOSE: # zh-CN: , ¥, a, ä, Æ, ch, h, i, z
VERBOSE: # ru-RU: , ¥, a, ä, Æ, ch, h, i, z
VERBOSE: # ja-JP: ¥, , a, ä, Æ, ch, h, i, z
VERBOSE: SortCulture =
VERBOSE:
VERBOSE: [ACS_Signaturvorlage.htm]
VERBOSE: defaultNew
VERBOSE: defaultReplyFwd
VERBOSE: Parsed ini content
VERBOSE: Ini index #: '0'
VERBOSE: Tags: [SortOrder = Ascending] [ = ] [SortCulture]
VERBOSE: Ini index #: '1'
VERBOSE: Tags: [ = ACS_Signaturvorlage.htm] [defaultReplyFwd] [defaultNew]
SetCurrentUserOutlookWebSignature: 'true'
SetCurrentUserOOFMessage: 'false'
UseHtmTemplates: 'true'
GraphOnly: 'true'
GraphConfigFile: '.\config\default graph config.ps1'
VERBOSE: # This file allows defining the default configuration for connecting to Microsoft Graph for Set-OutlookSignatures
VERBOSE: #
VERBOSE: # This script is executed as a whole once per Set-OutlookSignatures run.
VERBOSE: #
VERBOSE: # Attention: The configuration file is executed as part of Set-OutlookSignatures.ps1 and is not checked for any harmful content. Please only allow qualified technicians write access to this file, only use it to
to define replacement variables and test it thoroughly.
VERBOSE: #
VERBOSE: # Active Directory property names are case sensitive.
VERBOSE: # It is required to use full lowercase Active Directory property names.
VERBOSE: #
VERBOSE: # A variable defined in this file overrides the definition of the same variable defined earlier in the script.
VERBOSE: #
VERBOSE: #
VERBOSE: # What is the recommended approach for custom configuration files?
VERBOSE: # You should not change the default configuration file
'.\config\default graph config.ps1', as it might be changed in a future release of Set-OutlookSignatures. In this case, you would have to sort out thechanges yourself.
VERBOSE: #
VERBOSE: # The following steps are recommended:
VERBOSE: # 1. Create a new custom configuration file in a separate folder.
VERBOSE: # 2. The first step in the new custom configuration file should be to load the default configuration file:
VERBOSE: # # Loading default replacement variables shipped with Set-OutlookSignatures
VERBOSE: # . ([System.Management.Automation.ScriptBlock]::Create((Get-Content -LiteralPath $(Join-Path -Path $(Get-Location).path -ChildPath '\config\default graph config.ps1') -Raw)))
VERBOSE: # 3. After importing the default configuration file, existing configurations and mappings can be altered with custom definitions and new ones can be added.
VERBOSE: # 4. Instead of altering existing replacement variables, it is recommended to create new replacement variables with modified content.
VERBOSE: # 5. Start Set-OutlookSignatures with the parameter 'GraphConfigFile' pointing to the new custom configuration file.
VERBOSE:
VERBOSE:
VERBOSE: # Client ID
VERBOSE: # The default client ID is defined in the developer's Azure tenant as multi-tenant, so it can be used everywhere
VERBOSE: # Can be replaced with a Client ID from the own tenant
VERBOSE: # Scopes (please provide admin consent): 'https://graph.microsoft.com/openid', 'https://graph.microsoft.com/email', 'https://graph.microsoft.com/profile', 'https://graph.microsoft.com/user.read.all',
'https://graph.microsoft.com/group.read.all', 'https://graph.microsoft.com/mailboxsettings.readwrite', 'https://graph.microsoft.com/EWS.AccessAsUser.All'
VERBOSE: # Redirect URI: 'http://localhost', configure for "mobile and desktop applications"
VERBOSE: # Enable 'Allow public client flows' to make Windows Integrated Authentication (SSO) work for Azure AD joined devices
VERBOSE: $GraphClientID = 'f3ecbb0e-1718-4b2d-84f2-2c32ccb76464'
VERBOSE:
VERBOSE:
VERBOSE: # Endpoint version
VERBOSE: $GraphEndpointVersion = 'v1.0'
VERBOSE:
VERBOSE:
VERBOSE: # User properties to select
VERBOSE: # Custom Graph attributes: 'extension_'
VERBOSE: $GraphUserProperties = @(
VERBOSE: 'aboutMe',
VERBOSE: 'businessPhones',
VERBOSE: 'city',
VERBOSE: 'companyName',
VERBOSE: 'country',
VERBOSE: 'department',
VERBOSE: 'displayName',
VERBOSE: 'faxNumber',
VERBOSE: 'givenName',
VERBOSE: 'jobTitle',
VERBOSE: 'mail',
VERBOSE: 'mailNickname',
VERBOSE: 'mobilePhone',
VERBOSE: 'officeLocation',
VERBOSE: 'onPremisesDistinguishedName',
VERBOSE: 'onPremisesDomainName',
VERBOSE: 'onPremisesExtensionAttributes',
VERBOSE: 'onPremisesImmutableId',
VERBOSE: 'onPremisesSamAccountName',
VERBOSE: 'onPremisesSecurityIdentifier',
VERBOSE: 'onPremisesUserPrincipalName',
VERBOSE: 'postalCode',
VERBOSE: 'proxyAddresses',
VERBOSE: 'state',
VERBOSE: 'StreetAddress',
VERBOSE: 'surname',
VERBOSE: 'usageLocation',
VERBOSE: 'userPrincipalName',
VERBOSE: 'extension_cd4df1f0831e4f25a2c68e5bed189756_personalTitle'
VERBOSE: )
VERBOSE:
VERBOSE:
VERBOSE: # Mapping Graph user properties to on-prem Active Directory user properties
VERBOSE: # This way, we do not need to differentiate between on-prem, hybrid and cloud in '.\config\default replacement variables.ps1'
VERBOSE: # Active Directory attribute names on the left, Graph attribute names on the right
VERBOSE: # Custom Graph attributes: 'extension_'
VERBOSE: $GraphUserAttributeMapping = @{
VERBOSE: givenname = 'givenName'
VERBOSE: sn = 'surname'
VERBOSE: department = 'department'
VERBOSE: title = 'jobTitle'
VERBOSE: StreetAddress = 'StreetAddress'
VERBOSE: postalcode = 'postalCode'
VERBOSE: l = 'city'
VERBOSE: co = 'country'
VERBOSE: telephonenumber = 'businessPhones'
VERBOSE: facsimiletelephonenumber = 'faxNumber'
VERBOSE: mobile = 'mobilePhone'
VERBOSE: mail = 'mail'
VERBOSE: extensionattribute1 = 'onPremisesExtensionAttributes.extensionAttribute1'
VERBOSE: extensionattribute2 = 'onPremisesExtensionAttributes.extensionAttribute2'
VERBOSE: extensionattribute3 = 'onPremisesExtensionAttributes.extensionAttribute3'
VERBOSE: extensionattribute4 = 'onPremisesExtensionAttributes.extensionAttribute4'
VERBOSE: extensionattribute5 = 'onPremisesExtensionAttributes.extensionAttribute5'
VERBOSE: extensionattribute6 = 'onPremisesExtensionAttributes.extensionAttribute6'
VERBOSE: extensionattribute7 = 'onPremisesExtensionAttributes.extensionAttribute7'
VERBOSE: extensionattribute8 = 'onPremisesExtensionAttributes.extensionAttribute8'
VERBOSE: extensionattribute9 = 'onPremisesExtensionAttributes.extensionAttribute9'
VERBOSE: extensionattribute10 = 'onPremisesExtensionAttributes.extensionAttribute10'
VERBOSE: extensionattribute11 = 'onPremisesExtensionAttributes.extensionAttribute11'
VERBOSE: extensionattribute12 = 'onPremisesExtensionAttributes.extensionAttribute12'
VERBOSE: extensionattribute13 = 'onPremisesExtensionAttributes.extensionAttribute13'
VERBOSE: extensionattribute14 = 'onPremisesExtensionAttributes.extensionAttribute14'
VERBOSE: extensionattribute15 = 'onPremisesExtensionAttributes.extensionAttribute15'
VERBOSE: objectsid = 'onPremisesSecurityIdentifier'
VERBOSE: distinguishedname = 'onPremisesDistinguishedName'
VERBOSE: company = 'companyName'
VERBOSE: displayname = 'displayName'
VERBOSE: proxyAddresses = 'proxyAddresses'
VERBOSE: userprincipalname = 'userPrincipalName'
VERBOSE: physicaldeliveryofficename = 'officeLocation'
VERBOSE: mailboxsettings = 'mailboxsettings'
VERBOSE: mailnickname = 'mailNickname'
VERBOSE: st = 'state'
VERBOSE: personalTitle = 'extension_cd4df1f0831e4f25a2c68e5bed189756_personalTitle'
VERBOSE: }
GraphCredentialFile: ''
ReplacementVariableConfigFile: '.\config\default replacement variables.ps1'
VERBOSE: # This file allows defining custom replacement variables for Set-OutlookSignatures
VERBOSE: #
VERBOSE: # This script is executed as a whole once for each mailbox.
VERBOSE: # It allows for complex replacement variable handling (complex string transformations, retrieving information from web services and databases, etc.).
VERBOSE: #
VERBOSE: # Attention: The configuration file is executed as part of Set-OutlookSignatures.ps1 and is not checked for any harmful content. Please only allow qualified technicians write access to this file, only use it to
to define replacement variables and test it thoroughly.
VERBOSE: #
VERBOSE: # Replacement variable names are case sensitive.
VERBOSE: # It is required to use full uppercase replacement variable names.
VERBOSE: #
VERBOSE: # Active Directory property names are case sensitive.
VERBOSE: # It is required to use full lowercase Active Directory property names.
VERBOSE: #
VERBOSE: # A variable defined in this file overrides the definition of the same variable defined earlier in the script.
VERBOSE: #
VERBOSE: #
VERBOSE: # What is the recommended approach for custom configuration files?
VERBOSE: # You should not change the default configuration file
'.\config\default replacement variable.ps1', as it might be changed in a future release of Set-OutlookSignatures. In this case, you would have to sort outthe changes yourself.
VERBOSE: #
VERBOSE: # The following steps are recommended:
VERBOSE: # 1. Create a new custom configuration file in a separate folder.
VERBOSE: # 2. The first step in the new custom configuration file should be to load the default configuration file:
VERBOSE: # # Loading default replacement variables shipped with Set-OutlookSignatures
VERBOSE: # . ([System.Management.Automation.ScriptBlock]::Create((Get-Content -LiteralPath $(Join-Path -Path $(Get-Location).path -ChildPath '\config\default replacement variables.ps1') -Raw)))
VERBOSE: # 3. After importing the default configuration file, existing replacement variables can be altered with custom definitions and new replacement variables can be added.
VERBOSE: # 4. Instead of altering existing replacement variables, it is recommended to create new replacement variables with modified content.
VERBOSE: # 5. Start Set-OutlookSignatures with the parameter 'ReplacementVariableConfigFile' pointing to the new custom configuration file.
VERBOSE:
VERBOSE:
VERBOSE: # Currently logged in user
VERBOSE: $ReplaceHash['$CURRENTUSERGIVENNAME$'] = [string]$ADPropsCurrentUser.givenname
VERBOSE: $ReplaceHash['$CURRENTUSERSURNAME$'] = [string]$ADPropsCurrentUser.sn
VERBOSE: $ReplaceHash['$CURRENTUSERDEPARTMENT$'] = [string]$ADPropsCurrentUser.department
VERBOSE: $ReplaceHash['$CURRENTUSERTITLE$'] = [string]$ADPropsCurrentUser.title
VERBOSE: $ReplaceHash['$CURRENTUSERPERSONALTITLE$'] = [string]$ADPropsCurrentUser.personaltitle
VERBOSE: $ReplaceHash['$CURRENTUSERSTREETADDRESS$'] = [string]$ADPropsCurrentUser.streetaddress
VERBOSE: $ReplaceHash['$CURRENTUSERPOSTALCODE$'] = [string]$ADPropsCurrentUser.postalcode
VERBOSE: $ReplaceHash['$CURRENTUSERLOCATION$'] = [string]$ADPropsCurrentUser.l
VERBOSE: $ReplaceHash['$CURRENTUSERCOUNTRY$'] = [string]$ADPropsCurrentUser.co
VERBOSE: $ReplaceHash['$CURRENTUSERSTATE$'] = [string]$ADPropsCurrentUser.st
VERBOSE: $ReplaceHash['$CURRENTUSERTELEPHONE$'] = [string]$ADPropsCurrentUser.telephonenumber
VERBOSE: $ReplaceHash['$CURRENTUSERFAX$'] = [string]$ADPropsCurrentUser.facsimiletelephonenumber
VERBOSE: $ReplaceHash['$CURRENTUSERMOBILE$'] = [string]$ADPropsCurrentUser.mobile
VERBOSE: $ReplaceHash['$CURRENTUSERMAIL$'] = [string]$ADPropsCurrentUser.mail
VERBOSE: $ReplaceHash['$CURRENTUSERPHOTO$'] = $ADPropsCurrentUser.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTUSERPHOTODELETEEMPTY$'] = $ADPropsCurrentUser.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR1$'] = [string]$ADPropsCurrentUser.extensionattribute1
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR2$'] = [string]$ADPropsCurrentUser.extensionattribute2
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR3$'] = [string]$ADPropsCurrentUser.extensionattribute3
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR4$'] = [string]$ADPropsCurrentUser.extensionattribute4
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR5$'] = [string]$ADPropsCurrentUser.extensionattribute5
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR6$'] = [string]$ADPropsCurrentUser.extensionattribute6
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR7$'] = [string]$ADPropsCurrentUser.extensionattribute7
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR8$'] = [string]$ADPropsCurrentUser.extensionattribute8
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR9$'] = [string]$ADPropsCurrentUser.extensionattribute9
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR10$'] = [string]$ADPropsCurrentUser.extensionattribute10
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR11$'] = [string]$ADPropsCurrentUser.extensionattribute11
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR12$'] = [string]$ADPropsCurrentUser.extensionattribute12
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR13$'] = [string]$ADPropsCurrentUser.extensionattribute13
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR14$'] = [string]$ADPropsCurrentUser.extensionattribute14
VERBOSE: $ReplaceHash['$CURRENTUSEREXTATTR15$'] = [string]$ADPropsCurrentUser.extensionattribute15
VERBOSE: $ReplaceHash['$CURRENTUSEROFFICE$'] = [string]$ADPropsCurrentUser.physicaldeliveryofficename
VERBOSE: $ReplaceHash['$CURRENTUSERCOMPANY$'] = [string]$ADPropsCurrentUser.company
VERBOSE: $ReplaceHash['$CURRENTUSERMAILNICKNAME$'] = [string]$ADPropsCurrentUser.mailnickname
VERBOSE: $ReplaceHash['$CURRENTUSERDISPLAYNAME$'] = [string]$ADPropsCurrentUser.displayname
VERBOSE:
VERBOSE:
VERBOSE: # Custom added replacement variables
VERBOSE: $ReplaceHash['$TELMOBILEROW_HIDDEN$'] = "
"
VERBOSE: $ReplaceHash['$TELMOBILEPOINT$'] = "•"
VERBOSE: $ReplaceHash['$DRTITLE$'] = ""
VERBOSE: $ReplaceHash['$CURRENTUSERSURNAME_UPPERCASE$'] = [string]$ADPropsCurrentUser.sn.ToUpper()
VERBOSE: if ([string]$ADPropsCurrentUser.mail -eq @.**")
VERBOSE: {
VERBOSE: $ReplaceHash['$DRTITLE$'] = "Dr. "
VERBOSE: }
VERBOSE: if ([string]$ADPropsCurrentUser.telephonenumber.length -eq 0)
VERBOSE: {
VERBOSE: $ReplaceHash['$TELTEXT$'] = ""
VERBOSE: $ReplaceHash['$TELMOBILEPOINT$'] = ""
VERBOSE: }
VERBOSE: else
VERBOSE: {
VERBOSE: $ReplaceHash['$TELTEXT$'] = "Tel. | "
VERBOSE: if ([string]$ADPropsCurrentUser.telephonenumber.SubString(0,3) -eq "+49")
VERBOSE: {
VERBOSE: $tel = [string]$ADPropsCurrentUser.telephonenumber
VERBOSE: #
VERBOSE: # For Muenchen, Berlin, Frankfurt and Hamburg
VERBOSE: #
VERBOSE: if (([string]$ADPropsCurrentUser.telephonenumber.SubString(3,2) -eq "89") -or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,2) -eq "30") -or
([string]$ADPropsCurrentUser.telephonenumber.SubString(3,2) -eq "69") -or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,2) -eq "40"))
VERBOSE: {
VERBOSE: $ReplaceHash['$CURRENTUSERTELEPHONE$'] = [string]$ADPropsCurrentUser.telephonenumber.SubString(0,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(3,2) + " " +
[string]$ADPropsCurrentUser.telephonenumber.SubString(5,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(8,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(11,$tel.Length-11)
VERBOSE: }
VERBOSE: #
VERBOSE: # For Dortmund, Hannover, Koeln, Mannheim, Nuernberg and Stuttgart
VERBOSE: #
VERBOSE: if (([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "421") -or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "231") -or
([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "511") -or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "221") -or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "621")
-or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "911") -or ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) -eq "711"))
VERBOSE: {
VERBOSE: $ReplaceHash['$CURRENTUSERTELEPHONE$'] = [string]$ADPropsCurrentUser.telephonenumber.SubString(0,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(3,3) + " " +
[string]$ADPropsCurrentUser.telephonenumber.SubString(6,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(9,$tel.Length-9)
VERBOSE: }
VERBOSE: #
VERBOSE: # Friedrichshafen
VERBOSE: #
VERBOSE: if ([string]$ADPropsCurrentUser.telephonenumber.SubString(3,4) -eq "7541")
VERBOSE: {
VERBOSE: $ReplaceHash['$CURRENTUSERTELEPHONE$'] = [string]$ADPropsCurrentUser.telephonenumber.SubString(0,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(3,4) + " " +
[string]$ADPropsCurrentUser.telephonenumber.SubString(7,3) + " " + [string]$ADPropsCurrentUser.telephonenumber.SubString(10,$tel.Length-10)
VERBOSE: }
VERBOSE: }
VERBOSE: }
VERBOSE: if ([string]$ADPropsCurrentUser.mobile.length -eq 0)
VERBOSE: {
VERBOSE: $ReplaceHash['$MOBILETEXT$'] = ""
VERBOSE: $ReplaceHash['$TELMOBILEPOINT$'] = ""
VERBOSE: }
VERBOSE: else
VERBOSE: {
VERBOSE: $ReplaceHash['$MOBILETEXT$'] = "Mobil | "
VERBOSE: if ([string]$ADPropsCurrentUser.mobile.SubString(0,3) -eq "+49")
VERBOSE: {
VERBOSE: $mob = [string]$ADPropsCurrentUser.mobile
VERBOSE: #
VERBOSE: # For three digits German mobile carrier codes
VERBOSE: #
VERBOSE: if (([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "160") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "170") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "171") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "175") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "162") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "172") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "173") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "174") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "163") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "177") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "178") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "176") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,3) -eq "179"))
VERBOSE: {
VERBOSE: $ReplaceHash['$CURRENTUSERMOBILE$'] = [string]$ADPropsCurrentUser.mobile.SubString(0,3) + " " + [string]$ADPropsCurrentUser.mobile.SubString(3,3) + " " + [string]$ADPropsCurrentUser.mobile.SubString(6,3) + " "
VERBOSE: }
VERBOSE: #
VERBOSE: # For four digits German mobile carrier codes
VERBOSE: #
VERBOSE: if (([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1511") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1512") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1514") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1515") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1516") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1517") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1520") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1522") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1523") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1525") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1526") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1529") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1521") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1573") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1575") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1577") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1578") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1570") -or
([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1579") -or ([string]$ADPropsCurrentUser.mobile.SubString(3,4) -eq "1590"))
VERBOSE: {
VERBOSE: $ReplaceHash['$CURRENTUSERMOBILE$'] = [string]$ADPropsCurrentUser.mobile.SubString(0,3) + " " + [string]$ADPropsCurrentUser.mobile.SubString(3,4) + " " + [string]$ADPropsCurrentUser.mobile.SubString(7,3) + " "
VERBOSE: }
VERBOSE: }
VERBOSE: }
VERBOSE: if (([string]$ADPropsCurrentUser.telephonenumber.length -eq 0) -and ([string]$ADPropsCurrentUser.mobile.length -eq 0))
VERBOSE: {
VERBOSE: $ReplaceHash['$TELMOBILEROW_HIDDEN$'] = ""
VERBOSE: $ReplaceHash['$TELTEXT$'] = ""
VERBOSE: $ReplaceHash['$MOBILETEXT$'] = ""
VERBOSE: $ReplaceHash['$TELMOBILEPOINT$'] = ""
VERBOSE: }
VERBOSE:
VERBOSE:
VERBOSE: # Manager of currently logged in user
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERGIVENNAME$'] = [string]$ADPropsCurrentUserManager.givenname
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERSURNAME$'] = [string]$ADPropsCurrentUserManager.sn
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERDEPARTMENT$'] = [string]$ADPropsCurrentUserManager.department
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERTITLE$'] = [string]$ADPropsCurrentUserManager.title
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERSTREETADDRESS$'] = [string]$ADPropsCurrentUserManager.streetaddress
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERPOSTALCODE$'] = [string]$ADPropsCurrentUserManager.postalcode
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERLOCATION$'] = [string]$ADPropsCurrentUserManager.l
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERCOUNTRY$'] = [string]$ADPropsCurrentUserManager.co
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERSTATE$'] = [string]$ADPropsCurrentUserManager.st
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERTELEPHONE$'] = [string]$ADPropsCurrentUserManager.telephonenumber
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERFAX$'] = [string]$ADPropsCurrentUserManager.facsimiletelephonenumber
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERMOBILE$'] = [string]$ADPropsCurrentUserManager.mobile
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERMAIL$'] = [string]$ADPropsCurrentUserManager.mail
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERPHOTO$'] = $ADPropsCurrentUserManager.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERPHOTODELETEEMPTY$'] = $ADPropsCurrentUserManager.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR1$'] = [string]$ADPropsCurrentUserManager.extensionattribute1
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR2$'] = [string]$ADPropsCurrentUserManager.extensionattribute2
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR3$'] = [string]$ADPropsCurrentUserManager.extensionattribute3
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR4$'] = [string]$ADPropsCurrentUserManager.extensionattribute4
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR5$'] = [string]$ADPropsCurrentUserManager.extensionattribute5
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR6$'] = [string]$ADPropsCurrentUserManager.extensionattribute6
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR7$'] = [string]$ADPropsCurrentUserManager.extensionattribute7
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR8$'] = [string]$ADPropsCurrentUserManager.extensionattribute8
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR9$'] = [string]$ADPropsCurrentUserManager.extensionattribute9
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR10$'] = [string]$ADPropsCurrentUserManager.extensionattribute10
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR11$'] = [string]$ADPropsCurrentUserManager.extensionattribute11
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR12$'] = [string]$ADPropsCurrentUserManager.extensionattribute12
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR13$'] = [string]$ADPropsCurrentUserManager.extensionattribute13
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR14$'] = [string]$ADPropsCurrentUserManager.extensionattribute14
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEREXTATTR15$'] = [string]$ADPropsCurrentUserManager.extensionattribute15
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGEROFFICE$'] = [string]$ADPropsCurrentUserManager.physicaldeliveryofficename
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERCOMPANY$'] = [string]$ADPropsCurrentUserManager.company
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERMAILNICKNAME$'] = [string]$ADPropsCurrentUserManager.mailnickname
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERDISPLAYNAME$'] = [string]$ADPropsCurrentUserManager.displayname
VERBOSE:
VERBOSE:
VERBOSE: # Current mailbox
VERBOSE: $ReplaceHash['$CURRENTMAILBOXGIVENNAME$'] = [string]$ADPropsCurrentMailbox.givenname
VERBOSE: $ReplaceHash['$CURRENTMAILBOXSURNAME$'] = [string]$ADPropsCurrentMailbox.sn
VERBOSE: $ReplaceHash['$CURRENTMAILBOXDEPARTMENT$'] = [string]$ADPropsCurrentMailbox.department
VERBOSE: $ReplaceHash['$CURRENTMAILBOXTITLE$'] = [string]$ADPropsCurrentMailbox.title
VERBOSE: $ReplaceHash['$CURRENTMAILBOXSTREETADDRESS$'] = [string]$ADPropsCurrentMailbox.streetaddress
VERBOSE: $ReplaceHash['$CURRENTMAILBOXPOSTALCODE$'] = [string]$ADPropsCurrentMailbox.postalcode
VERBOSE: $ReplaceHash['$CURRENTMAILBOXLOCATION$'] = [string]$ADPropsCurrentMailbox.l
VERBOSE: $ReplaceHash['$CURRENTMAILBOXCOUNTRY$'] = [string]$ADPropsCurrentMailbox.co
VERBOSE: $ReplaceHash['$CURRENTMAILBOXSTATE$'] = [string]$ADPropsCurrentMailbox.st
VERBOSE: $ReplaceHash['$CURRENTMAILBOXTELEPHONE$'] = [string]$ADPropsCurrentMailbox.telephonenumber
VERBOSE: $ReplaceHash['$CURRENTMAILBOXFAX$'] = [string]$ADPropsCurrentMailbox.facsimiletelephonenumber
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMOBILE$'] = [string]$ADPropsCurrentMailbox.mobile
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMAIL$'] = [string]$ADPropsCurrentMailbox.mail
VERBOSE: $ReplaceHash['$CURRENTMAILBOXPHOTO$'] = $ADPropsCurrentMailbox.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTMAILBOXPHOTODELETEEMPTY$'] = $ADPropsCurrentMailbox.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR1$'] = [string]$ADPropsCurrentMailbox.extensionattribute1
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR2$'] = [string]$ADPropsCurrentMailbox.extensionattribute2
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR3$'] = [string]$ADPropsCurrentMailbox.extensionattribute3
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR4$'] = [string]$ADPropsCurrentMailbox.extensionattribute4
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR5$'] = [string]$ADPropsCurrentMailbox.extensionattribute5
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR6$'] = [string]$ADPropsCurrentMailbox.extensionattribute6
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR7$'] = [string]$ADPropsCurrentMailbox.extensionattribute7
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR8$'] = [string]$ADPropsCurrentMailbox.extensionattribute8
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR9$'] = [string]$ADPropsCurrentMailbox.extensionattribute9
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR10$'] = [string]$ADPropsCurrentMailbox.extensionattribute10
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR11$'] = [string]$ADPropsCurrentMailbox.extensionattribute11
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR12$'] = [string]$ADPropsCurrentMailbox.extensionattribute12
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR13$'] = [string]$ADPropsCurrentMailbox.extensionattribute13
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR14$'] = [string]$ADPropsCurrentMailbox.extensionattribute14
VERBOSE: $ReplaceHash['$CURRENTMAILBOXEXTATTR15$'] = [string]$ADPropsCurrentMailbox.extensionattribute15
VERBOSE: $ReplaceHash['$CURRENTMAILBOXOFFICE$'] = [string]$ADPropsCurrentMailbox.physicaldeliveryofficename
VERBOSE: $ReplaceHash['$CURRENTMAILBOXCOMPANY$'] = [string]$ADPropsCurrentMailbox.company
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMAILNICKNAME$'] = [string]$ADPropsCurrentMailbox.mailnickname
VERBOSE: $ReplaceHash['$CURRENTMAILBOXDISPLAYNAME$'] = [string]$ADPropsCurrentMailbox.displayname
VERBOSE:
VERBOSE:
VERBOSE: # Manager of current mailbox
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERGIVENNAME$'] = [string]$ADPropsCurrentMailboxManager.givenname
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERSURNAME$'] = [string]$ADPropsCurrentMailboxManager.sn
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERDEPARTMENT$'] = [string]$ADPropsCurrentMailboxManager.department
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERTITLE$'] = [string]$ADPropsCurrentMailboxManager.title
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERSTREETADDRESS$'] = [string]$ADPropsCurrentMailboxManager.streetaddress
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERPOSTALCODE$'] = [string]$ADPropsCurrentMailboxManager.postalcode
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERLOCATION$'] = [string]$ADPropsCurrentMailboxManager.l
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERCOUNTRY$'] = [string]$ADPropsCurrentMailboxManager.co
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERSTATE$'] = [string]$ADPropsCurrentMailboxManager.st
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERTELEPHONE$'] = [string]$ADPropsCurrentMailboxManager.telephonenumber
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERFAX$'] = [string]$ADPropsCurrentMailboxManager.facsimiletelephonenumber
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERMOBILE$'] = [string]$ADPropsCurrentMailboxManager.mobile
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERMAIL$'] = [string]$ADPropsCurrentMailboxManager.mail
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERPHOTO$'] = $ADPropsCurrentMailboxManager.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERPHOTODELETEEMPTY$'] = $ADPropsCurrentMailboxManager.thumbnailphoto
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR1$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute1
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR2$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute2
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR3$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute3
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR4$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute4
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR5$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute5
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR6$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute6
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR7$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute7
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR8$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute8
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR9$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute9
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR10$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute10
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR11$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute11
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR12$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute12
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR13$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute13
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR14$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute14
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEREXTATTR15$'] = [string]$ADPropsCurrentMailboxManager.extensionattribute15
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGEROFFICE$'] = [string]$ADPropsCurrentMailboxManager.physicaldeliveryofficename
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERCOMPANY$'] = [string]$ADPropsCurrentMailboxManager.company
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERMAILNICKNAME$'] = [string]$ADPropsCurrentMailboxManager.mailnickname
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERDISPLAYNAME$'] = [string]$ADPropsCurrentMailboxManager.displayname
VERBOSE:
VERBOSE:
VERBOSE: #
CURRENTUSERNAMEWITHTITLES,CURRENTUSERMANAGERNAMEWITHTITLESVERBOSE: #
CURRENTMAILBOXNAMEWITHTITLES,CURRENTMAILBOXMANAGERNAMEWITHTITLESVERBOSE: # Academic titles according to standards in German speaking countries
VERBOSE: # <custom AD attribute 'svstitelvorne'> <standard AD attribute 'givenname'> <standard AD attribute 'surname'>, <custom AD attribute 'svstitelhinten'>
VERBOSE: # If one or more attributes are not set, unnecessary whitespaces and commas are avoided by using '-join'
VERBOSE: # Examples:
VERBOSE: # Mag. Dr. John Doe, BA MA PhD
VERBOSE: # Dr. John Doe
VERBOSE: # John Doe, PhD
VERBOSE: # John Doe
VERBOSE: $ReplaceHash['$CURRENTUSERNAMEWITHTITLES$'] = (((((([string]$ADPropsCurrentUser.svstitelvorne, [string]$ADPropsCurrentUser.givenname, [string]$ADPropsCurrentUser.sn) | Where-Object { $_ -ne '' }) -join ' '),
[string]$ADPropsCurrentUser.svstitelhinten) | Where-Object { $_ -ne '' }) -join ', ')
VERBOSE: $ReplaceHash['$CURRENTUSERMANAGERNAMEWITHTITLES$'] = (((((([string]$ADPropsCurrentUserManager.svstitelvorne, [string]$ADPropsCurrentUserManager.givenname, [string]$ADPropsCurrentUserManager.sn) | Where-Object {
$_ -ne '' }) -join ' '), [string]$ADPropsCurrentUserManager.svstitelhinten) | Where-Object { $_ -ne '' }) -join ', ')
VERBOSE: $ReplaceHash['$CURRENTMAILBOXNAMEWITHTITLES$'] = (((((([string]$ADPropsCurrentMailbox.svstitelvorne, [string]$ADPropsCurrentMailbox.givenname, [string]$ADPropsCurrentMailbox.sn) | Where-Object { $_ -ne '' })
-join ' '), [string]$ADPropsCurrentMailbox.svstitelhinten) | Where-Object { $_ -ne '' }) -join ', ')
VERBOSE: $ReplaceHash['$CURRENTMAILBOXMANAGERNAMEWITHTITLES$'] = (((((([string]$ADPropsCurrentMailboxManager.svstitelvorne, [string]$ADPropsCurrentMailboxManager.givenname, [string]$ADPropsCurrentMailboxManager.sn) |
Where-Object { $_ -ne '' }) -join ' '), [string]$ADPropsCurrentMailboxManager.svstitelhinten) | Where-Object { $_ -ne '' }) -join ', ')
EmbedImagesInHtml: 'True'
CreateRtfSignatures: 'True'
CreateTxtSignatures: 'True'
DocxHighResImageConversion: 'True'
DeleteUserCreatedSignatures: 'False'
DeleteScriptCreatedSignaturesWithoutTemplate: 'True'
SignaturesForAutomappedAndAdditionalMailboxes: 'true'
AdditionalSignaturePath: 'C:\Users\halatovic\Outlook Signatures'
SimulateUser: ''
SimulateMailboxes: ''
Get basic Outlook and Word information @2023-08-25T18:03:45+02:00@
Outlook
Registry version: 16.0
File version: 16.0.16626.20170
Bitness: x64
Default profile: Outlook
Is C2R Beta: False
DisableRoamingSignaturesTemporaryToggle: 0
Word
Registry version: 16.0
File version: 16.0.16626.20170
Bitness: x64
Get Outlook signature file path(s) @2023-08-25T18:03:45+02:00@
C:\Users\halatovic\AppData\Roaming\Microsoft\Signatures
Get e-mail addresses from Outlook profiles and corresponding registry paths @2023-08-25T18:03:45+02:00@
HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000002
@.***
VERBOSE: /O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=13D67167F9474661B3FC34AD447C670D-HALATOVIC
Enumerate domains @2023-08-25T18:03:46+02:00@
Parameter GraphOnly set to 'True', ignore user's Active Directory in favor of Graph/Azure AD.
Get AD properties of currently logged in user and assigned manager @2023-08-25T18:03:46+02:00@
Currently logged in user
Set up environment for connection to Microsoft Graph @2023-08-25T18:03:46+02:00@
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps\msal.ps.psd1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Assert-DirectoryExists.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Assert-DirectoryExists.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\ConvertFrom-SecureStringAsPlainText.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\ConvertFrom-SecureStringAsPlainText.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\ConvertTo-Dictionary.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\ConvertTo-Dictionary.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Export-Config.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Export-Config.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Get-DeviceRegistrationStatus.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Get-DeviceRegistrationStatus.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Get-ObjectPropertyValue.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Get-ObjectPropertyValue.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Import-Config.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Import-Config.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Select-PsBoundParameters.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Select-PsBoundParameters.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Set-Config.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Set-Config.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Write-HostPrompt.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\internal\Write-HostPrompt.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Add-MsalClientApplication.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Add-MsalClientApplication.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Clear-MsalTokenCache.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Clear-MsalTokenCache.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Enable-MsalTokenCacheOnDisk.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Enable-MsalTokenCacheOnDisk.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalAccount.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalAccount.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalClientApplication.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalClientApplication.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalFeatureSupport.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalFeatureSupport.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalToken.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Get-MsalToken.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\New-MsalClientApplication.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\New-MsalClientApplication.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Remove-MsalClientApplication.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Remove-MsalClientApplication.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Select-MsalClientApplication.ps1'.
VERBOSE: Dot-sourcing the script file 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps.\Select-MsalClientApplication.ps1'.
VERBOSE: Loading module from path 'C:\Users\halatovic\AppData\Local\Temp\6\ff9eb304-5984-4b59-bbe5-9b747152ae7f\msal.ps\MSAL.PS.psm1'.
WARNING: Assembly with same name "Microsoft.Identity.Client.Desktop.dll" is already loaded:
C:\Users\halatovic\AppData\Local\Temp\6\2072a8c9-86f8-4310-afbc-35ed4a7801e9\msal.ps\Microsoft.Identity.Client.Desktop.4.37.0\net461\Microsoft.Identity.Client.Desktop.dll
VERBOSE: Exporting function 'Assert-DirectoryExists'.
VERBOSE: Exporting function 'ConvertFrom-SecureStringAsPlainText'.
VERBOSE: Exporting function 'ConvertTo-Dictionary'.
VERBOSE: Exporting function 'Export-Config'.
VERBOSE: Exporting function 'Get-DeviceRegistrationStatus'.
VERBOSE: Exporting function 'Get-ObjectPropertyValue'.
VERBOSE: Exporting function 'Import-Config'.
VERBOSE: Exporting function 'Select-PsBoundParameters'.
VERBOSE: Exporting function 'Set-Config'.
VERBOSE: Exporting function 'Write-HostPrompt'.
VERBOSE: Exporting function 'Add-MsalClientApplication'.
VERBOSE: Exporting function 'Clear-MsalTokenCache'.
VERBOSE: Exporting function 'Enable-MsalTokenCacheOnDisk'.
VERBOSE: Exporting function 'Get-MsalAccount'.
VERBOSE: Exporting function 'Get-MsalClientApplication'.
VERBOSE: Exporting function 'Get-MsalFeatureSupport'.
VERBOSE: Exporting function 'Get-MsalToken'.
VERBOSE: Exporting function 'New-MsalClientApplication'.
VERBOSE: Exporting function 'Remove-MsalClientApplication'.
VERBOSE: Exporting function 'Select-MsalClientApplication'.
VERBOSE: Exporting function 'Catch-AssemblyLoadError'.
VERBOSE: Importing function 'Add-MsalClientApplication'.
VERBOSE: Importing function 'Clear-MsalTokenCache'.
VERBOSE: Importing function 'Enable-MsalTokenCacheOnDisk'.
VERBOSE: Importing function 'Get-MsalAccount'.
VERBOSE: Importing function 'Get-MsalClientApplication'.
VERBOSE: Importing function 'Get-MsalFeatureSupport'.
VERBOSE: Importing function 'Get-MsalToken'.
VERBOSE: Importing function 'New-MsalClientApplication'.
VERBOSE: Importing function 'Remove-MsalClientApplication'.
VERBOSE: Importing function 'Select-MsalClientApplication'.
Execute config file '\osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\config\default graph config.ps1'
MSAL.PS Graph token cache: 'C:\Users\halatovic\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3'
VERBOSE: Authentication
VERBOSE: Via IntegratedWindowsAuth
VERBOSE: Via Silent with LoginHint
VERBOSE: Via Prompt with LoginHint and Timeout
VERBOSE: No authentication possible
Problem connecting to Microsoft Graph. Exit.
Get-MsalToken : An error occurred while sending the request.
At \osb-sys-mdt-p01.idvnet.local\REMINST\Set-OutlookSignatures\Set-OutlookSignatures.ps1:3894 char:53
No authentication possible. Try:
-on-.Net-Core' and 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/MSAL.NET-uses-web-browser' for details)
Clean-up @2023-08-25T18:03:53+02:00@
VERBOSE: Removing the imported "Select-MsalClientApplication" function.
VERBOSE: Removing the imported "Remove-MsalClientApplication" function.
VERBOSE: Removing the imported "New-MsalClientApplication" function.
VERBOSE: Removing the imported "Get-MsalToken" function.
VERBOSE: Removing the imported "Get-MsalFeatureSupport" function.
VERBOSE: Removing the imported "Get-MsalClientApplication" function.
VERBOSE: Removing the imported "Get-MsalAccount" function.
VERBOSE: Removing the imported "Enable-MsalTokenCacheOnDisk" function.
VERBOSE: Removing the imported "Clear-MsalTokenCache" function.
VERBOSE: Removing the imported "Add-MsalClientApplication" function.
End script @2023-08-25T18:03:53+02:00@
@GruberMarkus commented on GitHub (Aug 25, 2023):
Please submit the log again, as GitHub does not seem to allow attachments sent via e-mail.
@halatovic commented on GitHub (Aug 25, 2023):
I have reopened the issue.
@GruberMarkus commented on GitHub (Aug 25, 2023):
I will need some time to test this. In the meantime, please try the following:
The default browser should start. If the browser brings an error message, it should not be about localhost being blocked, but rather that localhost can not be reached because there is no webserver hosting a page on this address
For a test run, it is not neccessary to go through the changelog from 3.6.1 to 4.2.1.
@GruberMarkus commented on GitHub (Aug 26, 2023):
I can now reproduce the problem with v3.6.1 and v4.2.1 on Windows Server 2016.
It seems that the root cause is not in Set-OutlookSignatures or in one of its dependencies, but in the .Net Framework and PowerShell configuration of Windows Server 2016: Only TLS 1.0 is enabled by default, and that's not enough for Graph authentication.
Before running Set-OutlookSignatures, run the following code to temporarily enable all available security protocols in the current PowerShell session:
The change is only temporary and limited to the current PowerShell session.
If you want to make the change permanent, the registry key described in https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls#schusestrongcrypto might be a solution.
Please let me know if this solves your problem.
@halatovic commented on GitHub (Aug 28, 2023):
Hello Markus,
your solution resolved the issue, thank you.
Best Regards
Haris Alatovic