diff --git a/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md b/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md index 5a8b34b64e78..6c962ce5f261 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md @@ -25,8 +25,6 @@ Restart-Computer [-WsmanAuthentication ] [[-ComputerName] ] ## DESCRIPTION -> **This cmdlet is only available on the Windows platform.** - The `Restart-Computer` cmdlet restarts the operating system on the local and remote computers. You can use the parameters of `Restart-Computer` to run the restart operations, to specify the @@ -38,6 +36,12 @@ command. Specify a waiting time-out and query interval, and wait for particular available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions. +In PowerShell 7.1, `Restart-Computer` was added for Linux and macOS. The non-Windows platforms only +have the **WhatIf**, **Confirm**, and **CommonParameters** parameters. The cmdlet is just calling +the native command `/sbin/shutdown`. + +## EXAMPLES + ## EXAMPLES ### Example 1: Restart the local computer @@ -108,7 +112,7 @@ queries the remote computer every two seconds to determine whether it's restarte `Restart-Computer` restarts the remote computer using the **WsmanAuthentication** mechanism. Kerberos authentication determines whether the current user has permission to restart the remote computer. For more information, see -[AuthenticationMechanism](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +[AuthenticationMechanism](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). ```powershell Restart-Computer -ComputerName Server01 -WsmanAuthentication Kerberos @@ -132,6 +136,8 @@ if your computer isn't configured to run remote commands. If the **ComputerName** parameter isn't specified, `Restart-Computer` restarts the local computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.String[] Parameter Sets: (All) @@ -152,12 +158,14 @@ Type a user name, such as **User01** or **Domain01\User01**, or enter a **PSCred generated by the `Get-Credential` cmdlet. If you type a user name, you're prompted to enter the password. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see -> [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring). +> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). + +This parameter is only available on Windows platforms. ```yaml Type: System.Management.Automation.PSCredential @@ -182,6 +190,8 @@ This parameter was introduced in Windows PowerShell 3.0. If the **Delay** parameter isn't specified, `Restart-Computer` uses a five second delay. +This parameter is only available on Windows platforms. + ```yaml Type: System.Int16 Parameter Sets: (All) @@ -206,7 +216,8 @@ The acceptable values for this parameter are: - **WMI**: Receives a reply to a **Win32_ComputerSystem** query for the computer. - **WinRM**: Can establish a remote session to the computer by using WS-Management. -This parameter was introduced in Windows PowerShell 3.0. +This parameter was introduced in Windows PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: Microsoft.PowerShell.Commands.WaitForServiceTypes @@ -225,6 +236,8 @@ Accept wildcard characters: False Forces an immediate restart of the computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -247,6 +260,8 @@ The **Timeout** parameter is only valid with the **Wait** parameter. **Timeout** This parameter was introduced in Windows PowerShell 3.0. +This parameter is only available on Windows platforms. + ```yaml Type: System.Int32 Parameter Sets: (All) @@ -274,7 +289,8 @@ The **Wait** parameter isn't valid when you're restarting the local computer. If `Restart-Computer` generates a non-terminating error for **Wait** on the local computer, but waits for the remote computers to restart. -This parameter was introduced in Windows PowerShell 3.0. +This parameter was introduced in Windows PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: System.Management.Automation.SwitchParameter @@ -297,7 +313,7 @@ The acceptable values for this parameter are: **Basic**, **CredSSP**, **Default* **Kerberos**, and **Negotiate**. For more information, see -[AuthenticationMechanism](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +[AuthenticationMechanism](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] > Credential Security Service Provider (CredSSP) authentication, in which the user credentials are @@ -306,6 +322,8 @@ For more information, see > increases the security risk of the remote operation. If the remote computer is compromised, the > credentials that are passed to it can be used to control the network session. +This parameter is only available on Windows platforms. + ```yaml Type: System.String Parameter Sets: (All) @@ -355,7 +373,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -371,11 +390,14 @@ This cmdlet returns no output. ## NOTES -- In Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) - class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account - used to restart the machine. -- On Linux and macOS, `Restart-Computer` uses the `/sbin/shutdown` bash tool. +- In Windows, `Restart-Computer` uses the + [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) + of the Windows Management Instrumentation (WMI) + [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method + requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart + the machine. +- This cmdlet was added for Linux and macOS in PowerShell 7.1. On Linux and macOS, + `Restart-Computer` uses the `/sbin/shutdown` bash tool. ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Management/Stop-Computer.md b/reference/7.4/Microsoft.PowerShell.Management/Stop-Computer.md index 642440d6344e..3fa8f94d3810 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Stop-Computer.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Stop-Computer.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 05/15/2023 +ms.date: 05/07/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/stop-computer?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: Stop-Computer @@ -29,8 +29,9 @@ The `Stop-Computer` cmdlet shuts down the local computer and remote computers. You can use the parameters of `Stop-Computer` to specify the authentication levels and alternate credentials, and to force an immediate shut down. -In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The parameters have no effect on -these platforms. The cmdlet is just calling the native command `/sbin/shutdown`. +In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The non-Windows platforms only +have the **WhatIf**, **Confirm**, and **CommonParameters** parameters. The cmdlet is just calling +the native command `/sbin/shutdown`. ## EXAMPLES @@ -118,6 +119,8 @@ comma-separated list. To specify the local computer, type the computer name or l This parameter doesn't rely on PowerShell remoting. You can use the **ComputerName** parameter even if your computer isn't configured to run remote commands. +This parameter is only available on Windows platforms. + ```yaml Type: System.String[] Parameter Sets: (All) @@ -145,6 +148,8 @@ object and the password is stored as a [SecureString](/dotnet/api/system.securit > For more information about **SecureString** data protection, see > [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring). +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.PSCredential Parameter Sets: (All) @@ -161,6 +166,8 @@ Accept wildcard characters: False Forces an immediate shut down of the computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -197,7 +204,8 @@ For more information about the values of this parameter, see > increases the security risk of the remote operation. If the remote computer is compromised, the > credentials that are passed to it can be used to control the network session. -This parameter was introduced in PowerShell 3.0. +This parameter was introduced in PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md b/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md index 91a25cdd99f8..5287aaa6aaad 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md @@ -25,8 +25,6 @@ Restart-Computer [-WsmanAuthentication ] [[-ComputerName] ] ## DESCRIPTION -> **This cmdlet is only available on the Windows platform.** - The `Restart-Computer` cmdlet restarts the operating system on the local and remote computers. You can use the parameters of `Restart-Computer` to run the restart operations, to specify the @@ -38,6 +36,12 @@ command. Specify a waiting time-out and query interval, and wait for particular available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions. +In PowerShell 7.1, `Restart-Computer` was added for Linux and macOS. The non-Windows platforms only +have the **WhatIf**, **Confirm**, and **CommonParameters** parameters. The cmdlet is just calling +the native command `/sbin/shutdown`. + +## EXAMPLES + ## EXAMPLES ### Example 1: Restart the local computer @@ -132,6 +136,8 @@ if your computer isn't configured to run remote commands. If the **ComputerName** parameter isn't specified, `Restart-Computer` restarts the local computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.String[] Parameter Sets: (All) @@ -159,6 +165,8 @@ object and the password is stored as a [SecureString](xref:System.Security.Secur > For more information about **SecureString** data protection, see > [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.PSCredential Parameter Sets: (All) @@ -182,6 +190,8 @@ This parameter was introduced in Windows PowerShell 3.0. If the **Delay** parameter isn't specified, `Restart-Computer` uses a five second delay. +This parameter is only available on Windows platforms. + ```yaml Type: System.Int16 Parameter Sets: (All) @@ -206,7 +216,8 @@ The acceptable values for this parameter are: - **WMI**: Receives a reply to a **Win32_ComputerSystem** query for the computer. - **WinRM**: Can establish a remote session to the computer by using WS-Management. -This parameter was introduced in Windows PowerShell 3.0. +This parameter was introduced in Windows PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: Microsoft.PowerShell.Commands.WaitForServiceTypes @@ -225,6 +236,8 @@ Accept wildcard characters: False Forces an immediate restart of the computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -247,6 +260,8 @@ The **Timeout** parameter is only valid with the **Wait** parameter. **Timeout** This parameter was introduced in Windows PowerShell 3.0. +This parameter is only available on Windows platforms. + ```yaml Type: System.Int32 Parameter Sets: (All) @@ -274,7 +289,8 @@ The **Wait** parameter isn't valid when you're restarting the local computer. If `Restart-Computer` generates a non-terminating error for **Wait** on the local computer, but waits for the remote computers to restart. -This parameter was introduced in Windows PowerShell 3.0. +This parameter was introduced in Windows PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: System.Management.Automation.SwitchParameter @@ -306,6 +322,8 @@ For more information, see > increases the security risk of the remote operation. If the remote computer is compromised, the > credentials that are passed to it can be used to control the network session. +This parameter is only available on Windows platforms. + ```yaml Type: System.String Parameter Sets: (All) @@ -378,7 +396,8 @@ This cmdlet returns no output. [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine. -- On Linux and macOS, `Restart-Computer` uses the `/sbin/shutdown` bash tool. +- This cmdlet was added for Linux and macOS in PowerShell 7.1. On Linux and macOS, + `Restart-Computer` uses the `/sbin/shutdown` bash tool. ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Stop-Computer.md b/reference/7.5/Microsoft.PowerShell.Management/Stop-Computer.md index bdb019216761..84561f9f4636 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Stop-Computer.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Stop-Computer.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 05/15/2023 +ms.date: 05/07/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/stop-computer?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: Stop-Computer @@ -29,8 +29,9 @@ The `Stop-Computer` cmdlet shuts down the local computer and remote computers. You can use the parameters of `Stop-Computer` to specify the authentication levels and alternate credentials, and to force an immediate shut down. -In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The parameters have no effect on -these platforms. The cmdlet is just calling the native command `/sbin/shutdown`. +In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The non-Windows platforms only +have the **WhatIf**, **Confirm**, and **CommonParameters** parameters. The cmdlet is just calling +the native command `/sbin/shutdown`. ## EXAMPLES @@ -118,6 +119,8 @@ comma-separated list. To specify the local computer, type the computer name or l This parameter doesn't rely on PowerShell remoting. You can use the **ComputerName** parameter even if your computer isn't configured to run remote commands. +This parameter is only available on Windows platforms. + ```yaml Type: System.String[] Parameter Sets: (All) @@ -145,6 +148,8 @@ object and the password is stored as a [SecureString](/dotnet/api/system.securit > For more information about **SecureString** data protection, see > [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring). +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.PSCredential Parameter Sets: (All) @@ -161,6 +166,8 @@ Accept wildcard characters: False Forces an immediate shut down of the computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -197,7 +204,8 @@ For more information about the values of this parameter, see > increases the security risk of the remote operation. If the remote computer is compromised, the > credentials that are passed to it can be used to control the network session. -This parameter was introduced in PowerShell 3.0. +This parameter was introduced in PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: System.String diff --git a/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md b/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md index eb17f23b2519..118f8e8ad646 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md @@ -25,8 +25,6 @@ Restart-Computer [-WsmanAuthentication ] [[-ComputerName] ] ## DESCRIPTION -> **This cmdlet is only available on the Windows platform.** - The `Restart-Computer` cmdlet restarts the operating system on the local and remote computers. You can use the parameters of `Restart-Computer` to run the restart operations, to specify the @@ -38,6 +36,12 @@ command. Specify a waiting time-out and query interval, and wait for particular available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions. +In PowerShell 7.1, `Restart-Computer` was added for Linux and macOS. The non-Windows platforms only +have the **WhatIf**, **Confirm**, and **CommonParameters** parameters. The cmdlet is just calling +the native command `/sbin/shutdown`. + +## EXAMPLES + ## EXAMPLES ### Example 1: Restart the local computer @@ -108,7 +112,7 @@ queries the remote computer every two seconds to determine whether it's restarte `Restart-Computer` restarts the remote computer using the **WsmanAuthentication** mechanism. Kerberos authentication determines whether the current user has permission to restart the remote computer. For more information, see -[AuthenticationMechanism](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +[AuthenticationMechanism](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). ```powershell Restart-Computer -ComputerName Server01 -WsmanAuthentication Kerberos @@ -132,6 +136,8 @@ if your computer isn't configured to run remote commands. If the **ComputerName** parameter isn't specified, `Restart-Computer` restarts the local computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.String[] Parameter Sets: (All) @@ -152,12 +158,14 @@ Type a user name, such as **User01** or **Domain01\User01**, or enter a **PSCred generated by the `Get-Credential` cmdlet. If you type a user name, you're prompted to enter the password. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see -> [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring). +> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). + +This parameter is only available on Windows platforms. ```yaml Type: System.Management.Automation.PSCredential @@ -182,6 +190,8 @@ This parameter was introduced in Windows PowerShell 3.0. If the **Delay** parameter isn't specified, `Restart-Computer` uses a five second delay. +This parameter is only available on Windows platforms. + ```yaml Type: System.Int16 Parameter Sets: (All) @@ -206,7 +216,8 @@ The acceptable values for this parameter are: - **WMI**: Receives a reply to a **Win32_ComputerSystem** query for the computer. - **WinRM**: Can establish a remote session to the computer by using WS-Management. -This parameter was introduced in Windows PowerShell 3.0. +This parameter was introduced in Windows PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: Microsoft.PowerShell.Commands.WaitForServiceTypes @@ -225,6 +236,8 @@ Accept wildcard characters: False Forces an immediate restart of the computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -247,6 +260,8 @@ The **Timeout** parameter is only valid with the **Wait** parameter. **Timeout** This parameter was introduced in Windows PowerShell 3.0. +This parameter is only available on Windows platforms. + ```yaml Type: System.Int32 Parameter Sets: (All) @@ -274,7 +289,8 @@ The **Wait** parameter isn't valid when you're restarting the local computer. If `Restart-Computer` generates a non-terminating error for **Wait** on the local computer, but waits for the remote computers to restart. -This parameter was introduced in Windows PowerShell 3.0. +This parameter was introduced in Windows PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: System.Management.Automation.SwitchParameter @@ -297,7 +313,7 @@ The acceptable values for this parameter are: **Basic**, **CredSSP**, **Default* **Kerberos**, and **Negotiate**. For more information, see -[AuthenticationMechanism](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +[AuthenticationMechanism](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] > Credential Security Service Provider (CredSSP) authentication, in which the user credentials are @@ -306,6 +322,8 @@ For more information, see > increases the security risk of the remote operation. If the remote computer is compromised, the > credentials that are passed to it can be used to control the network session. +This parameter is only available on Windows platforms. + ```yaml Type: System.String Parameter Sets: (All) @@ -355,7 +373,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -371,11 +390,14 @@ This cmdlet returns no output. ## NOTES -- In Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) - class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account - used to restart the machine. -- On Linux and macOS, `Restart-Computer` uses the `/sbin/shutdown` bash tool. +- In Windows, `Restart-Computer` uses the + [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) + of the Windows Management Instrumentation (WMI) + [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method + requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart + the machine. +- This cmdlet was added for Linux and macOS in PowerShell 7.1. On Linux and macOS, + `Restart-Computer` uses the `/sbin/shutdown` bash tool. ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Management/Stop-Computer.md b/reference/7.6/Microsoft.PowerShell.Management/Stop-Computer.md index e6643ac6de07..effd5c01c11d 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Stop-Computer.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Stop-Computer.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 05/15/2023 +ms.date: 05/07/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/stop-computer?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: Stop-Computer @@ -29,8 +29,9 @@ The `Stop-Computer` cmdlet shuts down the local computer and remote computers. You can use the parameters of `Stop-Computer` to specify the authentication levels and alternate credentials, and to force an immediate shut down. -In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The parameters have no effect on -these platforms. The cmdlet is just calling the native command `/sbin/shutdown`. +In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The non-Windows platforms only +have the **WhatIf**, **Confirm**, and **CommonParameters** parameters. The cmdlet is just calling +the native command `/sbin/shutdown`. ## EXAMPLES @@ -118,6 +119,8 @@ comma-separated list. To specify the local computer, type the computer name or l This parameter doesn't rely on PowerShell remoting. You can use the **ComputerName** parameter even if your computer isn't configured to run remote commands. +This parameter is only available on Windows platforms. + ```yaml Type: System.String[] Parameter Sets: (All) @@ -145,6 +148,8 @@ object and the password is stored as a [SecureString](/dotnet/api/system.securit > For more information about **SecureString** data protection, see > [How secure is SecureString?](/dotnet/api/system.security.securestring#how-secure-is-securestring). +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.PSCredential Parameter Sets: (All) @@ -161,6 +166,8 @@ Accept wildcard characters: False Forces an immediate shut down of the computer. +This parameter is only available on Windows platforms. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -197,7 +204,8 @@ For more information about the values of this parameter, see > increases the security risk of the remote operation. If the remote computer is compromised, the > credentials that are passed to it can be used to control the network session. -This parameter was introduced in PowerShell 3.0. +This parameter was introduced in PowerShell 3.0. This parameter is only available on Windows +platforms. ```yaml Type: System.String