Is it possible to set a set a Vault Online/Offline via PowerShell?
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.
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