Runbook: install the MFSQL Connector Web API

This runbook installs the MFSQL Connector Web API on a Windows web server, with the install package (kit version 3.2.0) from Laminin Solutions. Section 1 says what it holds and how to put it on the server.

The install runs from the MFSQL Connector Web API install values workbook (the values workbook). Your team fills in the blank one before the install day, with no passwords; the preparation page says who supplies what, and what to arrange first. Section 2 turns it into the settings.

An instance is one IIS application, with its own folder, application pool and SQL login, for each M-Files vault.

You type a few PowerShell commands on the web server. Each checks the server, shows one plan, asks you once, makes the changes and stops at the first failure. After a fix, run it again: it does only what is left. Exit codes and all other detail are in the reference guide.

Where you are

  1. Before you start

  2. Generate Settings: .\Install.ps1 -Workbook <file>.xlsx

  3. Set up the web server: .\Install.ps1 -Server

  4. Add an instance: .\Install.ps1 -Instance <Key>

  5. Configure M-Files: in M-Files Admin

  6. Test from the vault: .\Install.ps1 -Instance <Key> -Test

  7. Close out: .\Install.ps1 -CloseOut

  8. Roll back, if needed: .\Install.ps1 -Instance <Key> -Remove (the same section also has Move the Web API to a different web server)

  9. Getting help

Work through sections 1 to 7 in order; 3 and 4 repeat for each vault. Use 8 and 9 only when needed. To return later (production after test, another vault): rerun Generate Settings only if the workbook changed, repeat section 3, then sections 4 to 7 for the new vault. Close-out covers the whole server and is safe to repeat.

1. Before you start

Who does what. Your team fills in the values workbook. The web server owner, the SQL Server owner or DBA, the M-Files System Administrator and, for a cloud vault, the M-Files partner of record each prepare a part (details). The web server owner also confirms the server checklist.

The engineer who runs the commands signs in at the web server’s console or over RDP, as a local administrator (a domain account in the local Administrators group will do), not in PowerShell remoting, which the commands refuse. The engineer needs no SQL Server rights. The commands detect which of two cases applies:

  • The install creates each vault’s SQL login itself when the Windows sign-in is a SQL Server sysadmin, or has ALTER ANY LOGIN with db_owner of the vault’s MFSQL Connector database (plus VIEW SERVER STATE for -Remove).

  • Otherwise, or if you do not know, the DBA runs one script for each vault before you add its instance; section 2 says which script, how, and when.

Requirements. The commands check all of these and print what to fix.

  • Web server: Windows Server 2022 or later with .NET Framework 4.8 or later, a DNS name for the Web API and a certificate covering it in Local Computer > Personal.

  • Each vault: its SQL Server has the MFSQL Connector in its own Connector database (I06), uses Mixed Mode authentication and has its port open from the web server; the MFSQL Connector VaultApp is installed and licensed.

Passwords and records. No password goes in the values workbook. Make the vault entries first: the SQL login password (8 to 128 characters, meeting the SQL Server’s password policy) and the shared API password (20 or more characters, a different one). Keeping passwords safe is your team’s responsibility, in any password manager; Laminin Solutions does not hold them. Your change ticket is your own change-control record; the install prints values for it as a convenience, and section 2 writes ValuesCard.txt (every value, no password) to copy from.

Restore points. Through your change process, arrange one for the web server (S17) and one for each SQL Server that will get a first instance login (I31); a whole-server rollback (section 8) depends on them. For the web server, a VM checkpoint, a snapshot or a backup serves as the restore point.

Get the install package onto the web server. It is one ZIP; extracted into C:\MFSQL-Web-API-staging, it gives:

C:\MFSQL-Web-API-staging\MFSQL-WebAPI-Install-3.2.0\
    MFSQLConnectWebAPI.zip                        the Web API: leave it zipped
    MFSQL-Connector-Web-API-install-values.xlsx   the blank values workbook
    MFSQLConnectWebAPI-Install\                   the install scripts: Install.ps1, Run-Step.ps1 and others

