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)