A function may benefit from using statements, provided they are declared in the parent scope. The parent scope includes code run on the console, a script that contains a function, or a module (psm1 file) that contains a function.
Using statements, introduced with PowerShell 5, appear throughout this book. An example of a using statement is shown here:
using assembly System.Xml.Linq
using namespace System.Xml.Linq