{"id":76,"date":"2026-01-21T08:36:21","date_gmt":"2026-01-21T07:36:21","guid":{"rendered":"https:\/\/paessens.org\/blog\/?p=76"},"modified":"2026-01-21T08:38:17","modified_gmt":"2026-01-21T07:38:17","slug":"create-logoff-shortcut-on-desktop","status":"publish","type":"post","link":"https:\/\/paessens.org\/blog\/index.php\/2026\/01\/21\/create-logoff-shortcut-on-desktop\/","title":{"rendered":"Create logoff shortcut on Desktop"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Sometime am I working on remote systems, and in order to avoid to logoff from the wrong system \ud83d\ude41 <br>Do I create a logoff shortcut on each server on desktop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hereby my script<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">##<br>##Create Logoff Shortcut on Desktop<br>#<br>$shell = New-Object -comObject WScript.Shell<br>$DesktopPath = [Environment]::GetFolderPath(&#8220;Desktop&#8221;)<br>$ShortcutFile = &#8220;$DesktopPath\\Logoff.lnk&#8221;<br>$shortcut = $shell.CreateShortcut($ShortcutFile)<br>$shortcut.TargetPath = &#8220;C:\\Windows\\System32\\logoff.exe&#8221;<br>$Shortcut.IconLocation = &#8220;%SystemRoot%\\System32\\SHELL32.dll, 44&#8221;<br>$shortcut.Save()<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometime am I working on remote systems, and in order to avoid to logoff from the wrong system \ud83d\ude41 Do I create a logoff shortcut on each server on desktop. Hereby my script ####Create Logoff Shortcut on Desktop#$shell = New-Object<\/p>\n<p><a href=\"https:\/\/paessens.org\/blog\/index.php\/2026\/01\/21\/create-logoff-shortcut-on-desktop\/\" class=\"awp-btn awp-btn-secondary awp-btn-bubble\">Continue Reading<span class=\"screen-reader-text\">Create logoff shortcut on Desktop<\/span><i class=\"fa fa-arrow-right\"><\/i><span class=\"bubble_effect\"><span class=\"circle top-left\"><\/span><span class=\"circle top-left\"><\/span><span class=\"circle top-left\"><\/span>\t<span class=\"button effect-button\"><\/span><span class=\"circle bottom-right\"><\/span>\t<span class=\"circle bottom-right\"><\/span><span class=\"circle bottom-right\"><\/span><\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,22],"tags":[24,23],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows","tag-powershell","tag-windows"],"_links":{"self":[{"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":3,"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"predecessor-version":[{"id":79,"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/76\/revisions\/79"}],"wp:attachment":[{"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paessens.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}