![]() The problem is not happening right at this moment, so I can't troubleshoot it until it starts again, but I fear it will return soon and plague me until I solve the root cause. I'm wondering if maybe SysInternals Procmon will help identify the root cause, but I'm not very familiar with the tool, and am looking for suggestions on that or a better troubleshooting method. However, under Applications and Services Logs -> Microsoft -> Windows -> PowerShell -> Operational, I see two events each time:Įvent ID: 40961 "PowerShell console is starting up"Įvent ID 53504 "Windows PowerShell has started an IPC listening thread on process: 173724 in AppDomain: DefaultAppDomain." (the process number changes each time of course) I've watched the Application and System event logs while I attempt to launch PowerShell, but have seen no events occur in those logs at that time. I ran the two commands below, but they made no difference: sfc /scannowĭism /online /cleanup-image /restorehealth That might explain the problem returning every few weeks or so. The thought went through my mind that it could be a failed or pending Windows patch that's causing PowerShell 5.1 to not be able to load. Version 2.0 is not enabled on many of our servers though and I don't think that helps remote commands, but it's a clue of what might be happening. However, I was able to get PowerShell to run using the following option: start PowerShell.exe -version 2.0 Start PowerShell.exe -NoProfile -ExecutionPolicy Restrictedīut it didn't matter. Start PowerShell.exe -NoProfile -ExecutionPolicy Unrestricted On a system experiencing the problem, I tried starting the powershell executable from cmd in the following ways with no difference: start PowerShell.exe -NoProfile I experience this same result (hanging) if instead of the script, I just try something like this: Enter-PSSession -ComputerName Server2 Il virus Powershell. If I reboot that remote system, it continues until it reaches another remote system experiencing this problem. Powershell.exe è una parte normale del sistema operativo Windows, ma può anche essere dirottato da virus e trojan. Once the script reaches the first server experiencing this problem, it hangs indefinitely (again, I've waited for over 60 minutes). The script block is very small/simple (only a couple of 'Get-WBJob' commands). Invoke-Command -Session $rsession -ScriptBlock This is causing a problem with our "morning checks" script that tries to check the last Windows Server backup on multiple servers in a foreach loop using "New-PSSession" like this: $rsession = New-PSSession -ComputerName $Server -ErrorAction Stop It has happened on both Windows Server 20, but I do not remember seeing it happen on any of our 2012 R2 servers. I'd guess at least half of our servers, so at least 40 servers or so. ![]() More than 15, but I'm not sure exactly how many. A reboot might be an acceptable fix if it weren't on servers, and the issue never came back, however it eventually returns after a while (perhaps several weeks later). I've tried starting PowerShell everyway I know how, but no matter what I try, the only fix I've found so far is to reboot the system. NET, or McAfee that is causing it, but I just don't know. My suspicion is that it's not actually a PowerShell problem, but something else such as. All it does is show the blue shell window with the typical PowerShell startup output of: Windows PowerShellĬopyright (C) Microsoft Corporation. I've waited for over 60 minutes, but it never fully starts. It should be a single line though in the batch file (or on the command line if manually typed into a cmd session).What would be causing "PowerShell.exe" to hang upon opening on multiple systems? With "For Each" and "-Register" being word-wrapped in this comment-box. Note the "triple" quotes in the Powershell line. Powershell "Get-AppXPackage -AllUsers -Name Microsoft.MicrosoftEdge | Foreach ![]() offĬd %userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe This example may clarify things for those trying to run a powershell command from a "cmd" command line. Please note the triple quotes in the powershell line. The batch file was then run at Administrator level. I placed the following commands into a batch file to reset Edge (which has been giving some problems from time to time).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |