# $cs.Job_RebootWS

> Marks that this PowerPack requires the workstation to reboot afterwards.

Source: https://docs.capaone.com/capainstaller/powerpacks/cs-job-rebootws/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Marks that this PowerPack requires the workstation to reboot afterwards. This does not reboot the machine immediately — when the script later calls [Exit-PSScript](/capainstaller/powerpacks/exit-psscript/) with `0` (or `3326`), CapaInstaller uses this flag to trigger the actual reboot for the deployment as a whole. Calling it again after a reboot has already been requested is safe; it simply logs that a reboot was already requested.

### Syntax

$cs.Job\_RebootWS(string text)

### Parameters

#### text (String)

Message written to the log explaining why the reboot is required.

### Return value

None

### Example

**PowerShell**

Signal a reboot after a driver installation completes:

```powershell
$cs.Job_WriteLog("Driver installation requires a reboot to complete")
$cs.Job_RebootWS("Reboot required after driver installation")
Exit-PSScript 0
```

Signal a reboot after enabling a Windows optional feature, which typically requires one to take effect:

```powershell
Enable-WindowsOptionalFeature -Online -FeatureName "TelnetClient" -All -NoRestart
$cs.Job_WriteLog("TelnetClient feature enabled, reboot needed before it is usable")
$cs.Job_RebootWS("Reboot required after enabling TelnetClient Windows feature")
Exit-PSScript 0
```

### Related functions

[Exit-PSScript](/capainstaller/powerpacks/exit-psscript/)
