$PathExists = Test-Path 'C:\Windows\System32' -ErrorAction Ignore
If ($PathExists){
$True
} else {
$False
}
$App = "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe"
[xml]$Toast = @"
<toast scenario="Reminder">
<visual>
<binding template="ToastGeneric">
<text placement="attribution">The Servicedesk</text>
<text>Doing the Needful...</text>
<group>
<subgroup>
<text hint-style="body" hint-wrap="true">Thanks for clicking to do the needful. This was a lot of fun.</text>
</subgroup>
</group>
<group>
<subgroup>
<text hint-style="base" hint-wrap="true">Just another paragragh on doing the needful.</text>
</subgroup>
</group>
<group>
<subgroup>
<text hint-style="body" hint-wrap="true">I've really got nothing else. Just wanting to babble on a little more.</text>
</subgroup>
</group>
</binding>
</visual>
<actions>
<action activationType="system" arguments="dismiss" content="Thanks!" />
</actions>
</toast>
"@
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $nul
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] > $nul
# Load the notification into the required format
$ToastXml = New-Object -TypeName Windows.Data.Xml.Dom.XmlDocument
$ToastXml.LoadXml($Toast.OuterXml)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($App).Show($ToastXml)
Your computer is required to restart due to having exceeded the maximum allowed uptime.Reason: Pending reboots was found in registry or WMI.Your password will expire on: Hey you - wake up. Your computer needs to restart. Do it now.Do it!LaterSnoozewww.imab.dkHelpdesk kindly reminds you...Computer requires the needful!The directory C:\Windows\System32 exists. So, looks like your computer is ready to do the needful.To proceed with doing the needful, click the "Do it!" link below. It will be amazing.Click snooze to be reminded again in:Your deadline is:Good morningGood afternoonGood eveningMinutesHourHoursComputer uptime:days