ReverseMethods.ps1
# # Citrix IPS reverse image job support # function Set-SmbInputLocation([hashtable]$Parameters, [hashtable]$JobData, [string]$SmbSectionName=$Null, [psobject]$ConfigData=$Null, [bool]$Verbose=$False) { $JobData['inputStorageLocation'] = @{ Location = Get-SmbLocation -ConfigData $ConfigData -Parameters $Parameters -SmbConfigNode $SmbSectionName -Verbose $Verbose credentialId = Get-SmbParameter -ConfigData $ConfigData -Parameters $Parameters -SmbConfigNode $SmbSectionName -ParameterName 'SmbCwId' -ConfigParameterName 'CwId' -Verbose $Verbose } } function Format-ReverseData([string]$Platform, [hashtable]$Parameters, [bool]$Verbose=$False) { $reverseData = Format-JobData -Platform $Platform -Parameters $Parameters -Verbose $Verbose Set-SmbInputLocation -Parameters $Parameters -JobData $reverseData -Verbose $Verbose $reverseData['inputImageFilename'] = Get-SmbParameter -ConfigData $ConfigData -Parameters $Parameters -SmbConfigNode $SmbSectionName -ParameterName 'SmbDiskName' -ConfigParameterName 'DiskName' -Verbose $Verbose $reverseData['inputImageFormat'] = Get-SmbParameter -ConfigData $ConfigData -Parameters $Parameters -SmbConfigNode $SmbSectionName -ParameterName 'SmbDiskFormat' -ConfigParameterName 'DiskFormat' -Verbose $Verbose $reverseData['provisionType'] = "Thin" $reverseData['outputSizeMb'] = Get-JobParameter -ParameterName "OutputSizeMb" -Verbose $Verbose return $reverseData } |