---
title: Tips and Tricks
slug: isec/help/enu/tips-and-tricks
createdAt: 2026-08-05T05:48:31.943Z
---

Here are a few tips and tricks that will improve your experience with the API.

- When typing PowerShell commands, use the Tab button to auto-complete the command.
- Use pipelining within your commands to string together a series of actions.
- If you want to view the output when performing a patch scan, be sure to use the **Watch-PatchScan** parameter.
- Example:

```bash
Start-PatchScan –MachineGroups “Sample Group” | Watch-PatchScan
```

You can assign the result of any command to a variable and interact with that variable later in the same PowerShell session.

- Examples:

```bash
$credReference = Get-STCredential
```

```bash
$credReference | Where-Object
```

```bash
{ $_.UserName.Contains(“foo”) }
```

```bash
$myScan = Start-PatchScan –MachineGroups “My Machine”
```

```bash
Wait-PatchScan –Uid ($myScan.Uid)
```

If you want to perform a patch deployment against the results of a particular patch scan, store the patch scan in a variable and pipe it to the deployment operation.

- Example:

```bash
$myScan = Start-PatchScan –MachineGroups “Sample Group”;
```

```bash
$myScan | Watch-PatchScan
```

```bash
Start-PatchDeploy –ScanUid ($MyScan.Uid) –TemplateName “Sample Deploy Template”
```

If you are scripting a patch scan followed by a patch deployment, be sure to use the **Wait-PatchScan** parameter to allow time for the scan to complete before the deployment is initiated.

- Example:

```bash
$MyScan = Start-PatchScan –MachineGroups “Sample Group” | Wait-PatchScan
```

```bash
Start-PatchDeploy –ScanUid ($MyScan.Uid) –TemplateName “Sample Deploy Template”
```

Be sure to load any additional modules that might be needed.

- Example: When interacting with a SQL cluster you might load the following modules:
  - Import-Module ServerManager
  - Add-WindowsFeature RSAT-Clustering
  - Import-Module FailoverClusters

To minimize downtime, you can use the `Invoke-DownloadMissingPatches` command before deploying.
This would enable you to perform a scan one day and then use the `Get-PatchScan` command to deploy from that scan on a different day.
