Skip to content

Commit d108bd4

Browse files
authored
Credential prompt is console-only (#10905)
1 parent 4505402 commit d108bd4

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
lines changed

reference/7.2/Microsoft.PowerShell.Security/Get-Credential.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Security.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Security
5-
ms.date: 12/12/2022
5+
ms.date: 02/26/2024
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.2&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-Credential
@@ -33,7 +33,10 @@ The `Get-Credential` cmdlet creates a credential object for a specified user nam
3333
can use the credential object in security operations.
3434

3535
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use
36-
the **Message** parameter to specify a customized message in the command line prompt.
36+
the **Message** parameter to specify a customized message for the prompt.
37+
38+
In Windows PowerShell 5.1 and earlier, Windows presents a dialog box to prompt for a user name and
39+
password. In PowerShell 6.0 and later, the prompt is presented in the console for all platforms.
3740

3841
## EXAMPLES
3942

@@ -130,8 +133,8 @@ Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02}
130133

131134
```Output
132135
PowerShell Credential Request : PowerShell Credential Request
133-
Warning: This credential is being requested by a script or application on the SERVER01 remote computer. Enter your credentials only if you
134-
trust the remote computer and the application or script requesting it.
136+
Warning: This credential is being requested by a script or application on the SERVER01 remote computer.
137+
Enter your credentials only if you trust the remote computer and the application or script requesting it.
135138
136139
Enter your credentials.
137140
Password for user Domain01\User02: ***************

reference/7.3/Microsoft.PowerShell.Security/Get-Credential.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Security.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Security
5-
ms.date: 12/12/2022
5+
ms.date: 02/26/2024
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.3&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-Credential
@@ -33,7 +33,10 @@ The `Get-Credential` cmdlet creates a credential object for a specified user nam
3333
can use the credential object in security operations.
3434

3535
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use
36-
the **Message** parameter to specify a customized message in the command line prompt.
36+
the **Message** parameter to specify a customized message for the prompt.
37+
38+
In Windows PowerShell 5.1 and earlier, Windows presents a dialog box to prompt for a user name and
39+
password. In PowerShell 6.0 and later, the prompt is presented in the console for all platforms.
3740

3841
## EXAMPLES
3942

@@ -130,8 +133,8 @@ Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02}
130133

131134
```Output
132135
PowerShell Credential Request : PowerShell Credential Request
133-
Warning: This credential is being requested by a script or application on the SERVER01 remote computer. Enter your credentials only if you
134-
trust the remote computer and the application or script requesting it.
136+
Warning: This credential is being requested by a script or application on the SERVER01 remote computer.
137+
Enter your credentials only if you trust the remote computer and the application or script requesting it.
135138
136139
Enter your credentials.
137140
Password for user Domain01\User02: ***************

reference/7.4/Microsoft.PowerShell.Security/Get-Credential.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Security.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Security
5-
ms.date: 12/12/2022
5+
ms.date: 02/26/2024
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-Credential
@@ -33,7 +33,10 @@ The `Get-Credential` cmdlet creates a credential object for a specified user nam
3333
can use the credential object in security operations.
3434

3535
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use
36-
the **Message** parameter to specify a customized message in the command line prompt.
36+
the **Message** parameter to specify a customized message for the prompt.
37+
38+
In Windows PowerShell 5.1 and earlier, Windows presents a dialog box to prompt for a user name and
39+
password. In PowerShell 6.0 and later, the prompt is presented in the console for all platforms.
3740

3841
## EXAMPLES
3942

@@ -130,8 +133,8 @@ Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02}
130133

131134
```Output
132135
PowerShell Credential Request : PowerShell Credential Request
133-
Warning: This credential is being requested by a script or application on the SERVER01 remote computer. Enter your credentials only if you
134-
trust the remote computer and the application or script requesting it.
136+
Warning: This credential is being requested by a script or application on the SERVER01 remote computer.
137+
Enter your credentials only if you trust the remote computer and the application or script requesting it.
135138
136139
Enter your credentials.
137140
Password for user Domain01\User02: ***************

reference/7.5/Microsoft.PowerShell.Security/Get-Credential.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Security.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Security
5-
ms.date: 12/12/2022
5+
ms.date: 02/26/2024
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Get-Credential
@@ -33,7 +33,10 @@ The `Get-Credential` cmdlet creates a credential object for a specified user nam
3333
can use the credential object in security operations.
3434

3535
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use
36-
the **Message** parameter to specify a customized message in the command line prompt.
36+
the **Message** parameter to specify a customized message for the prompt.
37+
38+
In Windows PowerShell 5.1 and earlier, Windows presents a dialog box to prompt for a user name and
39+
password. In PowerShell 6.0 and later, the prompt is presented in the console for all platforms.
3740

3841
## EXAMPLES
3942

@@ -130,8 +133,8 @@ Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02}
130133

131134
```Output
132135
PowerShell Credential Request : PowerShell Credential Request
133-
Warning: This credential is being requested by a script or application on the SERVER01 remote computer. Enter your credentials only if you
134-
trust the remote computer and the application or script requesting it.
136+
Warning: This credential is being requested by a script or application on the SERVER01 remote computer.
137+
Enter your credentials only if you trust the remote computer and the application or script requesting it.
135138
136139
Enter your credentials.
137140
Password for user Domain01\User02: ***************

0 commit comments

Comments
 (0)