You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get-BTHistory-AppId 'Windows.Defender.SecurityCenter'
Note: I've tried the code with a number of different PowerShell versions. The code also fails with PowerShell 7.1.5 but works successfully with Windows PowerShell 5.1 and PowerShell 7.0.8.Note2: I am aware of the issue 'Toast History access and Toast removal failures on PowerShell 7.1#136'. However I believe this is a different issue because: - The actual behaviour is different for the two issues.
- I am successfully using Remove-BTNotification within my scripts (and was able to do so with PowerShell 7.1).
Expected Behavior
The Get-BTHistory function to return the toast notifications in the Action Center. In my case should display something like:
ExpirationTime : 02/02/2022 03:38:44 +00:00
Content : Windows.Data.Xml.Dom.XmlDocument
Tag : YWD0SOEHhUSFvy/d.0
SuppressPopup : False
Group : 23
RemoteId :
NotificationMirroring : 1025960913
Priority : Default
Data :
ExpiresOnReboot : False
Yeah, this is the same issue as #136, there were some underlying .NET changes in PowerShell 7.1 which broke a lot of stuff and evidently, I missed applying the fix to Get-BTHistory.
At the moment I'm running Get-BTHistory within a Windows PowerShell session (5.1) which is called from PowerShell 7.2.1 so I'm in no hurry for a fix for this.
I'll keep an eye on v1 and once you add Get-BTHistory (or it's replacement) I'll test / amend my scripts as necessary. I'm only using a fraction of the capabilities of Burnt Toast (use the commands New-BTHeader, New-BurntToastNotification, Remove-BTNotification and Get-BTHistory.) so shouldn't take me long to make the changes required by v1.
Steps to Reproduce
Expected Behavior
The Get-BTHistory function to return the toast notifications in the Action Center. In my case should display something like:
ExpirationTime : 02/02/2022 03:38:44 +00:00
Content : Windows.Data.Xml.Dom.XmlDocument
Tag : YWD0SOEHhUSFvy/d.0
SuppressPopup : False
Group : 23
RemoteId :
NotificationMirroring : 1025960913
Priority : Default
Data :
ExpiresOnReboot : False
Actual Behavior
Returns:
ObjRef : WinRT.ObjectReferenceWithContext
1[WinRT.IInspectable+Vftbl] ThisPtr : 1803460262104 NativeObject : WinRT.ObjectReferenceWithContext
1[WinRT.IInspectable+Vftbl]HasUnwrappableNativeObject : True
AdditionalTypeData : {[System.RuntimeTypeHandle, ABI.System.Collections.IEnumerable+AdaptiveFromAbiHelper]}
Experience with Toast
Intermediate
Environment data: PowerShell
Environment data: OS
Environment data: BurntToast
Consent to Attribution
The text was updated successfully, but these errors were encountered: