{"id":1984,"date":"2023-06-06T11:34:29","date_gmt":"2023-06-06T11:34:29","guid":{"rendered":"https:\/\/signmycode.com\/resources\/?p=1984"},"modified":"2024-09-17T06:42:10","modified_gmt":"2024-09-17T06:42:10","slug":"how-to-sign-the-powershell-script-with-code-with-yubikey","status":"publish","type":"post","link":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey","title":{"rendered":"How to Sign the PowerShell Script Code with YubiKey?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ensure the security and integrity of software code as a developer and IT professional. One crucial aspect of code security lies in code signing, a process that validates the authenticity and integrity of scripts and applications. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For PowerShell users, code signing is vital in establishing trust and preventing unauthorized tampering. However, the traditional approach of using a code signing certificate, like the one issued by DigiCert, can often be cumbersome and restrictive.<\/p>\n\n\n\n<div class=\"wp-block-columns has-green-background-color has-background is-layout-flex wp-container-core-columns-is-layout-2367b857 wp-block-columns-is-layout-flex\" style=\"padding-top:35px;padding-bottom:30px\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading has-text-align-center\"><strong>Digitally Sign your PowerShell Script with Token Based Code Signing Certificate!<\/strong>&#8220;<\/h3>\n\n\n\n<div class=\"wp-block-buttons alignwide is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button aligncenter\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/signmycode.com\/buy-code-signing-certificates\">Get Code Signing Cert<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This article will explore enhancing your PowerShell code security by integrating a YubiKey into your code signing workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why must you Use the Yubikey for your PowerShell Code Signing?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Consider the scenario where you work on PowerShell scripts in different environments, such as when visiting clients or working remotely. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The inconvenience of having to move your code to a specific location where your <a href=\"https:\/\/signmycode.com\/code-signing-certificates\">code signing certificate<\/a> is accessible to sign it can be a significant obstacle. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, relying on online platforms like Visual Studio Team Services (VSTS) for automated script signing introduces dependencies on internet connectivity and VSTS availability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, there is a solution that simplifies the code-signing process and empowers you to sign PowerShell scripts effortlessly, irrespective of your location. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By <a href=\"https:\/\/signmycode.com\/blog\/what-is-a-yubikey-how-does-it-work-detailed-guide\">leveraging the power of a YubiKey<\/a>, a versatile hardware authentication device, you can streamline the code signing workflow and eliminate the need for constant certificate transfers or online dependencies.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a YubiKey Hardware?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A YubiKey, resembling a sleek and compact USB device, has gained popularity as an effective second-factor authentication tool. Many users have embraced its reliability and convenience for enhancing security measures. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, what remains largely unexplored is the potential of using a YubiKey for code signing. This unassuming device can revolutionize the way we approach code signing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring the YubiKey with appropriate certificates transforms into a smartcard-like solution that securely stores your private keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With a simple plug-in, your YubiKey becomes a portable repository for your signing certificate. Consider a scenario where you had your YubiKey reset, assigned new pin codes, and securely stored your signing certificate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you can connect it to any computer and instantly access your certificate, eliminating worrying about storing your private key separately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step-wise Guide to Sign the Code with YubiKey<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Utilizing a YubiKey for code signing ensures the secure storage of your certificate and offers seamless access across multiple computers. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have imported your certificate into the YubiKey, you can insert the key into any computer, and the certificate will become readily available in the current user&#8217;s certificate store. Let&#8217;s explore how this process looks and examine the output when enumerating the store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To begin, we can use the PowerShell command &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">Get-ChildItem<\/mark><\/strong>&#8221; along with the specified path &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">cert:\\currentuser\\my<\/mark><\/strong>&#8221; to access the current user&#8217;s certificate store. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, to filter the results and retrieve only the certificates valid for code signing, we can employ the &#8220;<mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\"><strong>-CodeSigning<\/strong><\/mark>&#8221; parameter. This parameter restricts the output only to display certificates applicable for code signing purposes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>By executing the following command:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-ChildItem -Path \"cert:\\currentuser\\my\" -CodeSigning<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can retrieve a concise and focused list of certificates intended for code signing to identify the valid certificates to sign our code quickly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We narrowed the search scope by utilizing the &#8220;-CodeSigning&#8221; parameter to ensure that only relevant certificates are returned. This approach streamlines the process and eliminates unnecessary clutter, making managing and selecting the appropriate certificate for code signing easier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Sign in to YubiKey?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Code signing plays a vital role in ensuring the integrity and authenticity of your PowerShell module. In the case of the &#8220;DSACL&#8221; module containing functions for Active Directory ACLs, signing the module before sharing it on the PowerShell gallery is imperative.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>There are two approaches to signing a module: <\/strong>signing individual files and using catalog signing, which we will explore here.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To begin, we need to obtain a reference to the code signing certificate. If you possess only one code signing certificate on your computer, you can store the output from the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">Get-ChildItem<\/mark><\/strong>&#8221; command in a variable. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if you have multiple certificates, a preferred method involves using &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">Out-GridView<\/mark><\/strong>&#8221; to select the desired certificate interactively.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The following example demonstrates this process:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$Cert = Get-ChildItem -Path 'cert:\\currentuser\\my' -CodeSigning | Out-GridView -PassThru<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With the certificate reference in place, we can sign the script files. This signature serves as validation for PowerShell when loading the module. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">Set-AuthenticodeSignature<\/mark><\/strong>&#8221; command is utilized for this purpose. A timestamp server is employed to ensure the validity of the signature even after the certificate expiration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This server appends a timestamp to the signature, allowing validation of the certificate&#8217;s validity at the time of signing. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To sign only the module and manifest files, execute the following command within the directory where the files reside:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-ChildItem -Path '*.ps*' | Set-AuthenticodeSignature -Certificate $Cert -TimestampServer 'http:\/\/timestamp.digicert.com'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The next step involves creating a catalog file containing each file&#8217;s hash sums, ensuring the module&#8217;s integrity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When installing the module using &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">Install-Module<\/mark><\/strong>&#8221; PowerShellGet utilizes this catalog file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this case, we opt for catalog version 1, which employs the SHA1 algorithm. This choice maintains compatibility with Windows 7. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To create the catalog file, use the following command within the same directory as the files to be signed:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>New-FileCatalog -CatalogVersion 1 -CatalogFilePath .\\DSACL.cat -Path $PWD.Path<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The resulting &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#00b373\" class=\"has-inline-color\">DSACL.cat<\/mark><\/strong>&#8221; file will contain the hashes for all the files in the directory. Any modifications, additions, or removals to the files will render the catalog file invalid. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Safeguard the integrity of the catalog file using the code signing certificate with the following command:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-AuthenticodeSignature -Certificate $Cert -TimestampServer 'http:\/\/timestamp.digicert.com' -FilePath .\\DSACL.cat<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With these steps completed, PowerShell can now validate the signatures on each PowerShell file, including the module file, module manifest, and catalog signing file. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Performing these checks<strong> enables PowerShellGet<\/strong> to verify both the signature on the catalog file and its validity. With these comprehensive security measures, you can have confidence that your code remains unaltered.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And there you have it! With your PowerShell module signed and secured, you can confidently share it while maintaining its integrity. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Happy signing, and may your PowerShell endeavors continue to thrive with enhanced security measures!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ensure the security and integrity of software code as a developer and IT professional. One crucial aspect of code security lies in code signing, a process that validates the authenticity and integrity of scripts and applications. For PowerShell users, code signing is vital in establishing trust and preventing unauthorized tampering. However, the traditional approach of&hellip; <a class=\"more-link\" href=\"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey\">Read More <span class=\"screen-reader-text\">How to Sign the PowerShell Script Code with YubiKey?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1989,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[350,570],"class_list":["post-1984","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-signing-tutorials","tag-powershell-code-sign-using-yubikey","tag-sign-code-using-powershell","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use YubiKey for PowerShell Code Signing?<\/title>\n<meta name=\"description\" content=\"Follow the detailed information and steps to sign code using PowerShell Script Code Signing Certificate.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use YubiKey for PowerShell Code Signing?\" \/>\n<meta property=\"og:description\" content=\"Follow the detailed information and steps to sign code using PowerShell Script Code Signing Certificate.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey\" \/>\n<meta property=\"og:site_name\" content=\"SignMyCode - Resources\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-06T11:34:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-17T06:42:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png\" \/>\n\t<meta property=\"og:image:width\" content=\"912\" \/>\n\t<meta property=\"og:image:height\" content=\"440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Janki Mehta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png\" \/>\n<meta name=\"twitter:creator\" content=\"@Sign_My_Code\" \/>\n<meta name=\"twitter:site\" content=\"@Sign_My_Code\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Janki Mehta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey\"},\"author\":{\"name\":\"Janki Mehta\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#\\\/schema\\\/person\\\/2e80276fd34fd5439c04cd3cb96a389f\"},\"headline\":\"How to Sign the PowerShell Script Code with YubiKey?\",\"datePublished\":\"2023-06-06T11:34:29+00:00\",\"dateModified\":\"2024-09-17T06:42:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey\"},\"wordCount\":997,\"publisher\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png\",\"keywords\":[\"powershell code sign using Yubikey\",\"sign code using powershell\"],\"articleSection\":[\"Code Signing Tutorials\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey\",\"url\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey\",\"name\":\"How to Use YubiKey for PowerShell Code Signing?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png\",\"datePublished\":\"2023-06-06T11:34:29+00:00\",\"dateModified\":\"2024-09-17T06:42:10+00:00\",\"description\":\"Follow the detailed information and steps to sign code using PowerShell Script Code Signing Certificate.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage\",\"url\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png\",\"contentUrl\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png\",\"width\":912,\"height\":440,\"caption\":\"Code Signing Certificate from YubiKey to Sign Powershell\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/how-to-sign-the-powershell-script-with-code-with-yubikey#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Sign the PowerShell Script Code with YubiKey?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/\",\"name\":\"SignMyCode - Resources\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#organization\",\"name\":\"SignMyCode\",\"url\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/logo1.png\",\"contentUrl\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/logo1.png\",\"width\":135,\"height\":86,\"caption\":\"SignMyCode\"},\"image\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/Sign_My_Code\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/resources\\\/#\\\/schema\\\/person\\\/2e80276fd34fd5439c04cd3cb96a389f\",\"name\":\"Janki Mehta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/74a1328bbec77f3a65123c2396050e61b60fe3831478ceb96b55e5a0fe44e370?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/74a1328bbec77f3a65123c2396050e61b60fe3831478ceb96b55e5a0fe44e370?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/74a1328bbec77f3a65123c2396050e61b60fe3831478ceb96b55e5a0fe44e370?s=96&d=blank&r=g\",\"caption\":\"Janki Mehta\"},\"description\":\"Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web\\\/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.\",\"sameAs\":[\"http:\\\/\\\/smcresources.ssltoolsonline.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use YubiKey for PowerShell Code Signing?","description":"Follow the detailed information and steps to sign code using PowerShell Script Code Signing Certificate.","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:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey","og_locale":"en_US","og_type":"article","og_title":"How to Use YubiKey for PowerShell Code Signing?","og_description":"Follow the detailed information and steps to sign code using PowerShell Script Code Signing Certificate.","og_url":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey","og_site_name":"SignMyCode - Resources","article_published_time":"2023-06-06T11:34:29+00:00","article_modified_time":"2024-09-17T06:42:10+00:00","og_image":[{"width":912,"height":440,"url":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png","type":"image\/png"}],"author":"Janki Mehta","twitter_card":"summary_large_image","twitter_image":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png","twitter_creator":"@Sign_My_Code","twitter_site":"@Sign_My_Code","twitter_misc":{"Written by":"Janki Mehta","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#article","isPartOf":{"@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey"},"author":{"name":"Janki Mehta","@id":"https:\/\/signmycode.com\/resources\/#\/schema\/person\/2e80276fd34fd5439c04cd3cb96a389f"},"headline":"How to Sign the PowerShell Script Code with YubiKey?","datePublished":"2023-06-06T11:34:29+00:00","dateModified":"2024-09-17T06:42:10+00:00","mainEntityOfPage":{"@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey"},"wordCount":997,"publisher":{"@id":"https:\/\/signmycode.com\/resources\/#organization"},"image":{"@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage"},"thumbnailUrl":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png","keywords":["powershell code sign using Yubikey","sign code using powershell"],"articleSection":["Code Signing Tutorials"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey","url":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey","name":"How to Use YubiKey for PowerShell Code Signing?","isPartOf":{"@id":"https:\/\/signmycode.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage"},"image":{"@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage"},"thumbnailUrl":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png","datePublished":"2023-06-06T11:34:29+00:00","dateModified":"2024-09-17T06:42:10+00:00","description":"Follow the detailed information and steps to sign code using PowerShell Script Code Signing Certificate.","breadcrumb":{"@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#primaryimage","url":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png","contentUrl":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2023\/06\/how-to-get-code-signing-certificates-from-a-yubikey-using-powershell.png","width":912,"height":440,"caption":"Code Signing Certificate from YubiKey to Sign Powershell"},{"@type":"BreadcrumbList","@id":"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/signmycode.com\/resources\/"},{"@type":"ListItem","position":2,"name":"How to Sign the PowerShell Script Code with YubiKey?"}]},{"@type":"WebSite","@id":"https:\/\/signmycode.com\/resources\/#website","url":"https:\/\/signmycode.com\/resources\/","name":"SignMyCode - Resources","description":"","publisher":{"@id":"https:\/\/signmycode.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/signmycode.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/signmycode.com\/resources\/#organization","name":"SignMyCode","url":"https:\/\/signmycode.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/signmycode.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2021\/11\/logo1.png","contentUrl":"https:\/\/signmycode.com\/resources\/wp-content\/uploads\/2021\/11\/logo1.png","width":135,"height":86,"caption":"SignMyCode"},"image":{"@id":"https:\/\/signmycode.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/Sign_My_Code"]},{"@type":"Person","@id":"https:\/\/signmycode.com\/resources\/#\/schema\/person\/2e80276fd34fd5439c04cd3cb96a389f","name":"Janki Mehta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/74a1328bbec77f3a65123c2396050e61b60fe3831478ceb96b55e5a0fe44e370?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/74a1328bbec77f3a65123c2396050e61b60fe3831478ceb96b55e5a0fe44e370?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/74a1328bbec77f3a65123c2396050e61b60fe3831478ceb96b55e5a0fe44e370?s=96&d=blank&r=g","caption":"Janki Mehta"},"description":"Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web\/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.","sameAs":["http:\/\/smcresources.ssltoolsonline.com"]}]}},"_links":{"self":[{"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/posts\/1984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/comments?post=1984"}],"version-history":[{"count":6,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/posts\/1984\/revisions"}],"predecessor-version":[{"id":4053,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/posts\/1984\/revisions\/4053"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/media\/1989"}],"wp:attachment":[{"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/media?parent=1984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/categories?post=1984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/signmycode.com\/resources\/wp-json\/wp\/v2\/tags?post=1984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}