Public/Get-MSPBackupAppStatus.ps1
Function Get-MSPBackupAppStatus { <# .SYNOPSIS Get the current status of the MSP Backup Agent .DESCRIPTION Get the current status of the MSP Backup Agent .PARAMETER Path Full path to config.ini file. .EXAMPLE Get-MSPBackupAppStatus Get the current status of the MSP Backup Agent .INPUTS None #> [CmdletBinding()] [OutputType('System.String')] Param( [String]$Path = $Script:ConfigIni ) Begin { Write-Verbose ('{0}:: Function started' -f $MyInvocation.MyCommand) Write-Verbose ('{0}:: Setting location for clienttool.exe' -f $MyInvocation.MyCommand) $BMPath = [Environment]::GetFolderPath('ProgramFiles') + "\Backup Manager" $CmdPath = $BMPath + "\ClientTool.exe" } Process { Write-Verbose ('{0}:: Getting status' -f $MyInvocation.MyCommand) $Status = & $CmdPath -machine-readable control.application-status.get } End { Write-Verbose ('{0}:: Function ended' -f $MyInvocation.MyCommand) Return $Status } } |