The scripts find MFSQLConnectWebAPI.zip one folder above their own and record its SHA-256.

  1. Get the install package and its SHA-256 from Laminin Solutions, via your consultant.

  2. Create a staging folder on the web server as an administrator, not under a user profile, so only Administrators and SYSTEM can change it:

    if (Test-Path C:\MFSQL-Web-API-staging) {
        Write-Warning 'C:\MFSQL-Web-API-staging already exists. Nothing was changed: check who can change it, or use another folder.'
    } else {
        New-Item -ItemType Directory -Path C:\MFSQL-Web-API-staging | Out-Null
        icacls C:\MFSQL-Web-API-staging /inheritance:r /grant:r '*S-1-5-32-544:(OI)(CI)F' '*S-1-5-18:(OI)(CI)F'
    }
    
  3. Copy the install package into C:\MFSQL-Web-API-staging; copying from a workstation over remoting is fine for this one step (the scripts folder’s README.md shows how). Compare its SHA-256 with the one from Laminin Solutions and record it in your change ticket. If they differ, do not use the file: ask Laminin Solutions for it again.

    Get-FileHash C:\MFSQL-Web-API-staging\MFSQL-WebAPI-Install-3.2.0.zip -Algorithm SHA256
    
  4. Extract the install package into C:\MFSQL-Web-API-staging. The inner MFSQLConnectWebAPI.zip stays zipped. Check that the layout matches the picture above: Explorer’s Extract All may add a duplicate top folder. Do not extract over an older MFSQLConnectWebAPI-Install folder: update it as tip F describes.

    Expand-Archive -Path C:\MFSQL-Web-API-staging\MFSQL-WebAPI-Install-3.2.0.zip -DestinationPath C:\MFSQL-Web-API-staging
    
  5. Unblock the files: Windows can block files from a downloaded ZIP, and PowerShell may then refuse to run them. In an elevated Windows PowerShell 5.1 window (nothing changes if nothing is blocked):

    Get-ChildItem C:\MFSQL-Web-API-staging -Recurse | Unblock-File
    
  6. Open Windows PowerShell (5.1, not PowerShell 7) as administrator (tip A shows how to check the window). Change to the scripts folder and allow scripts for this window only:

    Set-Location C:\MFSQL-Web-API-staging\MFSQL-WebAPI-Install-3.2.0\MFSQLConnectWebAPI-Install
    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
    

2. Generate Settings

Generate Settings reads the values workbook, checks every value, and writes the settings. It needs no Excel or other software. You start it with the -Workbook switch of Install.ps1: the command in step 2 below.

  1. Copy the filled-in values workbook (not the package’s blank one) to the web server, for example to C:\MFSQL-Web-API-staging\.

  2. Run it on the web server, from the scripts folder (section 1). When a DBA owns SQL Server, run it early, so the DBA can run each vault’s script (below) before section 4. Otherwise it can open the install day:

    .\Install.ps1 -Workbook C:\MFSQL-Web-API-staging\MFSQL-Connector-Web-API-install-values.xlsx
    

    This reads the values workbook and writes the settings files. It installs nothing and changes no server.

    To check a filled workbook first, add -CheckOnly: .\Install.ps1 -Workbook <file> -CheckOnly writes nothing and needs no elevation, so you can run it on a workstation before install day (what each command does).

It ends with one of three results:

Result

Exit code

What it means and what to do

PASSED

0

Every value is valid and nothing required is missing: go on to section 3

INCOMPLETE

2

Required values are blank (STILL NEEDED). It wrote what it has: fill in, rerun

FAILED

1

A value is wrong (PROBLEMS): correct those cells, rerun. Nothing is written

WARNINGS do not change the result. Put a value that arrives later (such as the address range from Ticket 1) in the values workbook and run Generate Settings again: it changes only that value.

