Clone-AppGenContent.ps1

function Clone-AppGenContent {
    <#
    .SYNOPSIS
    This function ...
 
    .DESCRIPTION
    A bit more description
 
    .PARAMETER FromPipeline
    Shows how to process input from the pipeline, remaining parameters or by named parameter.
 
    .EXAMPLE
    Clone-AppGenContent 'abc'
 
    Description of the example.
 
    #>


    <# Enable -Confirm and -WhatIf. #>
    [CmdletBinding(SupportsShouldProcess = $true)]
    param(
        [parameter(Mandatory=$true)]
    [string] $SourceDirectory = 'C:\Migrate\gen-apps',
    [parameter(Mandatory=$true)]
    [string] $TargetDirectory
    )

    begin {
    }

    process {
        Copy-Item  $SourceDirectory ('\\' + $TargetDirectory ) -recurse -Force
    }

    end {
    }
}

if ($loadingModule) {
    Export-ModuleMember -Function 'Clone-AppGenContent'
}