Migration to Passwork 7
Passwork update to version 7
Windows Server
15min
this instruction assumes the following location of components and passwork the passwork location is — c \inetpub\wwroot\passwork php8 3 location — c \program files\php8 3 passwork web site name in iis web server — passwork web site 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 write powershell open powershell as "administrator" with the combination — ctrl + shift + enter to check the passwork location and website name definition, you can execute the following code powershell # import module import module webadministration \# get a list of all sites in iis $sites = get website \# header output write host "`n list of sites in iis `n" foregroundcolor blue foreach ($site in $sites) { write host "website " nonewline foregroundcolor white write host $site name foregroundcolor darkgreen \# getting bindings write host " bindings " foregroundcolor darkcyan foreach ($binding in $site bindings collection) { write host " protocol " nonewline foregroundcolor gray write host $binding protocol foregroundcolor white write host " address " nonewline foregroundcolor gray write host $binding bindinginformation foregroundcolor white } \# get the physical path $physicalpath = (get webconfigurationproperty filter "system applicationhost/sites/site\[@name='$($site name)']/application\[@path='/']/virtualdirectory\[@path='/']" name physicalpath) value write host " physical path " nonewline foregroundcolor darkcyan write host $physicalpath foregroundcolor white write host " " foregroundcolor darkgray } obtaining the latest version of the passwork create a temporary directory to receive the passwork powershell new item path "$env\ windir\temp\update passwork" itemtype directory if the passwork server is located in a closed loop, you need to go to passwork customer portal https //portal passwork pro/ and manually get version 7 and move it to the server in a directory named — c \windows\temp\update passwork\passwork zip go to passwork customer portal https //portal passwork pro/ and copy the api key to get the current version create an api key variable powershell $api key = "your api key" check the available version of passwork from the customer portal using the copied api key with a request powershell invoke restmethod uri "https //portal passwork pro/api/version?apikey=$api key" method get correct output powershell response \ @{last available version=07xxxx} you need to make sure that version 7 of passwork is available for download — 07xxxx get version 7 of passwork using the prompt powershell try { (new object system net webclient) downloadfile( "https //portal passwork pro/api/download?apikey=$api key", "$env\ windir\temp\update passwork\passwork zip" ) write output "passwork archive successfully received" } catch { write output "error receiving passwork $ " } clear the api key variable powershell remove variable api key update to the latest version get the current version of passwork into a variable powershell $version = get content "$env\ systemdrive\inetpub\wwwroot\passwork\version" copy the passwork configuration file to a separate directory powershell copy item path "$env\ systemdrive\inetpub\wwwroot\passwork\app\config\config ini" destination "$env\ systemdrive\inetpub\wwwroot\\" create an archive of the current version of passwork to be able to roll back to a previous version powershell compress archive path "$env\ systemdrive\inetpub\wwwroot\passwork\\ " destinationpath "$env\ systemdrive\inetpub\wwwroot\passwork $version zip" force delete all contents from the passwork directory powershell remove item path "$env\ systemdrive\inetpub\wwwroot\passwork\\ " recurse force unzip passwork version 7 to a physical location powershell expand archive path "$env\ windir\temp\update passwork\passwork zip" destinationpath "$env\ systemdrive\inetpub\wwwroot\passwork\\" download the rewrite rules (web config) and put them in the new version of passwork — $env\ systemdrive\inetpub\wwwroot\passwork\public\web config https //archbee doc uploads s3 amazonaws com/w jxazppyuprqlll6w3gi xdhtwilsezqh1ikx9glpz 20250309 203623 config php registration and extension activation import iis modules and register the php version powershell import module iisadministration add pssnapin phpmanagersnapin new phpversion scriptprocessor "$env\ programfiles\php8 3\php cgi exe" sitename "passwork web site" virtualpath "/" activate php extensions for the passwork website powershell $extensions = @( "php curl dll", "php gd dll", "php gettext dll", "php intl dll", "php ldap dll", "php mbstring dll", "php mongodb dll", "php mysqli dll", "php openssl dll", "php pdo pgsql dll", "php pdo sqlite dll", "php pgsql dll", "php soap dll", "php zip dll", "php fileinfo dll" ) foreach ($extension in $extensions) { write host "php extension activated $extension" set phpextension name $extension status enabled sitename "passwork web site" virtualpath "/" } activate additional php methods for the passwork website powershell $phpversion=(get phpconfiguration sitename "passwork web site" virtualpath "/") version set webconfigurationproperty pspath "iis \sites\passwork web site" filter "system webserver/handlers/add\[@name='php $phpversion']" name "verb" value "get,head,post,put,delete,patch" delete the temporary directory location of the passwork version 7 archive powershell remove item path "$env\ windir\temp\update passwork" recurse force set permissions for the physical location of the passwork powershell invoke expression "icacls '$env\ systemdrive\inetpub\wwwroot' /grant 'iis iusrs (oi)(ci)`m'" invoke expression "icacls '$env\ systemdrive\inetpub\wwwroot' /grant 'users (oi)(ci)`m'" invoke expression "icacls '$env\ systemdrive\inetpub\wwwroot' /grant 'iusr (oi)(ci)`m'" passwork update to version 7 docid\ mirirltabi9ksiabc5ih1 migration of passwork database objects docid\ us6r fvttqytaxn hn3df