Is it possible to set a set a Vault Online/Offline via PowerShell?
The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.
Is it possible to set a set a Vault Online/Offline via PowerShell?
Sure. You can use methods on the ServerVaultManagementOperations interface to take a vault offline and bring it back online: M-Files API - ServerVaultManagementOperations Object
This is used from PowerShell in the script that's used when building VAF applications. There's an example here: MFilesSamplesAndLibraries/install-application.ps1 at master · M-Files/MFilesSamplesAndLibraries (github.com)
Regards,
Craig.
Works like a charm :)
Will the script wait for the BringVaultOnline / TakeVaultOffline before it proceeds with the next line?
Yes. These block.
Yes. These block.
Thank you very much
Is it also possible to cycle through all vaults not using the vault name? So e.g. take all vaults offline..
The MFilesServerApplication class has a GetVaults method that you could use to get information about the vaults: M-Files API - MFilesServerApplication Object