Description
On Windows, the Azure Skills plugin PostToolUse hook appears to open track-telemetry.ps1 with Notepad instead of executing it through PowerShell.
Installed plugin version: 1.2.12
Affected file:
hooks/hooks.json
Current configuration:
{
"type": "command",
"windows": "${PLUGIN_ROOT}/hooks/scripts/track-telemetry.ps1",
"powershell": "${PLUGIN_ROOT}/hooks/scripts/track-telemetry.ps1"
}
Expected behavior
The hook should execute the script using an explicit PowerShell command, for example:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "${PLUGIN_ROOT}/hooks/scripts/track-telemetry.ps1"
It should not rely on the Windows file association for .ps1 files.
Actual behavior
On Windows, the .ps1 file is opened in Notepad instead of being executed.
This can happen when the hook runner passes the script path directly to the Windows shell rather than invoking PowerShell.
Impact
- Notepad opens unexpectedly after tool use.
- The telemetry hook does not run as intended.
- The behavior is confusing and may cause repeated unwanted windows.
- The issue may affect other Windows users with
.ps1 associated with a text
editor.
Additional observation
The script itself supports disabling telemetry through:
$env:AZURE_MCP_COLLECT_TELEMETRY = "false"
However, the hook should still invoke PowerShell correctly when telemetry is enabled.
Suggested fix
Update the Windows hook entry to invoke PowerShell explicitly, or provide a small .cmd wrapper that calls PowerShell with -NoProfile and -File.
Please also consider avoiding an unpinned npx -y @azure/mcp@latest invocation from the hook, since it introduces non-reproducible runtime behavior and a supply-chain dependency.
Description
On Windows, the Azure Skills plugin
PostToolUsehook appears to opentrack-telemetry.ps1with Notepad instead of executing it through PowerShell.Installed plugin version:
1.2.12Affected file:
hooks/hooks.jsonCurrent configuration:
{ "type": "command", "windows": "${PLUGIN_ROOT}/hooks/scripts/track-telemetry.ps1", "powershell": "${PLUGIN_ROOT}/hooks/scripts/track-telemetry.ps1" }Expected behavior
The hook should execute the script using an explicit PowerShell command, for example:
It should not rely on the Windows file association for
.ps1files.Actual behavior
On Windows, the
.ps1file is opened in Notepad instead of being executed.This can happen when the hook runner passes the script path directly to the Windows shell rather than invoking PowerShell.
Impact
.ps1associated with a texteditor.
Additional observation
The script itself supports disabling telemetry through:
However, the hook should still invoke PowerShell correctly when telemetry is enabled.
Suggested fix
Update the Windows hook entry to invoke PowerShell explicitly, or provide a small
.cmdwrapper that calls PowerShell with-NoProfileand-File.Please also consider avoiding an unpinned
npx -y @azure/mcp@latestinvocation from the hook, since it introduces non-reproducible runtime behavior and a supply-chain dependency.