Function Test-ParameterSet
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory = $true, ParameterSetName = 'SetName')]
        [string[]] $Name,

        [Parameter(Mandatory = $true, ParameterSetName = 'SetName')]
        [string[]] $Path,

        [Parameter(Mandatory = $true, ParameterSetName = 'SetFile')]
        [System.IO.FileSystemInfo] $InputObject,

        [Parameter(
            Mandatory = $true,
            ParameterSetName = 'SetName'
        )]
        [Parameter(
            Mandatory = $False,
            ParameterSetName = 'SetFile'
        )]
        [ValidateSet('File', 'Directory')] 
        [String] $Type,
        [Parameter(Mandatory = $False)] 
        [Datetime] $DateAction
    )
    Switch ($PSCmdlet.ParameterSetName)
    { 
        'SetName' {
            Write-Host 'Jeu de paramètres SetName' $Name
        } 
        'SetFile' {
            Write-host 'Jeu de paramètres SetFile' $InputObject.Name
        } 
    }
}

Test-ParameterSet -InputObject (Get-item .) -DateAction (Get-Date)
Test-ParameterSet -InputObject (Get-item .) -Type Directory 


Test-ParameterSet -Name 'Documents' -Path C:\Users\baudi -DateAction (Get-Date)
Test-ParameterSet -Name 'Documents' -Path C:\Users\Nicolas\ -Type Directory 
Test-ParameterSet -Name 'Documents' -Path C:\Users\Nicolas\