-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Add to your $PROFILE:
function Enter-MyPSSession {
Enter-PSSession -ComputerName (Read-Host 'Enter the computer name') -Credential (Get-Credential)
}
- Run pwsh -Command Enter-MyPSSession and then enter your actual remote computer and user name.
Expected behavior
Enter the computer name: your_computer
PowerShell credential request
Enter your credentials.
User: your_user
Password for user your_user: **************
[your_computer]: PS C:\Users\your_user\Documents>Actual behavior
Enter the computer name: your_computer
PowerShell credential request
Enter your credentials.
User: your_user
Password for user your_user: **************
{Nothing happens. No errors. Keyboard doesn't respond even when you press Ctrl+C. Enter-MyPSSession works properly, if it isn't called from -Command argument.}Error details
No response
Environment data
PS> $PSVersionTable
Name Value
---- -----
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
Metadata
Metadata
Assignees
Labels
No labels

