{"id":76,"date":"2006-12-18T13:05:00","date_gmt":"2006-12-18T17:05:00","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/2006\/12\/18\/revisit-an-old-friend\/"},"modified":"2009-08-05T13:06:59","modified_gmt":"2009-08-05T17:06:59","slug":"revisit-an-old-friend","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/","title":{"rendered":"Revisit an old friend"},"content":{"rendered":"<p>I have a new blog at the <a href=\"http:\/\/sapien.eponym.com\/blog\/_archives\/2006\/12\/18\/2581354.html\">SAPIEN blog<\/a> that is a visit to an old friend, DosKey. Now, before you dismiss this as old-fashioned, take a moment to read the article and try it out. If you spend a lot of time at a command prompt, DosKey can make you more efficient. You can even use it to execute PowerShell expressions and commands. If you are a fan of one-liners, then associating them with a DosKey macro makes a lot of sense. Let me know what you think.<\/p>\n<p><span style=\"font-family:tahoma;font-size:78%;\">Technorati Tags:<br \/><a href=\"http:\/\/www.technorati.com\/tags\/powershell\" rel=\"tag\">PowerShell<\/a>   <a href=\"http:\/\/www.technoratic.com\/tags\/scripting\" rel=\"tag\">Scripting<\/a> <a href=\"http:\/\/www.technorati.com\/tags\/commandline\" rel=\"tag\">CommandLine<\/a><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a new blog at the SAPIEN blog that is a visit to an old friend, DosKey. Now, before you dismiss this as old-fashioned, take a moment to read the article and try it out. If you spend a lot of time at a command prompt, DosKey can make you more efficient. You can&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[22,20],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-automation","tag-cli"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Revisit an old friend &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Revisit an old friend &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I have a new blog at the SAPIEN blog that is a visit to an old friend, DosKey. Now, before you dismiss this as old-fashioned, take a moment to read the article and try it out. If you spend a lot of time at a command prompt, DosKey can make you more efficient. You can...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2006-12-18T17:05:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2009-08-05T17:06:59+00:00\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Revisit an old friend\",\"datePublished\":\"2006-12-18T17:05:00+00:00\",\"dateModified\":\"2009-08-05T17:06:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/\"},\"wordCount\":98,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Automation\",\"CLI\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/\",\"name\":\"Revisit an old friend &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2006-12-18T17:05:00+00:00\",\"dateModified\":\"2009-08-05T17:06:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/76\\\/revisit-an-old-friend\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Revisit an old friend\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Revisit an old friend &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/","og_locale":"en_US","og_type":"article","og_title":"Revisit an old friend &#8226; The Lonely Administrator","og_description":"I have a new blog at the SAPIEN blog that is a visit to an old friend, DosKey. Now, before you dismiss this as old-fashioned, take a moment to read the article and try it out. If you spend a lot of time at a command prompt, DosKey can make you more efficient. You can...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/","og_site_name":"The Lonely Administrator","article_published_time":"2006-12-18T17:05:00+00:00","article_modified_time":"2009-08-05T17:06:59+00:00","author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Revisit an old friend","datePublished":"2006-12-18T17:05:00+00:00","dateModified":"2009-08-05T17:06:59+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/"},"wordCount":98,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Automation","CLI"],"articleSection":["PowerShell"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/","name":"Revisit an old friend &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2006-12-18T17:05:00+00:00","dateModified":"2009-08-05T17:06:59+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/76\/revisit-an-old-friend\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Revisit an old friend"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2897,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2897\/how-old-is-the-admin-password\/","url_meta":{"origin":76,"position":0},"title":"How Old is the Admin Password","author":"Jeffery Hicks","date":"April 1, 2013","format":false,"excerpt":"Here's a quick one-liner to find out how old the administrator password age (in days) is on a remote machine. ([adsi]\"WinNT:\/\/<COMPUTERNAME>\/administrator\").passwordage.value\/86400 This requires RPC\/DCOM access to the remote computer. Or use PowerShell remoting with Invoke-Command: invoke-command { new-object PSObject -property @{ Computername = $env:computername AdminAge = ([adsi]\"WinNT:\/\/$env:computername\/administrator\").passwordage.value\/86400 } } -ComputerName\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2960,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2960\/powershell-summit-2013-kicks-off\/","url_meta":{"origin":76,"position":1},"title":"PowerShell Summit 2013 Kicks Off","author":"Jeffery Hicks","date":"April 22, 2013","format":false,"excerpt":"I'm very excited to be in Redmond for a few days as part of the PowerShell Summit. I love catching up with old friends and making new ones all over PowerShell. If you couldn't make it this year, and I know many of you will feel you are missing out,\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4966,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4966\/powershell-toolmaking-dos-and-donts\/","url_meta":{"origin":76,"position":2},"title":"PowerShell Toolmaking Dos and Don&#8217;ts","author":"Jeffery Hicks","date":"May 2, 2016","format":false,"excerpt":"During the last Microsoft MVP Summit, Channel 9 invited MVPs into their studios to record short presentations on anything they wanted. This was too good a deal to pass on, so my friend Greg Shields and I jumped into the studio to talk about PowerShell Toolmaking. To be more accurate,\u2026","rel":"","context":"In &quot;MVP&quot;","block_context":{"text":"MVP","link":"https:\/\/jdhitsolutions.com\/blog\/category\/mvp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":701,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/701\/this-old-script\/","url_meta":{"origin":76,"position":3},"title":"This Old Script","author":"Jeffery Hicks","date":"July 15, 2010","format":false,"excerpt":"I\u2019m very slowly revising my main web site. The upshot for now is that there is no direct link to my old script library. Many of my Mr. Roboto tools can be found on this page. Until I can finish the upgrade project, you can use this link, http:\/\/www.jdhitsolutions.com\/scripts.htm to\u2026","rel":"","context":"In &quot;Mr. Roboto&quot;","block_context":{"text":"Mr. Roboto","link":"https:\/\/jdhitsolutions.com\/blog\/category\/mr-roboto\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4723,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4723\/a-powershell-new-year\/","url_meta":{"origin":76,"position":4},"title":"A PowerShell New Year","author":"Jeffery Hicks","date":"December 31, 2015","format":false,"excerpt":"First off, let me thank all of you for your support and interest in my work this past year. Without it I'd be another old man sitting in his bathrobe talking to himself. I hope I can keep your interest in 2016. To wrap up the year and to bring\u2026","rel":"","context":"In &quot;Miscellaneous&quot;","block_context":{"text":"Miscellaneous","link":"https:\/\/jdhitsolutions.com\/blog\/category\/miscellaneous\/"},"img":{"alt_text":"Champagne_glasses","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/12\/Champagne_glasses_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5864,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5864\/a-powershell-dns-suffix-tool\/","url_meta":{"origin":76,"position":5},"title":"A PowerShell DNS Suffix Tool","author":"Jeffery Hicks","date":"February 1, 2018","format":false,"excerpt":"The other day my good friend Greg Shields asked for a little assistance with a PowerShell problem. He was trying to use PowerShell to set the primary DNS suffix for a computer. This\u00a0 is different than the DNS suffix you can set on a network adapter configuration. Instead, he was\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/02\/system1_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/02\/system1_thumb.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/02\/system1_thumb.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/02\/system1_thumb.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}