HP.Notifications.psm1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 |
if ($PSEdition -eq "Core") { Add-Type -Assembly $PSScriptRoot\refs\Microsoft.Windows.SDK.NET.dll } else { [void][Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] [void][Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] } $interop = @" using System; using System.Runtime.InteropServices; using System.Text; namespace Impersonate { internal class NativeHelpers { [StructLayout(LayoutKind.Sequential)] public struct PROCESS_INFORMATION { public IntPtr hProcess; public IntPtr hThread; public int dwProcessId; public int dwThreadId; } [StructLayout(LayoutKind.Sequential)] public struct STARTUPINFO { public int cb; public String lpReserved; public String lpDesktop; public String lpTitle; public uint dwX; public uint dwY; public uint dwXSize; public uint dwYSize; public uint dwXCountChars; public uint dwYCountChars; public uint dwFillAttribute; public uint dwFlags; public short wShowWindow; public short cbReserved2; public IntPtr lpReserved2; public IntPtr hStdInput; public IntPtr hStdOutput; public IntPtr hStdError; } [StructLayout(LayoutKind.Sequential)] public struct WTS_SESSION_INFO { public readonly UInt32 SessionID; [MarshalAs(UnmanagedType.LPStr)] public readonly String pWinStationName; public readonly uint State; } } internal class NativeMethods { [DllImport("kernel32", SetLastError = true)] public static extern int WaitForSingleObject( IntPtr hHandle, int dwMilliseconds); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool CloseHandle( IntPtr hSnapshot); [DllImport("userenv.dll", SetLastError = true)] public static extern bool CreateEnvironmentBlock( ref IntPtr lpEnvironment, IntPtr hToken, bool bInherit); [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] public static extern bool CreateProcessAsUserW( IntPtr hToken, string lpApplicationName, StringBuilder lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandle, uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref NativeHelpers.STARTUPINFO lpStartupInfo, out NativeHelpers.PROCESS_INFORMATION lpProcessInformation); [DllImport("userenv.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool DestroyEnvironmentBlock( IntPtr lpEnvironment); [DllImport("advapi32.dll", SetLastError = true)] public static extern bool DuplicateTokenEx( IntPtr ExistingTokenHandle, uint dwDesiredAccess, IntPtr lpThreadAttributes, uint ImpersonationLevel, uint TokenType, out IntPtr DuplicateTokenHandle); [DllImport("wtsapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern bool WTSEnumerateSessions( IntPtr hServer, int Reserved, int Version, ref IntPtr ppSessionInfo, ref int pCount); [DllImport("wtsapi32.dll")] public static extern void WTSFreeMemory( IntPtr pMemory); [DllImport("Wtsapi32.dll", SetLastError = true)] public static extern bool WTSQueryUserToken( uint SessionId, out IntPtr phToken); } public static class ProcessExtensions { private const int CREATE_UNICODE_ENVIRONMENT = 0x00000400; private const int CREATE_NO_WINDOW = 0x08000000; private const int CREATE_NEW_CONSOLE = 0x00000010; public static void StartProcessAsCurrentUser(string appPath, string cmdLine = null, string workDir = null) { uint activeSessionId = 0; var pSessionInfo = IntPtr.Zero; var sessionCount = 0; // Get a handle to the user access token for the current active session. if (NativeMethods.WTSEnumerateSessions(IntPtr.Zero, 0, 1, ref pSessionInfo, ref sessionCount)) { var arrayElementSize = Marshal.SizeOf(typeof(NativeHelpers.WTS_SESSION_INFO)); var current = pSessionInfo; for (var i = 0; i < sessionCount; i++) { var si = (NativeHelpers.WTS_SESSION_INFO) Marshal.PtrToStructure(current, typeof(NativeHelpers.WTS_SESSION_INFO)); current = IntPtr.Add(current, arrayElementSize); if (si.State == 0) { activeSessionId = si.SessionID; break; } } } NativeMethods.WTSFreeMemory(pSessionInfo); IntPtr dupTokenHandle = IntPtr.Zero; IntPtr hImpersonationToken = IntPtr.Zero; if (NativeMethods.WTSQueryUserToken(activeSessionId, out hImpersonationToken)) { NativeMethods.DuplicateTokenEx(hImpersonationToken, 0, IntPtr.Zero, 2, 1, out dupTokenHandle); } StringBuilder commandLine = new StringBuilder(cmdLine); var startInfo = new NativeHelpers.STARTUPINFO(); startInfo.cb = Marshal.SizeOf(startInfo); //uint dwCreationFlags = CREATE_UNICODE_ENVIRONMENT | (uint) CREATE_NEW_CONSOLE; //startInfo.wShowWindow = 5; uint dwCreationFlags = CREATE_UNICODE_ENVIRONMENT | (uint)CREATE_NO_WINDOW; startInfo.wShowWindow = 0; IntPtr pEnv = IntPtr.Zero; NativeMethods.CreateEnvironmentBlock(ref pEnv, dupTokenHandle, false); NativeHelpers.PROCESS_INFORMATION procInfo; NativeMethods.CreateProcessAsUserW( dupTokenHandle, appPath, commandLine, IntPtr.Zero, IntPtr.Zero, false, dwCreationFlags, pEnv, workDir, ref startInfo, out procInfo); NativeMethods.WaitForSingleObject(procInfo.hProcess, -1); NativeMethods.CloseHandle(procInfo.hThread); NativeMethods.CloseHandle(procInfo.hProcess); NativeMethods.DestroyEnvironmentBlock(pEnv); NativeMethods.CloseHandle(dupTokenHandle); } } } "@ Add-Type $interop -Passthru <# .SYNOPSIS Create a logo object .DESCRIPTION This function creates a toaster logo from a file image. .PARAMETER Image The URL to the image.Http images must be 200 KB or less in size. Not all URL formats are supported in all scenarios. .PARAMETER Crop Specify how you would like the image to be cropped. .EXAMPLE PS> $logo = New-HPPrivateToastNotificationLogo .\logo.png .OUTPUTS This function returns the object representing the logo image. #> function New-HPPrivateToastNotificationLogo { param( [Parameter(Position = 0,Mandatory = $True,ValueFromPipeline = $True)] [string]$Image, [Parameter(Position = 1,Mandatory = $False)] [ValidateSet('None','Default','Circle')] [string]$Crop ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("image") $child.SetAttribute('src',$Image) $child.SetAttribute('placement','appLogoOverride') if ($LogoCrop) { $child.SetAttribute('hint-crop',$LogoCrop.ToLower()) } $child } <# .SYNOPSIS Create a toast image object .DESCRIPTION This function creates a toaster image from a file image. This image may be shown in the body of a toast message. .PARAMETER Image The URL to the image. Http images must be 200 KB or less in size. Not all URL formats are supported in all scenarios. .PARAMETER Position Toasts can display a 'fixed' image, which is a featured ToastGenericHeroImage displayed prominently within the toast banner and while inside Action Center. Image dimensions are 364x180 pixels at 100% scaling. Alternately use 'inline' to display a full-width inline-image that appears when you expand the toast. .EXAMPLE PS> $logo = New-HPPrivateToastNotificationLogo .\hero.png .OUTPUTS This function returns the object representing the image. .LINK [ToastGenericHeroImage](https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-schema#toastgenericheroimage) #> function New-HPPrivateToastNotificationImage { param( [Parameter(Position = 0,Mandatory = $True,ValueFromPipeline = $True)] [string]$Image, [Parameter(Position = 1,Mandatory = $False)] [ValidateSet('Inline','Fixed')] [string]$Position = 'Fixed' ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("image") $child.SetAttribute('src',$Image) #$child.SetAttribute('placement','appLogoOverride') is this needed? if ($Position -eq 'Fixed') { $child.SetAttribute('placement','hero') } else { $child.SetAttribute('placement','inline') } $child } <# .SYNOPSIS Specify the toast message alert sound .DESCRIPTION This function allows defining the sound to play on toast notification. .PARAMETER Sound The sound to play .PARAMETER Loop If true, the sound will be looped .EXAMPLE PS> $logo = New-HPPrivateToastSoundPreference -Sound "Alarm6" -Loop .OUTPUTS This function returns the object representing the sound preference. .LINK [ToastAudio](https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-schema#ToastAudio) #> function New-HPPrivateToastSoundPreference { param( [Parameter(Position = 1,Mandatory = $False)] [ValidateSet('None','Default','IM','Mail','Reminder','SMS', 'Alarm','Alarm2','Alarm3','Alarm4','Alarm5','Alarm6','Alarm7','Alarm8','Alarm9','Alarm10', 'Call','Call2','Call3','Call4','Call5','Call6','Call7','Call8','Call9','Call10')] [string]$Sound = "Default", [Parameter(Position = 2,Mandatory = $False)] [switch]$Loop ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("audio") if ($Sound -eq "None") { $child.SetAttribute('silent',"$true".ToLower()) Write-Verbose "Setting audio notification to Muted" } else { $soundPath = "ms-winsoundevent:Notification.$Sound" if ($Sound.StartsWith('Alarm') -or $Sound.StartsWith('Call')) { $soundPath = 'winsoundevent:Notification.Looping.' + $Sound } Write-Verbose "Setting audio notification to: $soundPath" $child.SetAttribute('src',$soundPath) $child.SetAttribute('loop',([string]$Loop.IsPresent).ToLower()) Write-Verbose "Looping audio: $($Loop.IsPresent)" } $child } <# .SYNOPSIS Create a toast button .DESCRIPTION Create a toast button for the toast .PARAMETER Sound The sound to play .PARAMETER Image For a graphical button, specify the button image .PARAMETER Arguments App-defined string of arguments that the app will later receive if the user clicks this button. .OUTPUTS This function returns the object representing the button .LINK [ToastButton](https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-schema#ToastButton) #> function New-HPPrivateToastButton { [Cmdletbinding()] param( [string]$Caption, [string]$Image, # leave out for normal button [string]$Arguments, [ValidateSet('Background','Protocol','System')] [string]$ActivationType = 'background' ) Write-Verbose "Creating new toast button with caption $Caption" if ($Image) { ([xml]"<action content=`"$Caption`" imageUri=`"$Image`" arguments=`"$Arguments`" activationType=`"$ActivationType`" />").DocumentElement } else { ([xml]"<action content=`"$Caption`" arguments=`"$Arguments`" activationType=`"$ActivationType`" />").DocumentElement } } <# .SYNOPSIS Create a toast action .DESCRIPTION Create a toast action for the toast .PARAMETER SnoozeOrDismiss Automatically constructs a selection box for snooze intervals, and snooze/dismiss buttons, all automatically localized, and snoozing logic is automatically handled by the system. .PARAMETER Image For a graphical button, specify the button image .PARAMETER Arguments App-defined string of arguments that the app will later receive if the user clicks this button. .OUTPUTS This function returns the object representing the button #> function New-HPPrivateToastActions { [CmdletBinding()] param( [Parameter(ParameterSetName = 'DismissSuppress',Position = 1,Mandatory = $True)] [switch]$SnoozeOrDismiss, [Parameter(ParameterSetName = 'DismissSuppress',Position = 2,Mandatory = $True)] [int]$SnoozeMinutesDefault, [Parameter(ParameterSetName = 'DismissSuppress',Position = 3,Mandatory = $True)] [int[]]$SnoozeMinutesOptions, [Parameter(ParameterSetName = 'CustomButtons',Position = 1,Mandatory = $True)] [switch]$CustomButtons, [Parameter(ParameterSetName = 'CustomButtons',Position = 2,Mandatory = $True)] [System.Xml.XmlElement[]]$Buttons, [Parameter(ParameterSetName = 'CustomButtons',Position = 3,Mandatory = $false)] [switch]$NoDismiss ) [xml]$xml = New-Object System.Xml.XmlDocument $child = $xml.CreateElement("actions") switch ($PSCmdlet.ParameterSetName) { 'DismissSuppress' { Write-Verbose "Creating system-handled snoozable notification" $i = $xml.CreateElement("input") [void]$child.AppendChild($i) $i.SetAttribute('id',"snoozeTime") $i.SetAttribute('type','selection') $i.SetAttribute('defaultInput',$SnoozeMinutesDefault) Write-Verbose "Notification snooze default: SnoozeMinutesDefault" $SnoozeMinutesOptions | ForEach-Object { $s = $xml.CreateElement("selection") $s.SetAttribute('id',"$_") $s.SetAttribute('content',"$_ minute") [void]$i.AppendChild($s) } $action = $xml.CreateElement("action") $action.SetAttribute('ActivationType','system') $action.SetAttribute('arguments','snooze') $action.SetAttribute('hint-inputId','snoozeTime') $action.SetAttribute('content','Snooze') [void]$child.AppendChild($action) $action = $xml.CreateElement("action") $action.SetAttribute('ActivationType','system') $action.SetAttribute('arguments','dismiss') $action.SetAttribute('content','Dismiss') [void]$child.AppendChild($action) } 'CustomButtons' { # customized buttons Write-Verbose "Creating custom buttons toast" $Buttons | ForEach-Object { $node = $xml.ImportNode($_,$true) [void]$child.AppendChild($node) } if (-not $NoDismiss.IsPresent) { $action = $xml.CreateElement("action") $action.SetAttribute('ActivationType','system') $action.SetAttribute('arguments','dismiss') $action.SetAttribute('content','Dismiss') [void]$child.AppendChild($action) } } default { } } $child } <# .SYNOPSIS Show a toast message .DESCRIPTION This function shows a toast message, and optionally registers a response handler. .PARAMETER Message The message to show .PARAMETER Title The title of the message to show .PARAMETER Logo A logo object create with New-HPPrivateToastNotificationLogo .PARAMETER Image A logo object create with New-HPPrivateToastNotificationImage .PARAMETER Expiration A timeout in minutes for the toast to remove itself .PARAMETER Tag A tag value for the toast .PARAMETER Group A group value for the toast .PARAMETER Attribution The toast owner .PARAMETER Sound A sound notification preference created with New-HPPrivateToastSoundPreference .PARAMETER Actions .PARAMETER Persist #> function New-HPPrivateToastNotification { [CmdletBinding()] param( [Parameter(ParameterSetName = 'TextOnly',Position = 0,Mandatory = $True,ValueFromPipeline = $True)] [string]$Message, [Parameter(Position = 1,Mandatory = $False)] [string]$Title, [Parameter(Position = 3,Mandatory = $False)] [System.Xml.XmlElement]$Logo, [Parameter(Position = 4,Mandatory = $False)] [int]$Expiration, [Parameter(Position = 5,Mandatory = $False)] [string]$Tag = "hp-cmsl", [Parameter(Position = 6,Mandatory = $False)] [string]$Group = "hp-cmsl", [Parameter(Position = 8,Mandatory = $False)] [System.Xml.XmlElement]$Sound, # Apparently can't do URLs with non-uwp [Parameter(Position = 11,Mandatory = $False)] [System.Xml.XmlElement]$Image, [Parameter(Position = 13,Mandatory = $False)] [System.Xml.XmlElement]$Actions, [Parameter(Position = 14,Mandatory = $False)] [switch]$Persist ) [xml]$xml = '<toast><visual><binding template="ToastGeneric"><text></text><text></text></binding></visual></toast>' $binding = $xml.GetElementsByTagName("toast") if ($Sound) { $node = $xml.ImportNode($Sound,$true) [void]$binding.AppendChild($node) } if ($Persist.IsPresent) { $binding.SetAttribute('scenario','reminder') } if ($Actions) { $node = $xml.ImportNode($Actions,$true) [void]$binding.AppendChild($node) } $binding = $xml.GetElementsByTagName("binding") if ($Logo) { $node = $xml.ImportNode($Logo,$true) [void]$binding.AppendChild($node) } if ($Image) { $node = $xml.ImportNode($Image,$true) [void]$binding.AppendChild($node) } $binding = $xml.GetElementsByTagName("text") if ($Title) { [void]$binding[0].AppendChild($xml.CreateTextNode($Title.trim())) } [void]$binding[1].AppendChild($xml.CreateTextNode($Message.trim())) Write-Verbose "Submitting toast with XML: $($xml.OuterXml)" $toast = [Windows.Data.Xml.Dom.XmlDocument]::new() $toast.LoadXml($xml.OuterXml) $toast = [Windows.UI.Notifications.ToastNotification]::new($toast) $toast.Tag = $Tag $toast.Group = $Group if ($Expiration) { $toast.ExpirationTime = [DateTimeOffset]::Now.AddMinutes($Expiration) } return $toast } function Show-ToastNotification { [CmdletBinding()] param( [Parameter(Position = 0,Mandatory = $False,ValueFromPipeline = $true)] $Toast, [Parameter(Position = 1,Mandatory = $False)] [string]$Attribution = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe' ) $notifier = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($Attribution) $notifier.Show($toast) } function Register-HPPrivateScriptProtocol { [CmdletBinding()] param( [string]$ScriptPath, [string]$Name ) try { New-Item "HKCU:\Software\Classes\$($Name)\shell\open\command" -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)" -Name 'URL Protocol' -Value '' -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)" -Name '(default)' -Value "url:$($Name)" -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)" -Name 'EditFlags' -Value 2162688 -PropertyType Dword -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath "HKCU:\Software\Classes\$($Name)\shell\open\command" -Name '(default)' -Value $ScriptPath -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null } catch { Write-Host $_.Exception.Message } } <# .SYNOPSIS This is a private function for internal use only .DESCRIPTION This is a private function for internal use only .EXAMPLE .NOTES - This is a private function for internal use only #> function Invoke-HPPrivateRebootNotificationAsUser { [CmdletBinding()] param( [Parameter(Position = 0,Mandatory = $false)] [string]$Title = "A System Reboot is Required", [Parameter(Position = 1,Mandatory = $false)] [string]$Message = "Please reboot now to keep your device compliant with the security policies.", [Parameter(Position = 2,Mandatory = $false)] [string]$LogoImage, [Parameter(Position = 3,Mandatory = $false)] [int]$Expiration = 0 ) Register-HPPrivateScriptProtocol -ScriptPath "C:\Windows\System32\shutdown.exe -r -t 0 -f" -Name "rebootnow" $rebootButton = New-HPPrivateToastButton -Caption "Reboot now" -Image $null -Arguments "rebootnow:" -ActivationType "Protocol" $params = @{ Message = $Message Title = $Title Expiration = $Expiration Actions = New-HPPrivateToastActions -CustomButtons -Buttons $rebootButton Sound = New-HPPrivateToastSoundPreference -Sound IM #Logo = New-HPPrivateToastNotificationLogo -Image $img_logo -Crop Circle #Image = New-HPPrivateToastNotificationImage -Image $img_hero -Position Inline } if ($LogoImage) { $params.Logo = New-HPPrivateToastNotificationLogo -Image $LogoImage -Crop Circle } New-HPPrivateToastNotification @params -Persist | Show-ToastNotification return } <# .SYNOPSIS Invoke-RebootNotification .DESCRIPTION This function shows a toast message asking the user to reboot the system .PARAMETER Message The message to show .PARAMETER Title The title of the message to show .PARAMETER LogoImage Image file path to be displayed .PARAMETER Expiration A timeout in minutes for the toast to remove itself. If not specified, remains until dismissed .EXAMPLE Invoke-RebootNotification -Title "My title" -Message "My message" #> function Invoke-RebootNotification { [CmdletBinding(HelpUri = "https://developers.hp.com/hp-client-management/doc/Invoke-RebootNotification")] param( [Parameter(Position = 0,Mandatory = $False)] [string]$Title = "A System Reboot is Required", [Parameter(Position = 1,Mandatory = $False)] [string]$Message = "Please reboot now to keep your device compliant with the security policies.", [Parameter(Position = 2,Mandatory = $false)] [string]$LogoImage, [Parameter(Position = 3,Mandatory = $false)] [int]$Expiration = 0 ) $privs = whoami /priv /fo csv | ConvertFrom-Csv | Where-Object { $_. 'Privilege Name' -eq 'SeDelegateSessionUserImpersonatePrivilege' } if ($privs.State -eq "Disabled") { Write-Verbose "Running with user privileges" Invoke-HPPrivateRebootNotificationAsUser -Title $Title -Message $Message -LogoImage $LogoImage -Expiration $Expiration } else { Write-Verbose "Running with system privileges" try { $psPath = (Get-Process -Id $pid).Path # Passing the parameters as environment variable because the following block executes in a different context [System.Environment]::SetEnvironmentVariable('HPRebootTitle',$Title,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootMessage',$Message,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootLogoImage',$LogoImage,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootExpiration',$Expiration,[System.EnvironmentVariableTarget]::Machine) [scriptblock]$scriptBlock = { $path = $pwd.Path Import-Module -Force $path\HP.Notifications.psd1 Invoke-HPPrivateRebootNotificationAsUser -Title $env:HPRebootTitle -Message $env:HPRebootMessage -LogoImage $env:HPRebootLogoImage -Expiration $env:HPRebootExpiration } $encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($scriptBlock)) $psCommand = "-ExecutionPolicy Bypass -Window Normal -EncodedCommand $($encodedCommand)" [Impersonate.ProcessExtensions]::StartProcessAsCurrentUser($psPath,"`"$psPath`" $psCommand",$PSScriptRoot) [System.Environment]::SetEnvironmentVariable('HPRebootTitle',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootMessage',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootLogoImage',$null,[System.EnvironmentVariableTarget]::Machine) [System.Environment]::SetEnvironmentVariable('HPRebootExpiration',$null,[System.EnvironmentVariableTarget]::Machine) } catch { Write-Error -Message "Could not execute as currently logged on user: $($_.Exception.Message)" -Exception $_.Exception } } return } # SIG # Begin signature block # MIIt/gYJKoZIhvcNAQcCoIIt7zCCLesCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAxTJKdXlOWSWxs # 38jQIed3A1197isNCpnrzmATekg0VqCCE2wwggXAMIIEqKADAgECAhAP0bvKeWvX # +N1MguEKmpYxMA0GCSqGSIb3DQEBCwUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWd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