export-surface.ps1
# ---------------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/powershell@4.0.708) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # ---------------------------------------------------------------------------------- param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) $ErrorActionPreference = 'Stop' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } $dll = Join-Path $PSScriptRoot 'bin\CommvaultPowerShell.private.dll' if(-not (Test-Path $dll)) { Write-Error "Unable to find output assembly in '$binFolder'." } $null = Import-Module -Name $dll $moduleName = 'CommvaultPowerShell' $exportsFolder = Join-Path $PSScriptRoot 'exports' $resourcesFolder = Join-Path $PSScriptRoot 'resources' Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'" Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'" Write-Host -ForegroundColor Green '-------------Done-------------' |