TMConsole.Provider.Azure.SiteRecovery.psm1


## Setup an apropriate quiet environment
$global:ConfirmPreference = 'None'  ## Allows functions that would typically require confirmation to be overridden

# ## Modules That must be installed
# $RequiredModules = @(
# 'AWS.Tools.Common'
# 'AWS.Tools.EC2'
# 'AWS.Tools.MGN'
# )

# ## Install Required Modules if missingMissing, then import the required modules
# foreach ($RequiredModule in $RequiredModules) {

# ## Test if each module is available
# $Module = Get-Module -ListAvailable -Name $RequiredModule -ErrorAction SilentlyContinue

# ## If the Module is not installed
# if (-not $Module) {

# ## Attempt the Installation of the module
# $InstalledModule = Install-Module $Module -ErrorAction SilentlyContinue

# ## If the Module Installation was unsuccessful
# if (-Not $InstalledModule) {
# throw ('Required Module: ' + $RequiredModule + ' is not installed, and installation failed.')
# }
# }

# }

# foreach ($ModuleToImport in $ModulesToImport){
# Import-Module $ModuleToImport
# }


## Load the Remaining Library Modlue files
$Public = @( Get-ChildItem -Path "$PSScriptRoot\Public\*.ps1" )
$Private = @( Get-ChildItem -Path "$PSScriptRoot\Private\*.ps1" )

# @($Public + $Private) | ForEach-Object {
# try {
# . $_.FullName
# } catch {
# Write-Error -Message "Failed to import function $($_.FullName): $_"
# }
# }

Export-ModuleMember -Function $Public.BaseName