# Advanced Function

say it: **“ad-VANST FUNGK-shun”** **/ədˈvænst ˈfʌŋkʃən/**

A function that behaves like a real cmdlet, with common parameters and pipeline support.

## What is **Advanced Function**?

An **advanced function** behaves like a real cmdlet: it gets common parameters like `-Verbose`, validation and pipeline support, thanks to `[CmdletBinding()]`.

```powershell
function Remove-OldLogs {
    [CmdletBinding()]
    param([int]$Days = 30)
    Write-Verbose "Removing logs older than $Days days"
    Get-ChildItem *.log | Where-Object LastWriteTime -lt (Get-Date).AddDays(-$Days) | Remove-Item
}
```

Level: Journeyman · [More PowerShell terms at this level](https://www.ask-codey.com/glossary?category=powershell&level=3)

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/advanced-function
