# CMS_GetPackageStatus

> Returns the local status for the specified package.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/cms-functions/cms-getpackagestatus/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Returns the local status for the specified package. Values can be ‘Installed', 'Installing', 'Waiting', 'Failed', 'Not Scheduled' or 'Package not found’. 'Not scheduled' indicates that the package is not linked to the unit

### Syntax

**VBScript**

```vb
CMS_GetPackageStatus(sPackage, sVersion) As Boolean
```

**PowerShell**

```powershell
[bool] CMS_GetPackageStatus -package <string> -version <string>
```

### Parameters

#### sPackage (String)

Name of package

#### sVersion (String)

Version of package

### Return value

**VBScript**

Boolean, TRUE if function completed successfully. The result will be stored in gsValue

**PowerShell**

Result will be returned as the result of the function.

### Example

**VBScript**

```vb
If bStatus Then bStatus = CMS_GetPackageStatus("CapaInstaller", "v1.0")
If bStatus Then bStatus = Job_WriteLog("Custom", "gsValue: " & gsValue, bStatus, True)

```

**PowerShell**

```powershell
$status = CMS_GetPackageStatus 'AutoCad 11' 'v1.0'
$cs.Job_WriteLog("Status: " "The AutoCad 11 package status is $status")

#Expected output:
2023-11-19 23:13:04 - Status: The AutoCad 11 package status is Installed

```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/) [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)
