Migration from Installer to PowerShell
danger
Attention:
- The instructions describe the preparation and migration of Passwork, installed using the Passwork installer or manually, to the PowerShell module.
- The instructions are intended for single Passwork installations and are not suitable for failover solutions.
Preparation
Open PowerShell as "Administrator":
Using the Start context menu
- Right-click on the Start icon in the lower-left corner of the screen.
- Select "Windows PowerShell (Administrator)" from the context menu.
Using the Start menu
- Left-click on the Start icon in the lower-left corner of the screen.
- Type
powershell - Open PowerShell as "Administrator" by pressing
Ctrl + Shift + Enter
Download the PassworkModule.zip archive to the current directory:
- PowerShell
if (-not (Test-Path "$pwd\PassworkModule.zip")) {
(New-Object System.Net.WebClient).DownloadFile(
"https://repos.passwork.pro/repository/powershell/PassworkModule.zip",
"$pwd\PassworkModule.zip"
)
Write-Host "Module successfully downloaded" -ForegroundColor Green
} else {
Write-Host "Module archive already exists" -ForegroundColor Red
}
info
In case of errors, the archive can be downloaded manually: https://repos.passwork.pro/repository/windows-powershell/PassworkModule.zip
Extract the PowerShell module:
- PowerShell
# Get the location of PowerShell modules
$windowsModulePaths = $env:PSModulePath -split ";" | Where-Object { $_ -like "C:\Windows*" }
# Extract the PowerShell module to the directory
Expand-Archive `
-Path "$pwd\PassworkModule.zip" `
-DestinationPath $windowsModulePaths -Force
# Remove the PassworkModule.zip archive
Remove-Item "$pwd\PassworkModule.zip"
Migration
Description
Migration will collect and record information about the used components into a separate file, remove the Passwork installer, and add the ability to use administration functions.
Launching migration process
Start the migration:
- PowerShell
Set-Passwork-PowerShell
Actions performed
- Processing PassworkSetup.exe
- Processing the Passwork website
- Retrieving the used Passwork version
- Checking the certificate
- Processing PHP
- Processing MongoDB
- Processing Shortcuts in the Start menu and links on the Desktop
The script will create the file C:\inetpub\.passwork_component, which contains details needed for the correct operation of the PowerShell module:

Example of the .passwork_component file after migration
- PowerShell
PASSWORK_SETUP = 1
PS_REMOVE = 1
SITE_NAME = Passwork Web Site
PHYSICAL_PATH = C:\inetpub\wwwroot\passwork
PASSWORK_VERSION = 060403
CERT = dwVxgK2WquWvF6pZFV5cuNCE4zlu8GcY5XzRz8ziFaWENbcirdZfSAMlxBvhKXIGmRwNgvq3DIVEf8gr
PHP_VERSION = 8.0.20
DB_VERSION = 4.2.9
DB_CONFIG = C:\Program Files\MongoDB\Server\4.2\bin\mongod.cfg
DB_ROOT = C:\Program Files\MongoDB
MIGRATE = 1