Before the instance is installed, you can change its key: change I01 in the workbook, park the old instance file and its DBA scripts as in R9, and run Generate Settings again. After the install, remove the instance first.

What it writes, in the scripts folder:

  • Server-Settings.psd1, and Instances\<Key>.psd1 for each vault (the settings files).

  • Three SQL scripts for each vault, for a DBA: Instances\<Key>.dba-install.sql, Instances\<Key>.dba-closeout.sql and Instances\<Key>.dba-remove.sql.

  • ValuesCard.txt: every one of the 52 values, with its name and source and no password. Copy lines from it for tickets, and keep it with the install records. It is in the scripts folder on the web server: C:\MFSQL-Web-API-staging\MFSQL-WebAPI-Install-3.2.0\MFSQLConnectWebAPI-Install\ValuesCard.txt. Look up a value by its ID in the reference guide.

Its plan lists each file as new, unchanged or changes. It never silently overwrites a file that holds values: it asks Replace the settings shown above? and keeps a copy in SettingsBackup\<date and time>\. Answer no and nothing is written (exit code 4). It ends with NEXT: .\Install.ps1 -Server, and the DBA’s script.

The SQL part: you or your DBA

Each instance has its own SQL login: a user in the vault’s Connector database, in the role db_MFSQLConnect.

  • Your Windows sign-in can create SQL logins. The install creates the login in section 4; ignore the three scripts.

  • A DBA owns SQL Server. Before section 4, give the DBA Instances\<Key>.dba-install.sql for each vault. The DBA runs it in Management Studio, on the vault’s SQL Server, as a SQL Server sysadmin or as securityadmin with db_owner of the Connector database. It creates the login, user, role membership and test action.

    • It is safe to run twice (what it does).

    • It holds no password. The DBA presses Ctrl+Shift+M, types it there (' as ''; the file is not saved afterwards) and stores it in the vault entry named in I28 (printed by Generate Settings, listed in ValuesCard.txt); you give the DBA that name.

    • dba-closeout.sql runs at close-out, dba-remove.sql only in a rollback.

3. Set up the web server

Run this once for each web server, in the elevated window:

.\Install.ps1 -Server

It runs five stages, [1/5] Check to [5/5] Re-check. The plan lists the IIS features, the MFSQL Web API site with its HTTPS binding and certificate, and the firewall rule. Read its ATTENTION lines, then answer Make the changes above on <server>? [y/N]. Running it again is safe: when every line says KEEP or INFO, answering y changes nothing.

  • Another site answers for the DNS name today, through a binding with no host name, and the name then goes to MFSQL Web API: if anyone reaches that site at this name, answer N and choose another (tip C).

  • The firewall. AllowedRemoteAddress is "Any" allows HTTPS from every address: supported until M-Files provides its range, with the Web API’s own authentication as the barrier (S09). Narrow it at close-out.

It stops without changing anything when no certificate covers the DNS name, when another site already serves the name, when the World Wide Web Publishing Service is stopped or disabled, or when the MFSQL Web API site holds an application that no instance file names (Edge cases explains each stop and its fix). Run the command again after each fix. Windows may ask for a restart after the IIS features (exit code 2): restart, then run it again.

Done looks like: Re-check shows no FAIL. From another machine, browse https://<dns-name>/: the browser trusts the certificate, and IIS answers 403 or 404, because nothing is installed at the site root.

The check also prints DNS resolves '<dns-name>'. Not resolvable from this server is a WARN, not a failure: this server may not be the one that has to resolve the name. It must resolve from the M-Files server that calls the Web API, which matters more, so confirm it there.

4. Add an instance

Run this for each vault. On a server with production and test vaults, install the test instances first (details).

Before the command, for the vault: the vault’s Connector database must already exist on its SQL Server before the command runs (section 1). Then:

  1. The vault app is installed and licensed (I30). In M-Files Admin, vault > Configurations > Other Applications > MFSQL Connector VaultApp exists, and its Dashboard tab shows the license type, expiry date and modules. If the values workbook says the vault runs nowhere yet, skip steps 1 and 2: install the instance, then stop.

  2. Record the vault app version: in M-Files Admin, right-click the vault, choose Applications, and note the MFSQL Connector VaultApp Version (I17).

  3. When a DBA owns SQL Server, the DBA has given you the vault entry name and has run Instances\<Key>.dba-install.sql (section 2).

.\Install.ps1 -Instance DemoDMS-Prod

Replace DemoDMS-Prod with the instance key (I01), which names that vault’s file in Instances\. For a SQL Server certificate the web server does not trust, see Edge cases.

It runs six stages: [1/6] Check, [2/6] Plan, then, after your confirmation, [3/6] SQL login, [4/6] Deploy, [5/6] web.config and [6/6] Endpoint test.

  • Stage 1 checks the vault’s SQL Server and Connector database, the package and this instance. A FAIL the install will fix is marked The install fixes this.

    • Vault app version warns, because the scripts cannot read the vault’s version. Compare the version in the warning (from the package) with step 2’s, by the first three parts. If they differ, answer N and ask Laminin Solutions, unless it is a known pair. For the one known pair the row shows INFO, not a warning, and names the vault app version M-Files Admin should show; any other difference still warns and says to stop.

    • Named SQL instance without a port warns: give the port in I05, or make sure SQL Browser (UDP 1434) is reachable, then go on. Step 5 and Step 6 in console text mean stages [3/6] and [4/6].

  • When your Windows sign-in cannot create SQL logins, or cannot be used on the SQL Server at all, the command reads SQL Server as the instance’s own login instead. It asks for that login’s password (I28) once, before stage 1. If the DBA’s script has not run yet, it stops before any change with Ask your DBA to run Instances\<Key>.dba-install.sql, then run this again. Run it again after the DBA has.

  • The plan says which way SQL goes: the login is already set up, or the command creates what is missing. Then it asks Make the changes above for instance '<Key>'? [y/N].

    • Login already set up. The run signs in as the login and reads the Connector database; with the right to create logins it also checks with your Windows sign-in.

    • A reinstall shows an ATTENTION line: the instance folder is replaced, after a backup. When its web.config holds a usable signing key, the line says that web.config is kept with its key, so tokens already issued stay valid (the signing key); only a web.config with no usable key gets a new one. The SQL and shared API passwords you type are written again. A kept web.config is not refreshed from the package: when the package’s differs from it by more than its values, a WARN line names the sections to carry over by hand.

  • Two passwords are asked once, after you confirm: hidden, kept in memory only until the command ends, never parameters. Store both in your password vault. The package’s shipped defaults are refused.

    • SQL login password (I28). When the command creates the login, you choose it (rules in section 1) and type it twice; make its vault entry first. When the DBA created it, type the one from the DBA’s entry.

    • Shared API password (I29). Choose 20+ characters (shorter warns), not the SQL password, and type it twice.

  • The API user name (I11) defaults to mfsql- plus the instance key in lower case. One per instance, never reused.

  • Stage 6 runs eight endpoint checks; the first request to a new instance can take about 30 seconds (cold start). Then it prints the Api URL (I16), the Api UserName and the vault entry’s name, for section 5.

Done looks like: RESULT: the endpoint is reachable, serving, and authenticating. Note the Api URL in your change ticket.

Stop and raise it with Laminin Solutions if check 7/8 reports HTTP 200 without a token (anyone who can reach the URL could read the SQL connection string: do not expose the site to the internet), or check 8/8 reports HTTP 200: a token from this instance opened another vault's instance.

If it stops at a FAIL, the footer says Stopped at [n/m] <stage>. Fix what is listed above it and run the same command again (troubleshooting), or take the instance off with -Remove (section 8).

After you add a second or later instance, check isolation both ways: for each earlier instance, run .\Run-Step.ps1 8 -Instance <Key> (the step-by-step tool). It only reads, and asks once for that instance’s shared API password.

Rotating an instance’s signing key. Running .\Install.ps1 -Instance <Key> again keeps the key; only a rotation replaces it. To rotate it (for example when a copy of its web.config may have been seen by someone who should not have it), run the key-only step in an elevated Windows PowerShell in the scripts folder. The first command is a preview and changes nothing:

.\Run-Step.ps1 7 -Instance <Key> -SigningKeyOnly -RotateSigningKey
.\Run-Step.ps1 7 -Instance <Key> -SigningKeyOnly -RotateSigningKey -Apply

It saves a copy of web.config first (the copy still holds the old key), writes a new random key that is never shown, and asks for no password. Tokens already issued stop working once IIS restarts the application, which it does by itself when web.config changes; a token lasts 30 minutes anyway. The vault app logs in again on its next call, so nothing changes in M-Files Admin. Then test with .\Run-Step.ps1 8 -Instance <Key>. The details are in the signing key.

5. Configure M-Files

The vault must now send its calls to this instance. Only M-Files System Administrators see the Web API fields, in M-Files Admin > vault > Configurations > Other Applications > MFSQL Connector VaultApp > Configuration. On a cloud vault only M-Files Cloud Support sets the Api URL, through a ticket (which fields show where).

Ticket 1, for a cloud vault. Raise it well before the install date, once the DNS name and the vault’s instance key are agreed and the MFSQL Connector VaultApp is installed in the vault with its license applied: it has the longest lead time, and the Api URL it needs is known once Generate Settings has run. The vault’s M-Files partner of record raises it with M-Files Cloud Support, who confirm the date and time window (I26) in which they will set the Api URL. The ticket asks them to set the Api URL (I16, with the trailing slash, from ValuesCard.txt; section 4 prints it again), say if they can provide the address range M-Files Cloud calls from (S09), report the vault’s current Api URL (I20) unless the VaultApp is new (I19), and say how the change is reversed. Put the S02, I01, I02 and I16 lines of ValuesCard.txt in the ticket; the text to send is under M-Files Cloud Support tickets. If there is no ticket, stop after section 4: nothing in M-Files has changed.

  1. Record the vault app’s current configuration first, in your change ticket: the current Web Api Details and ConnectionString values (I19 to I24). On a newly installed VaultApp the Web Api Details are empty: record them as empty. Passwords show masked, so they must already be in the password vault.

    • If the ConnectionString (SQL) password is not in the password vault, stop: the configuration could not be put back. I27 names the vault entry (tip H).

    • An existing Api Password need not be known: a rollback can set a new one on both ends.

  2. In Web Api Details, set Api UserName to the user name from the command’s output (I11), Api Password to the shared API password (I29, from your password vault), and Api URL to the Api URL, with the trailing slash. On a cloud vault, confirm with M-Files Cloud Support that they set the URL, exactly as written.

  3. Leave the ConnectionString fields empty: the instance holds the database connection.

  4. Right-click Configurations, choose Refresh, and open the Dashboard tab.

Done looks like: the previous configuration is recorded, and the Dashboard shows the Connector details.

6. Test from the vault

Run this for each vault, after the M-Files configuration:

.\Install.ps1 -Instance DemoDMS-Prod -Test

It runs three stages: [1/3] Plan, [2/3] Add and [3/3] Evidence. After your confirmation (Add the test action for instance '<Key>'? [y/N]) it adds the action Web API Ping, under MFSQL Test, for the vault user group in I15 (default ContextMenu); when your DBA’s script already added it, it only checks. The action only records each call in a log table: nothing in the vault is read or changed.

  1. When it says so, go to M-Files Desktop, signed in as a member of that user group, right-click any checked-in object, run MFSQL Test > Web API Ping, then press Enter in the window.

  2. It looks back 30 minutes for the call in SQL Server. If it finds none, it asks Check again? [y/N].

  3. Write-back test (by hand), where the SQL Server has M-Files Desktop installed: run one of your own actions that updates the selected object.

Done looks like: PASS - a context menu action executed on SQL within the window. and Everything checks out. The action stays until close-out. If neither your sign-in nor the DBA’s script has added it, the command says to ask your DBA to run Instances\<Key>.dba-install.sql.

7. Close out

Do this at the end of every install session, whether it set up the server or added a vault.

  1. Narrow the firewall once M-Files provides its address range (Ticket 1 may return it): put it in the values workbook, run Generate Settings again (section 2), then .\Install.ps1 -Server. While the range is Any, the plan prints two WARN lines under the firewall (AllowedRemoteAddress is "Any", and that the Web API’s own authentication is the barrier until the range is known). With a range in the workbook, the plan shows the firewall rule’s remote addresses changing from Any to that range. If no range is available, leave Any and record it in the change ticket.

  2. Run close-out:

    .\Install.ps1 -CloseOut
    

    Its stages are [1/4] Plan, [2/4] Test actions, [3/4] Validate and [4/4] Record and logs. After your confirmation it removes each instance’s test action and validates the site and every instance (a FAIL stops it before any log is deleted), prints the change-ticket record, and deletes the kit’s transcripts in logs\ and any SupportBundle-*.zip; its plan lists them.

    When your Windows sign-in cannot change the Connector database, a test action stays for the DBA (the plan names Instances\<Key>.dba-closeout.sql); no log is deleted, so run close-out again after the DBA has. An instance whose I28 is left empty is NOT CHECKED: it is not known whether a test action is left in its database. The test actions of the other instances are removed, and then close-out stops: it runs no validation and deletes no log until that instance has been checked.

    An instance that is configured but not installed yet (its file is in Instances\, its vault is not set up on this server) has no SQL login, so the whole-server close-out waits for it. If your Windows sign-in cannot read its database, the instance is NOT CHECKED and close-out stops at the plan. If it can, close-out goes on and stops at [3/4] Validate with not deployed - Step 6; the stop names the first and last way out below. Do one of these:

    • Close out the installed instances one at a time: .\Install.ps1 -CloseOut -Instance <Key>. It has the same four stages, validates that instance only, prints the record for it and keeps the logs and support bundles.

    • Install the instance (section 4), then run .\Install.ps1 -CloseOut.

    • Park its instance file (R9) until it is installed, then run .\Install.ps1 -CloseOut.

    Only the whole-server close-out deletes the logs and support bundles, so run it once, after every instance is installed or parked.

  3. Copy the record into your change ticket, for your change control; it is not saved. It holds the SHA-256 of MFSQLConnectWebAPI.zip, the kit version, each Api URL (I16), the certificate expiry date and the firewall remote addresses; no password.

  4. Check the password vault has each instance’s passwords (I28, I29); monitor each URL and the certificate expiry.

  5. Keep and retain: keep the values workbook, ValuesCard.txt and Instances\ with your install records. The backup folder (default C:\MFSQLWebApiBackups) holds web.config copies and replaced instance folders, with passwords and each instance’s signing key. The scripts never clean it: set a retention period (S15) or exclude it from server backups.

Done looks like: the change ticket records what the install showed, and the transcripts are gone.

8. Roll back

  1. M-Files first. Restore the vault app configuration you recorded in section 5, or point its Api URL at a replacement. Then refresh Configurations. On a cloud vault, raise Ticket 2: M-Files Cloud Support sets the Api URL back to the Ticket 1 value (empty if the VaultApp was new) or a replacement.

  2. Remove the instance:

    .\Install.ps1 -Instance DemoDMS-Prod -Remove
    

    Its stages are [1/3] Plan, [2/3] Remove and [3/3] Validate. The plan lists what it will remove and keep, with the reason; confirm by typing the instance key exactly (what it does).

    • A kept SQL login: it never touches MFSQLConnect (details).

    • When a DBA owns SQL Server and your sign-in cannot drop logins and users, it removes the rest and says Ask your DBA to run Instances\<Key>.dba-remove.sql, then run this again. Then run -Remove again (details).

  3. Tidy up. Retire the instance’s vault entries (I28, I29) and delete its backup, which holds passwords.

Whole server: roll back each instance, then restore the section 1 restore point, agreed with its owner (details).

Move the Web API to a different web server

Use this to run an instance on another web server and retire it on the first. This move has not been rehearsed in the lab: the steps below use only commands and settings the kit has, in the order they depend on each other, and what the kit does not say is marked not confirmed. Keep the old instance running until step 4 passes: it is your way back, by pointing the Api URL at it again.

  1. Set up the new server. On the new web server, work through section 1 and section 2 (the values workbook has a Server sheet and one sheet per instance; the new server needs its own Server-Settings.psd1 and Instances\<Key>.psd1), then section 3:

    .\Install.ps1 -Server
    

    A certificate that covers the new server’s DNS name (S02) must be on it, or the command stops. Whether the DNS name can stay the same, and how to move it, is not confirmed by the kit; if the name changes, so does the Api URL.

  2. Add the instance on the new server, as in section 4:

    .\Install.ps1 -Instance <Key>
    
    • The SQL login. The instance key (I01) gives the default SQL login name (MFSQLWebAPI_<Key>). If the new instance uses the same SQL Server, database and key as the old one, it uses the same login, and -Remove on the old server (step 5) drops that login unless it still has sessions open or another instance file on the old server names it: the old server cannot see the new instance. Give the new instance a different key, so it has a login of its own (I01, I28). Using the same key on the same SQL Server is not confirmed to be safe.

    • The signing key. The new instance makes its own signing key at its web.config stage; nothing is copied from the old one, and the key is never typed or stored in the password vault (the signing key). Tokens the old instance issued do not open the new one, so the vault app logs in again on its next call.

    • The shared API credentials (I11, I29) are asked for again on the new server (hidden, twice). The kit accepts the same user name and password as the old instance, or new ones; whatever you choose is what the vault app must hold in step 3. A different key also gives a different default API user name (mfsql- plus the key in lower case).

    • Record the new Api URL (I16) the command prints.

  3. Point the vault at the new instance, as in section 5: record the vault app’s current Web Api Details first, then set Api URL to the new instance’s, and Api UserName and Api Password if they changed, and refresh Configurations. On an M-Files Cloud vault only M-Files Cloud Support sets the Api URL: raise a ticket as in section 5 and section 8, asking them to set the new Api URL, and say that the old one is still running. Do nothing to the old instance until the ticket is done.

  4. Verify on the new server, as in section 6:

    .\Install.ps1 -Instance <Key> -Test
    

    Also run .\Run-Step.ps1 8 -Instance <Key> for each instance on the new server (isolation check), then close-out there (.\Install.ps1 -CloseOut). If anything fails, point the Api URL back at the old instance (on a cloud vault, through Cloud Support) and stop here.

  5. Retire the old instance, on the old server, once the new one has carried real calls for as long as your change process requires: section 8 steps 2 and 3, that is .\Install.ps1 -Instance <Key> -Remove with the old instance’s key, then retire its vault entries and delete its backup. Removing the old server’s site and certificate once it has no instance left is not confirmed by the kit beyond the whole-server roll back (itself not rehearsed).

9. Getting help

Each command prints what to fix; Troubleshooting lists the usual symptoms. Otherwise, make a support bundle (.\Run-Step.ps1 support -Instance DemoDMS-Prod) and send it securely to Laminin Solutions (how). An AI assistant can guide you through this runbook: the prompt.