Public/Remove-Path.ps1

function Remove-Path {

    <#
    .Synopsis
    -Taylor Lee
    Modified 05172019
 
    .DESCRIPTION
    This command deletes all files recursively in a path that match the included filename.
 
    .EXAMPLE
    Specify the parent folder from which the command runs and specify file names to include. Wildcards are supported.
 
    Remove-Path -path c:\Folder -include "*.logs"
 
    .Link
    Remove-All
    Remove-DisabledADProfiles
    Remove-OlderThan
    #>


    [CmdletBinding(SupportsShouldProcess)]

    Param (
        [Parameter(Mandatory = $true)]$Path,
        [Parameter(Mandatory = $true)]$Include
    )

    #Check For Admin Privleges
    Get-Elevation

    Get-ChildItem -path "$Path" -Include "$Include" -Recurse -force | Remove-Item -force -Recurse
}