PowerShell reference

The ZeroPortal module drives the portal through its REST API: packages, connection groups, entitlements, policies, groups, permissions, licences, backup. It runs on Windows PowerShell 5.1 and PowerShell 7.

Getting started

The module is installed with the server. On another machine, copying the PowerShell\ZeroPortal folder from the installation is enough.

Import-Module ZeroPortal
Set-AppvZeroPortalCmdLetConfiguration -BaseUrl 'https://zeroportal.corp.local:8080'
Get-AppvZeroPortalPackage

Calls authenticate with the Windows account of the caller (Kerberos). Scripts without a domain, or automation, use an API key, see Devices without a domain (API key).

ZeroPortal module (server)

Configuration

Get-AppvZeroPortalCmdLetConfigurationReturns the current ZeroPortal module configuration.
Set-AppvZeroPortalCmdLetConfigurationSets the server URL and/or connection options for all ZeroPortal cmdlets. Each parameter is optional; omitting it leaves the current value unchanged.

Package management

Get-AppvZeroPortalPackageRetrieves App-V packages from the ZeroPortal server.
Import-AppvZeroPortalPackageImports an App-V package into the ZeroPortal server.
Remove-AppvZeroPortalPackageRemoves an App-V package from the ZeroPortal server.
Publish-AppvZeroPortalPackagePublishes an App-V package (Enabled = true).
Unpublish-AppvZeroPortalPackageUnpublishes an App-V package (Enabled = false).
Set-AppvZeroPortalPackageUpdates metadata of an App-V package (description, package URL, configurations).
Grant-AppvZeroPortalPackageGrants AD groups or users access to a package (entitlement).
Revoke-AppvZeroPortalPackageRevokes access to a package for AD groups or users.

Package configuration

Get-AppvZeroPortalPackageDeploymentConfigurationReturns the deployment configuration (machine policy) of a package.
Set-AppvZeroPortalPackageDeploymentConfigurationImports or replaces the deployment configuration (machine policy) of a package.
Get-AppvZeroPortalPackageUserConfigurationReturns the user configuration of a package.
Set-AppvZeroPortalPackageUserConfigurationImports or replaces the user configuration of a package for a SID.

Connection group management

Get-AppvZeroPortalConnectionGroupRetrieves App-V connection groups from the ZeroPortal server.
New-AppvZeroPortalConnectionGroupCreates a new App-V connection group.
Copy-AppvZeroPortalConnectionGroupVersionCopies an App-V connection group as a NEW VERSION.
Remove-AppvZeroPortalConnectionGroupRemoves an App-V connection group.
Set-AppvZeroPortalConnectionGroupUpdates metadata of a connection group (name, description, priority).
Publish-AppvZeroPortalConnectionGroupPublishes a connection group (Enabled = true).
Unpublish-AppvZeroPortalConnectionGroupUnpublishes a connection group (Enabled = false).
Grant-AppvZeroPortalConnectionGroupGrants AD groups or users access to a connection group.
Revoke-AppvZeroPortalConnectionGroupRevokes access to a connection group for AD groups or users.
Add-AppvZeroPortalConnectionGroupPackageAdds a package to a connection group.
Remove-AppvZeroPortalConnectionGroupPackageRemoves a package from a connection group.
Set-AppvZeroPortalConnectionGroupPackageUpdates the properties of a package within a connection group.
Update-AppvZeroPortalConnectionGroupIncrements the VersionGuid of a connection group so App-V clients detect the change.

MSIX package management

Get-MsixZeroPortalPackageLists MSIX catalog packages (name/family wildcard or id).
Import-MsixZeroPortalPackageImports an MSIX/APPX package (or bundle) from a repository path.
Set-MsixZeroPortalPackagePublishes or unpublishes MSIX packages (Enabled flag).
Remove-MsixZeroPortalPackageDeletes MSIX packages from the catalog (incl. entitlement cleanup; generated App Attach disks too when the portal setting MsixAppAttachDeleteWithPackage is on).
Get-MsixZeroPortalPackageEntitlementLists the entitlements (AD groups/users) of an MSIX package.
Grant-MsixZeroPortalPackageGrants an AD group (or SID) access to an MSIX package.
Copy-MsixZeroPortalPackageEntitlementCopies a package's entitlements onto its dependencies and publishes them.
Revoke-MsixZeroPortalPackageRevokes access to an MSIX package for an AD group name or SID.

