Forum Discussion
m_c_7
Dec 11, 2023Copper Contributor
Can I use PowerShell script with Functions in Azure Devops "Powershell@2" task?
I have a powershell script that includes functions defined in it. When I run it manually the script works fine and reference to the functions works fine. But when I when I run it inside Azure Devops...
Kidd_Ip
May 07, 2025MVP
How about ensuring your function definitions appear before they are called:
function MyFunction {
Write-Host "Function executed"
}
MyFunction