Public/ps1/Configuration/Help/Get-ApprxrInstallationHelp.ps1
|
<#
.SYNOPSIS Shows installation help and options for Apprxr setup. .DESCRIPTION Presents a menu for SQL Gateway or File Watcher setup help, and shows the relevant instructions based on user input. #> function Get-ApprxrInstallationHelp { [CmdletBinding()] param() Write-Host "Apprxr Installation Help Menu" -ForegroundColor Cyan Write-Host ("=" * 40) -ForegroundColor DarkGray Write-Host "1. SQL Gateway Setup" -ForegroundColor Yellow Write-Host "2. File Watcher Setup" -ForegroundColor Yellow Write-Host "3. Log File Management" -ForegroundColor Yellow Write-Host "4. Service Management" -ForegroundColor Yellow Write-Host "Q. Quit" -ForegroundColor Yellow Write-Host ("=" * 40) -ForegroundColor DarkGray $choice = Read-Host "Select an option (1/2/3/4/Q)" switch ($choice) { '4' { Write-Host ""; Write-Host "Service Management" -ForegroundColor Cyan Write-Host ("-" * 40) -ForegroundColor DarkGray Write-Host "1. Install the Apprxr Service:" -ForegroundColor Yellow Write-Host " Use the following command to install the service (requires admin):" -ForegroundColor White Write-Host " Install-ApprxrService" -ForegroundColor Green Write-Host "" Write-Host "2. Start the Service:" -ForegroundColor Yellow Write-Host " Start-ApprxrService" -ForegroundColor Green Write-Host "" Write-Host "3. Stop the Service:" -ForegroundColor Yellow Write-Host " Stop-ApprxrService" -ForegroundColor Green Write-Host "" Write-Host "4. Restart the Service:" -ForegroundColor Yellow Write-Host " Restart-ApprxrService" -ForegroundColor Green Write-Host "" Write-Host "For more details, see the documentation or use Get-ApprxrHelp for command-specific help." -ForegroundColor DarkGray Write-Host ("-" * 40) -ForegroundColor DarkGray } '3' { Write-Host ""; Write-Host "Log File Management" -ForegroundColor Cyan Write-Host ("-" * 40) -ForegroundColor DarkGray Write-Host "1. View the Apprxr Log File:" -ForegroundColor Yellow Write-Host " Use the following command to display the log file contents:" -ForegroundColor White Write-Host " Get-ApprxrLog" -ForegroundColor Green Write-Host "" Write-Host "2. Clean (Rotate) the Log File:" -ForegroundColor Yellow Write-Host " Use the following command to rotate and clean the log file:" -ForegroundColor White Write-Host " Move-ApprxrLogFile" -ForegroundColor Green Write-Host "" Write-Host "For more details, see the documentation or use Get-ApprxrHelp for command-specific help." -ForegroundColor DarkGray Write-Host ("-" * 40) -ForegroundColor DarkGray } '1' { Write-Host ""; Write-Host "SQL Gateway Installation" -ForegroundColor Cyan Write-Host ("-" * 40) -ForegroundColor DarkGray Write-Host "1. Install SQL Gateway Configuration:" -ForegroundColor Yellow Write-Host " Use the following command to install the SQL gateway configuration:" -ForegroundColor White Write-Host " Install-ApprxrRemoteControllerSQL -Tenant '<tenant>' -Credential (Get-Credential) -SqlConnectionString '<connection string>' -LogFolder '<log folder>'" -ForegroundColor Green Write-Host "" Write-Host "2. Test SQL Connection:" -ForegroundColor Yellow Write-Host " Use the following command to test the SQL connection:" -ForegroundColor White Write-Host " Start-ApprxrSqlCommand -Command 'SELECT 1'" -ForegroundColor Green Write-Host "" Write-Host "For more details, see the documentation or use Get-ApprxrHelp for command-specific help." -ForegroundColor DarkGray Write-Host ("-" * 40) -ForegroundColor DarkGray } '2' { Write-Host ""; Write-Host "File Watcher Setup" -ForegroundColor Cyan Write-Host ("-" * 40) -ForegroundColor DarkGray Write-Host "1. Configure a File Watcher Location:" -ForegroundColor Yellow Write-Host " Use the following command to set up a file watcher location:" -ForegroundColor White Write-Host " Set-ApprxrFileWatcherLocation -Name '<LocationName>' -InputFolder '<InputPath>' -VdbName '<VDBName>' -InProgressFolder '<InProgressPath>' -Filter '<Filter>'" -ForegroundColor Green Write-Host "" Write-Host "2. Start All File Watchers:" -ForegroundColor Yellow Write-Host " Start-ApprxrFileWatchers" -ForegroundColor Green Write-Host "" Write-Host "For more details, see the documentation or use Get-ApprxrHelp for command-specific help." -ForegroundColor DarkGray Write-Host ("-" * 40) -ForegroundColor DarkGray } 'Q' { return } 'q' { return } default { Write-Host "Invalid selection. Please run Get-ApprxInstallationHelp again and choose a valid option." -ForegroundColor Red } } } |