dbatools
dbatools copied to clipboard
Watch-DbaXESession errors every time, because SqlServer.XEvent could not be loaded.
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Any attempts to run Watch-DbaXESession have me informed that
The module 'SqlServer.XEvent' could not be loaded. For more information, run 'Import-Module SqlServer.Xevent'.
Any attempts to import the module fail. I already clearly have the plain SqlServer module imported and working.
Steps to Reproduce
Get-DbaXESession -SqlInstance YourBox -Session 'Yours' | Watch-DbaXESession
Please confirm that you are running the most recent version of dbatools
2.1.29
Other details or mentions
A possibly related issue is that Export-DbaXECsv always warns me that I'm missing XESmartTarget.Core.dll, but I've made no attempt to investigate that.
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
5.1.22621.4391
SQL Server Edition and Build number
Tried on 2022 boxes.
.NET Framework Version
Very recent.