Migration export/import

Get-ZeroPortalConfigurationValueLists the PortalConfiguration key/value store (full admins only). Sensitive names (password/secret/token/...) are listed without value.
Set-ZeroPortalConfigurationValueCreates or updates one PortalConfiguration value (full admins only).
Export-ZeroPortalPolicyBuildingBlockExports a policy set (or a single policy) as a building-block XML string.
Import-ZeroPortalPolicyBuildingBlockImports a building-block XML (sets + policies; also accepts GPP XML files).
Export-ZeroPortalConfigurationWrites the portal configuration to a file - a backup (XML) or a migration export (JSON).
Import-ZeroPortalConfigurationRestores a ZeroPortal configuration backup, or replays a migration export.
Export-ZeroPortalConfigurationScriptWrites the portal's current state as a RUNNABLE PowerShell script.

Licensing

Get-ZeroPortalLicenseLists the installed licences, including the built-in allowance.
Import-ZeroPortalLicenseUploads a signed licence file (*.zplic).
Remove-ZeroPortalLicenseRemoves an installed licence file.
Get-ZeroPortalLicenseModeShows the licence counting mode and the current numbers.
Set-ZeroPortalLicenseModeSets the licence counting mode (PerUser or PerDevice).

Identity

New-ZPRootPasswordHashCreates a ZPH1 password hash for the portal's root account or an internal user.
Find-ZeroPortalPrincipalSearches a directory source for principals (groups and/or user accounts).
Get-ZeroPortalGroupLists the portal permission groups.
New-ZeroPortalGroupCreates a portal permission group.
Remove-ZeroPortalGroupRemoves a portal group including its members and the permissions granted to it.
Get-ZeroPortalGroupMemberLists the members of a portal group.
Add-ZeroPortalGroupMemberAdds a principal to a portal group. Members may come from any identity source.
Remove-ZeroPortalGroupMemberRemoves a member from a portal group (MemberId from Get-ZeroPortalGroupMember).
Get-ZeroPortalInternalUserLists the internal portal accounts (accounts that work without Active Directory).
New-ZeroPortalInternalUserCreates an internal portal account.
Set-ZeroPortalInternalUserEnables or disables an internal portal account.
Remove-ZeroPortalInternalUserRemoves an internal portal account including its memberships and permissions.

Enrollment and API keys

Get-ZeroPortalEnrollmentTokenLists the agent rollout tokens.
New-ZeroPortalEnrollmentTokenCreates a rollout token and returns its value ONCE.
Set-ZeroPortalEnrollmentTokenRe-opens, extends or closes a rollout window.
Remove-ZeroPortalEnrollmentTokenDeletes a rollout token. Keys already issued through it stay valid.
Get-ZeroPortalApiClientLists the known clients and the state of their API credentials.
Set-ZeroPortalApiClientDisables or re-enables the API credential of a client.

Module permissions

Get-ZeroPortalModulePermissionLists the module permission matrix — one object per principal and module.
Set-ZeroPortalModulePermissionSets one cell of the module permission matrix.
Remove-ZeroPortalModulePermissionRemoves every module permission of one principal.

Health / Node status

Get-ZeroPortalHealthReturns the health status of a ZeroPortal node.
Get-ZeroPortalReplicationStatusReturns the MariaDB replication status of the configured ZeroPortal node.

Cluster topology

Get-ZeroPortalClusterNodeLists the nodes registered in this node's HA topology.
Remove-ZeroPortalClusterNodeRemoves a node from this node's HA topology registry.

