[GH-ISSUE #88] Get-Process : Es kann kein Prozess mit der Prozess-ID 2716 gefunden werden. #35

Closed
opened 2026-02-27 20:30:55 +03:00 by kerem · 7 comments
Owner

Originally created by @Ben-munich on GitHub (Oct 16, 2023).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/88

Hello,
for some (not all) users we are facing the following issue and the signature is not applied. Have you seen this issue before?

Thanks!
Ben

AUSFÜHRLICH: Funktion "Add-MsalClientApplication" wird importiert.
AUSFÜHRLICH: Funktion "Clear-MsalTokenCache" wird importiert.
AUSFÜHRLICH: Funktion "Enable-MsalTokenCacheOnDisk" wird importiert.
AUSFÜHRLICH: Funktion "Get-MsalAccount" wird importiert.
AUSFÜHRLICH: Funktion "Get-MsalClientApplication" wird importiert.
AUSFÜHRLICH: Funktion "Get-MsalFeatureSupport" wird importiert.
AUSFÜHRLICH: Funktion "Get-MsalToken" wird importiert.
AUSFÜHRLICH: Funktion "New-MsalClientApplication" wird importiert.
AUSFÜHRLICH: Funktion "Remove-MsalClientApplication" wird importiert.
AUSFÜHRLICH: Funktion "Select-MsalClientApplication" wird importiert.
Execute config file '\srv-muc-mgmt\Applications\Set-OutlookSignatures\Templates\Config\default graph config.ps1'
MSAL.PS Graph token cache: 'C:\Users\hank.schrader\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3'
AUSFÜHRLICH: Current user:
AUSFÜHRLICH: Authentication
AUSFÜHRLICH: Via IntegratedWindowsAuth
AUSFÜHRLICH: Via Silent with LoginHint
AUSFÜHRLICH: Via Prompt with LoginHint and Timeout
Get-Process : Es kann kein Prozess mit der Prozess-ID 2716 gefunden werden.
In C:\Users\hank.schrader\AppData\Local\Temp\a7f53b53-8ebd-484f-b1f4-3bbebe759fdc\msal.ps\Get-MsalToken.ps1:262 Zeichen:42

  • ... ParentWindow = (Get-Process -Id $Win32Process.ParentProcessId).MainWi ...
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (2716:Int32) [Get-Process], ProcessCommandException
    • FullyQualifiedErrorId : NoProcessFoundForGivenId,Microsoft.PowerShell.Commands.GetProcessCommand

AUSFÜHRLICH: No authentication possible
Problem connecting to Microsoft Graph. Exit.
Die Eigenschaft "MainWindowHandle" wurde für dieses Objekt nicht gefunden. Vergewissern Sie sich, dass die Eigenschaft vorhanden ist.
In C:\Users\hank.schrader\AppData\Local\Temp\a7f53b53-8ebd-484f-b1f4-3bbebe759fdc\msal.ps\Get-MsalToken.ps1:262 Zeichen:25

  • ... $ParentWindow = (Get-Process -Id $Win32Process.ParentProc ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

No authentication possible. Try:

  1. Delete MSAL.PS Graph token cache: 'C:\Users\hank.schrader\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3'"
  2. Run Set-OutlookSignatures with the "-Verbose" parameter and check for authentication messages
  3. If the "Via Prompt with LoginHint and Timeout" authentication message is diplayed:

Clean-up @2023-10-16T11:19:42+02:00@
AUSFÜHRLICH: Die importierte Funktion "Add-MsalClientApplication" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Clear-MsalTokenCache" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Enable-MsalTokenCacheOnDisk" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Get-MsalAccount" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Get-MsalClientApplication" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Get-MsalFeatureSupport" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Get-MsalToken" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "New-MsalClientApplication" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Remove-MsalClientApplication" wird entfernt.
AUSFÜHRLICH: Die importierte Funktion "Select-MsalClientApplication" wird entfernt.

Originally created by @Ben-munich on GitHub (Oct 16, 2023). Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/88 Hello, for some (not all) users we are facing the following issue and the signature is not applied. Have you seen this issue before? Thanks! Ben AUSFÜHRLICH: Funktion "Add-MsalClientApplication" wird importiert. AUSFÜHRLICH: Funktion "Clear-MsalTokenCache" wird importiert. AUSFÜHRLICH: Funktion "Enable-MsalTokenCacheOnDisk" wird importiert. AUSFÜHRLICH: Funktion "Get-MsalAccount" wird importiert. AUSFÜHRLICH: Funktion "Get-MsalClientApplication" wird importiert. AUSFÜHRLICH: Funktion "Get-MsalFeatureSupport" wird importiert. AUSFÜHRLICH: Funktion "Get-MsalToken" wird importiert. AUSFÜHRLICH: Funktion "New-MsalClientApplication" wird importiert. AUSFÜHRLICH: Funktion "Remove-MsalClientApplication" wird importiert. AUSFÜHRLICH: Funktion "Select-MsalClientApplication" wird importiert. Execute config file '\\srv-muc-mgmt\Applications\Set-OutlookSignatures\Templates\Config\default graph config.ps1' MSAL.PS Graph token cache: 'C:\Users\hank.schrader\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3' AUSFÜHRLICH: Current user: AUSFÜHRLICH: Authentication AUSFÜHRLICH: Via IntegratedWindowsAuth AUSFÜHRLICH: Via Silent with LoginHint AUSFÜHRLICH: Via Prompt with LoginHint and Timeout Get-Process : Es kann kein Prozess mit der Prozess-ID 2716 gefunden werden. In C:\Users\hank.schrader\AppData\Local\Temp\a7f53b53-8ebd-484f-b1f4-3bbebe759fdc\msal.ps\Get-MsalToken.ps1:262 Zeichen:42 + ... ParentWindow = (Get-Process -Id $Win32Process.ParentProcessId).MainWi ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (2716:Int32) [Get-Process], ProcessCommandException + FullyQualifiedErrorId : NoProcessFoundForGivenId,Microsoft.PowerShell.Commands.GetProcessCommand AUSFÜHRLICH: No authentication possible Problem connecting to Microsoft Graph. Exit. Die Eigenschaft "MainWindowHandle" wurde für dieses Objekt nicht gefunden. Vergewissern Sie sich, dass die Eigenschaft vorhanden ist. In C:\Users\hank.schrader\AppData\Local\Temp\a7f53b53-8ebd-484f-b1f4-3bbebe759fdc\msal.ps\Get-MsalToken.ps1:262 Zeichen:25 + ... $ParentWindow = (Get-Process -Id $Win32Process.ParentProc ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException + FullyQualifiedErrorId : PropertyNotFoundStrict No authentication possible. Try: 1. Delete MSAL.PS Graph token cache: 'C:\Users\hank.schrader\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3'" 2. Run Set-OutlookSignatures with the "-Verbose" parameter and check for authentication messages 3. If the "Via Prompt with LoginHint and Timeout" authentication message is diplayed: - Check if a browser (the system default browser, if configured) opens for authentication - Yes: - Check if the correct user account is selected/entered and if the authentication is successful - Check if authentication happens within two minutes - Ensure that access to 'http://localhost' is allowed ('https://localhost' is currently not technically feasible, see 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/System-Browser-on-.Net-Core' and 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/MSAL.NET-uses-web-browser' for details) - No: - Run Set-OutlookSignatures in a new PowerShell session - Check the system default browser - Make sure that Set-OutlookSignatures is executed in the security context of the currently logged-in user - Make sure that the current PowerShell session allows TLS 1.2 (see https://github.com/GruberMarkus/Set-OutlookSignatures/issues/85 for details) Clean-up @2023-10-16T11:19:42+02:00@ AUSFÜHRLICH: Die importierte Funktion "Add-MsalClientApplication" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Clear-MsalTokenCache" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Enable-MsalTokenCacheOnDisk" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Get-MsalAccount" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Get-MsalClientApplication" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Get-MsalFeatureSupport" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Get-MsalToken" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "New-MsalClientApplication" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Remove-MsalClientApplication" wird entfernt. AUSFÜHRLICH: Die importierte Funktion "Select-MsalClientApplication" wird entfernt.
kerem closed this issue 2026-02-27 20:30:55 +03:00
Author
Owner

@GruberMarkus commented on GitHub (Oct 16, 2023):

Hi @Ben-munich,

yes, I have seen this before. Did you already follow the hints in the error message?

No authentication possible. Try:

Delete MSAL.PS Graph token cache: 'C:\Users\hank.schrader\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3'"
Run Set-OutlookSignatures with the "-Verbose" parameter and check for authentication messages
If the "Via Prompt with LoginHint and Timeout" authentication message is diplayed:
    Check if a browser (the system default browser, if configured) opens for authentication
        Yes:
            Check if the correct user account is selected/entered and if the authentication is successful
            Check if authentication happens within two minutes
            Ensure that access to 'http://localhost/' is allowed ('https://localhost/' is currently not technically feasible, see 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/System-Browser-on-.Net-Core' and 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/MSAL.NET-uses-web-browser' for details)
        No:
            Run Set-OutlookSignatures in a new PowerShell session
            Check the system default browser
            Make sure that Set-OutlookSignatures is executed in the security context of the currently logged-in user
            Make sure that the current PowerShell session allows TLS 1.2 (see https://github.com/GruberMarkus/Set-OutlookSignatures/issues/85 for details)
<!-- gh-comment-id:1764101718 --> @GruberMarkus commented on GitHub (Oct 16, 2023): Hi @Ben-munich, yes, I have seen this before. Did you already follow the hints in the error message? No authentication possible. Try: Delete MSAL.PS Graph token cache: 'C:\Users\hank.schrader\AppData\Local\MSAL.PS\MSAL.PS.msalcache.bin3'" Run Set-OutlookSignatures with the "-Verbose" parameter and check for authentication messages If the "Via Prompt with LoginHint and Timeout" authentication message is diplayed: Check if a browser (the system default browser, if configured) opens for authentication Yes: Check if the correct user account is selected/entered and if the authentication is successful Check if authentication happens within two minutes Ensure that access to 'http://localhost/' is allowed ('https://localhost/' is currently not technically feasible, see 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/System-Browser-on-.Net-Core' and 'https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/MSAL.NET-uses-web-browser' for details) No: Run Set-OutlookSignatures in a new PowerShell session Check the system default browser Make sure that Set-OutlookSignatures is executed in the security context of the currently logged-in user Make sure that the current PowerShell session allows TLS 1.2 (see https://github.com/GruberMarkus/Set-OutlookSignatures/issues/85 for details)
Author
Owner

@Ben-munich commented on GitHub (Oct 16, 2023):

Hi Markus,
yes, i went through those steps. No Browser window opens in this case. Edge is set as default.
Running the script again in a new session does not help either.
Script is executed in user context.

Get-Process : Es kann kein Prozess mit der Prozess-ID 2716 gefunden werden.
To what process does this refer?

<!-- gh-comment-id:1764116543 --> @Ben-munich commented on GitHub (Oct 16, 2023): Hi Markus, yes, i went through those steps. No Browser window opens in this case. Edge is set as default. Running the script again in a new session does not help either. Script is executed in user context. Get-Process : Es kann kein Prozess mit der Prozess-ID 2716 gefunden werden. To what process does this refer?
Author
Owner

@Ben-munich commented on GitHub (Oct 16, 2023):

I have also added the Snippet which temporarily enables all TLS Versions. Same error.

<!-- gh-comment-id:1764125392 --> @Ben-munich commented on GitHub (Oct 16, 2023): I have also added the Snippet which temporarily enables all TLS Versions. Same error.
Author
Owner

@GruberMarkus commented on GitHub (Oct 16, 2023):

The process ID refered to is dynamic. It is the process ID of the browser window that should open after the sub-module msal.ps aks the operating system to open it.

What are the results of the following PowerShell code when run on a working and on a non-working client?

(Get-WmiObject -class Win32_OperatingSystem).Caption
[System.Environment]::OSVersion.Version

[Net.ServicePointManager]::SecurityProtocol

& start https://github.com
# The default browser should open now

Do you use Windows Terminal as default host? If yes, this might lead to this error, too.
When you run powershell.exe, it either start in Windows Terminal or in the old console host. Windows Terminal can be recognized by its tabs, which the old console host does not support.

Interactive authentication in Windows Terminal is broken. Run powershell.exe in the old console host as a workaround:

conhost.exe powershell.exe -file '\\server\share\folder\Set-OutlookSignatures.ps1'
<!-- gh-comment-id:1764145513 --> @GruberMarkus commented on GitHub (Oct 16, 2023): The process ID refered to is dynamic. It is the process ID of the browser window that should open after the sub-module msal.ps aks the operating system to open it. What are the results of the following PowerShell code when run on a working and on a non-working client? ``` (Get-WmiObject -class Win32_OperatingSystem).Caption [System.Environment]::OSVersion.Version [Net.ServicePointManager]::SecurityProtocol & start https://github.com # The default browser should open now ``` Do you use Windows Terminal as default host? If yes, this might lead to this error, too. When you run powershell.exe, it either start in Windows Terminal or in the old console host. Windows Terminal can be recognized by its tabs, which the old console host does not support. Interactive authentication in Windows Terminal is broken. Run powershell.exe in the old console host as a workaround: ``` conhost.exe powershell.exe -file '\\server\share\folder\Set-OutlookSignatures.ps1' ```
Author
Owner

@Ben-munich commented on GitHub (Oct 16, 2023):

Great, it is ineed the issue with Windows Terminal.
Calling the script like you mentioned (conhost.exe powershell.exe -file '\server\share\folder\Set-OutlookSignatures.ps1') works instantly.
Thank you!

<!-- gh-comment-id:1764210396 --> @Ben-munich commented on GitHub (Oct 16, 2023): Great, it is ineed the issue with Windows Terminal. Calling the script like you mentioned (conhost.exe powershell.exe -file '\\server\share\folder\Set-OutlookSignatures.ps1') works instantly. Thank you!
Author
Owner

@GruberMarkus commented on GitHub (Oct 16, 2023):

My pleasure.

The next release will contain an updated help message addressing this issue.

By the way: I would like to know more about the users of Set-OutlookSignatures and how it is configured. If you are willing to share some details, please let me know via https://explicitconsulting.at/contact/.

<!-- gh-comment-id:1764252841 --> @GruberMarkus commented on GitHub (Oct 16, 2023): My pleasure. The next release will contain an updated help message addressing this issue. By the way: I would like to know more about the users of Set-OutlookSignatures and how it is configured. If you are willing to share some details, please let me know via https://explicitconsulting.at/contact/.
Author
Owner

@GruberMarkus commented on GitHub (Oct 30, 2023):

v4.7.0 not only contains an updated help message addressing this issue, but also a fix within the used dependency.

In other words: With v4.7.0, the workaround to start Set-OutlookSignatures with conhost.exe powershell.exe Set-OutlookSignatures.ps1 should no longer be required.

<!-- gh-comment-id:1784508664 --> @GruberMarkus commented on GitHub (Oct 30, 2023): v4.7.0 not only contains an updated help message addressing this issue, but also a fix within the used dependency. In other words: With v4.7.0, the workaround to start Set-OutlookSignatures with `conhost.exe powershell.exe Set-OutlookSignatures.ps1` should no longer be required.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#35
No description provided.