Policy system

Get-ZeroPortalPolicyLists ZeroPortal policies (device/user policy XML instances).
New-ZeroPortalPolicyCreates a new policy from a ZpPolicy XML document.
Set-ZeroPortalPolicyUpdates a policy (name, description, enabled, XML). Bumps the revision.
Remove-ZeroPortalPolicyDeletes a policy (memberships and history are removed with it).
Get-ZeroPortalPolicyHistoryShows the revision history of a policy.
Restore-ZeroPortalPolicyRolls a policy back to a historic revision (as a new, higher revision).
Get-ZeroPortalPolicySetLists policy sets with their ordered members.
New-ZeroPortalPolicySetCreates a policy set (organizational container, disabled until published).
Set-ZeroPortalPolicySetUpdates a policy set (name, description, priority, enabled, default targeting).
Remove-ZeroPortalPolicySetDeletes a policy set (memberships removed, policies stay).
Add-ZeroPortalPolicySetMemberAdds a policy to a set (with per-set priority).
Set-ZeroPortalPolicySetMemberUpdates priority/enabled of a set membership.
Remove-ZeroPortalPolicySetMemberRemoves a policy from a set (the policy itself stays).
Get-ZeroPortalRoleAssignmentLists portal role assignments (delegated administration, e.g. PolicyAdmin).
Add-ZeroPortalRoleAssignmentAssigns an AD group (or SID) to a portal role. Members of a PolicyAdmin group may manage policies without being portal full admins.
Remove-ZeroPortalRoleAssignmentRemoves a portal role assignment (by SID or resolved group name).

ZeroPortalAgent module (client)

The ZeroPortalAgent module ships with the client agent and configures the individual machine: publishing servers, switches, triggering a sync, listing packages. It runs in an elevated PowerShell on the client; the help comes from the cmdlet source code.

Publishing servers

Add-ZPAgentPublishingServerRegisters a ZeroPortal publishing server for this machine.
Set-ZPAgentPublishingServerModifies a registered publishing server (name, URL, refresh participation, timeout).
Get-ZPAgentPublishingServerLists the registered publishing servers.
Remove-ZPAgentPublishingServerRemoves a registered publishing server by id or name.

Configuration

Get-ZPAgentConfigurationEffective agent configuration as ONE flat list — the `Get-AppvClientConfiguration` UX: one row per setting with `Name`, `Value`, `SetByGroupPolicy` and `Area` (MSIX, AppV, Agent, Policy).
Set-ZPAgentConfigurationWrites agent configuration.
Set-ZPAgentDisplayNameSets the label this device or this user appears under in the portal.

Sync and status

Get-ZPAgentStatusHealth check: service reachability, versions, server list.

Packages and maintenance

Get-ZPAgentPackageLists the agent-managed packages from both tracking scopes: machine (HKLM ManagedPackages) and current user (HKCU UserRegistrations).
Get-ZPAgentMountedPackageShows where each App Attach package's data REALLY lives - the mounted image folder behind the WindowsApps reparse point - and whether the active mount matches the tracked delivery format/disk (CIM vs VHDX).

Sync and status

Sync-ZPAgentPublishingServerTriggers a sync (App-V-style verb: mirrors `Sync-AppvPublishingServer`).

Packages and maintenance

Invoke-ZPAgentPendingRemoveSweepAsks the service kernel to drain deferred removals (RemovalPolicy WhenIdle/OnReboot → PendingRemove entries) now.
Clear-ZPAgentLogDeletes the agent's file logs — service/machine logs under %ProgramData% (needs elevation) and the current user's UserSync logs under %LocalAppData%.

Sync switches

Enable-ZPAgentSyncSwitches the selected sync features on (HKLM, machine-wide).
Disable-ZPAgentSyncSwitches the selected sync features off (HKLM, machine-wide).
Get-ZPAgentSyncThe three switches with their effective state and its source (GroupPolicy / Local / Default) - a GPO overrides the local value.