{"id":4354,"date":"2024-06-04T06:03:36","date_gmt":"2024-06-04T06:03:36","guid":{"rendered":"https:\/\/signmycode.com\/blog\/?p=4354"},"modified":"2024-09-18T06:26:44","modified_gmt":"2024-09-18T06:26:44","slug":"powershell-code-signing-best-practices-for-signing-your-script","status":"publish","type":"post","link":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script","title":{"rendered":"PowerShell Code Signing Best Practices for Signing Your Script"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PowerShell is a powerful tool that is used for automating monotonous and time-consuming tasks. However, using these without code signing can leave you vulnerable to cyber-attacks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This blog will explain the PowerShell code signing best practices for signing your script. Let\u2019s begin!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Also Read: <\/strong><a href=\"https:\/\/signmycode.com\/blog\/what-is-powershell\">What is PowerShell? Things to know about PowerShell Code Signing.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-powershell-code-signing-best-practices\">PowerShell Code Signing Best Practices<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-use-the-latest-powershell-version\">Use The latest PowerShell Version<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The first and foremost best code signing practice is to use the latest Powershell version. This is for every software you use, not only PowerShell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How will you check if the latest version is installed on your device or not? <strong>So, there are different methods to identify this, as explained below.&nbsp;<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-get-host-command\">The Get-Host Command<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">When you run the Get-Host command in PowerShell, it tells you information about the program (or &#8220;host&#8221;) running PowerShell. This includes details like the program&#8217;s name, version, and some settings, like language preferences.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, the version number you see from Get-Host doesn&#8217;t always tell you the exact version of PowerShell itself. Instead, it usually shows the version of the program that&#8217;s running PowerShell. That\u2019s why sometimes the results are inaccurate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The version mentioned below is <strong>5.1.19041.1645<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"468\" src=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/get-host-powershell-version.png\" alt=\"\" class=\"wp-image-4364\" srcset=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/get-host-powershell-version.png 707w, https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/get-host-powershell-version-300x199.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-host-version-command\">The $host.Version command<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Run (Get-Host). Version and you will see the similar version as we have got above.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-psversiontable-command\">The $PSVersionTable command<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This is one of the most reliable and trusted methods for identifying the PowerShell version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All you need to do is type $PSVersionTable in the command prompt, press Enter, and you\u2019ll see the below results.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"425\" src=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/powershell-psversion-table-1024x425.png\" alt=\"PowerShell PSVersion Table\" class=\"wp-image-4365\" srcset=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/powershell-psversion-table-1024x425.png 1024w, https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/powershell-psversion-table-300x125.png 300w, https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/powershell-psversion-table-768x319.png 768w, https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/06\/powershell-psversion-table.png 1028w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-limit-access-to-the-powershell-console\">Limit Access to the PowerShell Console<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Powershell is a powerful tool for automating administrative tasks and managing systems in Windows. However, if the wrong entities get access to it, they can maliciously modify system settings, install malware, or even delete data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid such circumstances, it&#8217;s vital that only trusted authorities gain access to the PowerShell Console. To limit the access, use role-based access control (RBAC).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a built-in feature in PowerShell that allows respective owners to control who can run PowerShell commands. For instance, only the IT department can run PowerShell commands and not other teams.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-log-script-signing-actions\">Log Script Signing Actions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Logs and monitoring tools are used to address and prevent security incidents. <strong>Here&#8217;s how!<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Monitor Script Signing: <\/strong>Use Kibana, Grafana, or Tableau to identify suspicious and anomalous activities in minutes.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Audit Log Key Usage: <\/strong>Maintain detailed logs of code signing key usage to track how and when certificates are used. Additionally, regularly audit them to proactively identify security threats and maintain control over the script signing process.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-implement-signing-keys-policies\">Implement Signing Keys Policies<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ensuring the security of private keys is not just enough; in fact, you have to develop and implement some strict measures. <strong>Below are some!<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use a strong authentication method, like multi-factor authentication, to digitally sign a script.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Regulate the access control and give access only to authorized users.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use Checksums to check whether the original script has been altered. It&#8217;s a unique value that comprises a short string of alphanumeric characters.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-avoid-signing-all-the-scripts-with-the-same-key\">Avoid Signing all The Scripts With the Same Key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Using just one key to sing all the scripts is a good idea. Right? But no, it&#8217;s not that good!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, it\u2019s cheaper and easier to manage, but you will end up paying much more amount than spending only a few extra to get the extra keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What if you use the same key? Read on to find out!<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An attack or breach on that respective key will invalidate other signatures and good code. The process works as the saying goes: one rotten egg can spoil the whole barrel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will be saved a bit if you have applied the timestamps while singing the scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But why take the risk if you are already aware of that? So, choose wisely!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-use-hardware-security-module-hsm\">Use Hardware Security Module (HSM)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">HSM, or <a href=\"https:\/\/signmycode.com\/blog\/what-is-a-hardware-security-module-role-of-hsms-for-digital-signing\">Hardware Security Module<\/a>, is a tamper-resistant and FIPS-validated device that protects, processes, and manages cryptographic keys. It allows the usage of keys without having direct access to them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended:<\/strong> <a href=\"https:\/\/signmycode.com\/resources\/how-to-sign-the-powershell-script-with-code-with-yubikey\">How to Sign the PowerShell Script Code with YubiKey?<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, always ensure that all the private keys for the code signing certificate are saved on an HSM. Don\u2019t forget to protect the cryptographic HSM with a randomly generated 16-character-long password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-always-prefer-a-trusted-code-signing-certificate\">Always Prefer a Trusted Code Signing Certificate<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Always get a <a href=\"https:\/\/signmycode.com\/buy-code-signing-certificates\">code signing certificate from a trusted CA<\/a>, like Comodo, DigiCert, Certera or Sectigo, instead of a self-signed one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A self-signed code signing certificate has an unconfirmed identity. This means that users will receive a warning message whenever you make it available publicly.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended:<\/strong> <a href=\"https:\/\/signmycode.com\/blog\/self-signed-vs-publicly-trusted-ca-code-signing-certificates#:~:text=3.-,Authenticity%20and%20Integrity,and%20integrity%20of%20the%20publisher.\">Self-Signed vs. Publicly Trusted CA Code Signing Certificates: which one should you choose? <\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the contrary, code signing certs issued by trusted CAs do not show any warning and get downloaded smoothly.\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-avoid-running-unsigned-scripts\">Avoid Running Unsigned Scripts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PowerShell is a potent tool, and if cybercriminals hack it, they can seamlessly access systems and data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To mitigate the risk, PowerShell includes a security feature called \u201c<strong>script signing<\/strong>\u201d, which allows you to sign the script digitally. This process verifies the script&#8217;s authenticity and ensures it&#8217;s not tampered with.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended:<\/strong> <a href=\"https:\/\/signmycode.com\/powershell-script-code-signing-certificate\">Buy PowerShell Code Signing Cert and Sign your Code &#8211; Starts at Just $215.99\/yr<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Still, you\u2019ll run the unsigned script; a warning will be displayed. Make sure not to bypass and resolve it as soon as possible.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-scan-for-viruses-before-signing\">Scan For Viruses Before Signing<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that the software is virus-free before it\u2019s signed so you can handle the potential problems at the initial stage only. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any breach after the code signing will affect the users\u2019 computers or devices, and the signing certificate needs to be revoked. Getting a new one will be pretty much harder due to the validation requirements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-timestamp-everything\">Timestamp Everything<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/signmycode.com\/resources\/what-is-timestamping-in-code-signing\">Timestamping<\/a> the digital signature ensures that users can still access it without any warning. It adds the exact time and date when the signature was applied.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To set the timestamp<\/strong>, add -TimeStampServer https:\/\/TIMESTAMP_SERVER at the end of the Set-AuthenticodeSignature command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure to replace C:\\PS\\powershell_script.ps1 with the script path and https:\/\/TIMESTAMP_SERVER with your CA (certificate authority). (e.g., https:\/\/timestamp.digicert.com)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To check if timestamping was successful, follow the below steps.<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Right-click on the script\u2019s folder<\/strong> to select \u201c<strong>properties<\/strong>\u201d.<\/li>\n\n\n\n<li>Click the <strong>Digital Signatures tab<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If the process is done successfully, you will see the below result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"653\" height=\"380\" src=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2023\/08\/digital-signature-tab-jpg.webp\" alt=\"Digital Signature Tab\" class=\"wp-image-3443\" srcset=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2023\/08\/digital-signature-tab-jpg.webp 653w, https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2023\/08\/digital-signature-tab-300x175.webp 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We understand that these are extra steps to configure the signing device but trust us, these are necessary. Failure to do so will render the signatures invalid once the code signing certificate expires.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, it\u2019s a fact that despite using protective measures, some mistakes can still happen; after all, we are all human beings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Here are some tips on revocation if the code signing cert gets compromised.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Immediately notify your CA when the issue arises.<\/li>\n\n\n\n<li>The revocation date affects the validity of timestamped signatures. Always select a date before the day the certificate was compromised.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-bottom-line\">The Bottom Line<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To conclude, you can use the above code signing best practices to secure your scripts further and enjoy peace of mind that these are protected from hackers!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recommended:<\/strong> <a href=\"https:\/\/signmycode.com\/resources\/how-to-sign-digitally-powershell-script\">How to Sign Digitally PowerShell Script With a Code Signing?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell is a powerful tool that is used for automating monotonous and time-consuming tasks. However, using these without code signing can leave you vulnerable to cyber-attacks. This blog will explain the PowerShell code signing best practices for signing your script. Let\u2019s begin! Also Read: What is PowerShell? Things to know about PowerShell Code Signing. PowerShell&hellip; <a class=\"more-link\" href=\"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script\">Read More <span class=\"screen-reader-text\">PowerShell Code Signing Best Practices for Signing Your Script<\/span><\/a> <\/p>\n","protected":false},"author":1,"featured_media":4356,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,457,641],"tags":[745,746],"class_list":["post-4354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-signing-updates","category-developers-guide","category-windows-security","tag-powershell-code-signing-best-practices","tag-powershell-script-signing-practices","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.6 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>10 Best Practices for Windows PowerShell Script Signing<\/title>\n<meta name=\"description\" content=\"Find here the best PowerShell code signing practices for signing PowerShell scripts and keeping digital signatures safe and secure.\" \/>\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\/blog\/powershell-code-signing-best-practices-for-signing-your-script\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell Code Signing Best Practices for Signing Your Script\" \/>\n<meta property=\"og:description\" content=\"Find here the best PowerShell code signing practices for signing PowerShell scripts and keeping digital signatures safe and secure.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script\" \/>\n<meta property=\"og:site_name\" content=\"SignMyCode - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-04T06:03:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-18T06:26:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/05\/powershell-coding-practices-jpg.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"912\" \/>\n\t<meta property=\"og:image:height\" content=\"453\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Janki Mehta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script\",\"url\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script\",\"name\":\"10 Best Practices for Windows PowerShell Script Signing\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/powershell-coding-practices-jpg.webp\",\"datePublished\":\"2024-06-04T06:03:36+00:00\",\"dateModified\":\"2024-09-18T06:26:44+00:00\",\"description\":\"Find here the best PowerShell code signing practices for signing PowerShell scripts and keeping digital signatures safe and secure.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script#primaryimage\",\"url\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/powershell-coding-practices-jpg.webp\",\"contentUrl\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/powershell-coding-practices-jpg.webp\",\"width\":912,\"height\":453,\"caption\":\"PowerShell Coding Best Practices\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/powershell-code-signing-best-practices-for-signing-your-script#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell Code Signing Best Practices for Signing Your Script\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/\",\"name\":\"SignMyCode - Blog\",\"description\":\"Code Signing News, Updates\",\"publisher\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/#organization\",\"name\":\"SignMyCode.com\",\"url\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/logo1.png\",\"contentUrl\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/logo1.png\",\"width\":135,\"height\":86,\"caption\":\"SignMyCode.com\"},\"image\":{\"@id\":\"https:\\\/\\\/signmycode.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"10 Best Practices for Windows PowerShell Script Signing","description":"Find here the best PowerShell code signing practices for signing PowerShell scripts and keeping digital signatures safe and secure.","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\/blog\/powershell-code-signing-best-practices-for-signing-your-script","og_locale":"en_US","og_type":"article","og_title":"PowerShell Code Signing Best Practices for Signing Your Script","og_description":"Find here the best PowerShell code signing practices for signing PowerShell scripts and keeping digital signatures safe and secure.","og_url":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script","og_site_name":"SignMyCode - Blog","article_published_time":"2024-06-04T06:03:36+00:00","article_modified_time":"2024-09-18T06:26:44+00:00","og_image":[{"width":912,"height":453,"url":"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/05\/powershell-coding-practices-jpg.webp","type":"image\/jpeg"}],"author":"Janki Mehta","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Janki Mehta","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script","url":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script","name":"10 Best Practices for Windows PowerShell Script Signing","isPartOf":{"@id":"https:\/\/signmycode.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script#primaryimage"},"image":{"@id":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script#primaryimage"},"thumbnailUrl":"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/05\/powershell-coding-practices-jpg.webp","datePublished":"2024-06-04T06:03:36+00:00","dateModified":"2024-09-18T06:26:44+00:00","description":"Find here the best PowerShell code signing practices for signing PowerShell scripts and keeping digital signatures safe and secure.","breadcrumb":{"@id":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script#primaryimage","url":"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/05\/powershell-coding-practices-jpg.webp","contentUrl":"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2024\/05\/powershell-coding-practices-jpg.webp","width":912,"height":453,"caption":"PowerShell Coding Best Practices"},{"@type":"BreadcrumbList","@id":"https:\/\/signmycode.com\/blog\/powershell-code-signing-best-practices-for-signing-your-script#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/signmycode.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PowerShell Code Signing Best Practices for Signing Your Script"}]},{"@type":"WebSite","@id":"https:\/\/signmycode.com\/blog\/#website","url":"https:\/\/signmycode.com\/blog\/","name":"SignMyCode - Blog","description":"Code Signing News, Updates","publisher":{"@id":"https:\/\/signmycode.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/signmycode.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/signmycode.com\/blog\/#organization","name":"SignMyCode.com","url":"https:\/\/signmycode.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/signmycode.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2021\/10\/logo1.png","contentUrl":"https:\/\/signmycode.com\/blog\/wp-content\/uploads\/2021\/10\/logo1.png","width":135,"height":86,"caption":"SignMyCode.com"},"image":{"@id":"https:\/\/signmycode.com\/blog\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/posts\/4354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/comments?post=4354"}],"version-history":[{"count":5,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/posts\/4354\/revisions"}],"predecessor-version":[{"id":4644,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/posts\/4354\/revisions\/4644"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/media\/4356"}],"wp:attachment":[{"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/media?parent=4354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/categories?post=4354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/signmycode.com\/blog\/wp-json\/wp\/v2\/tags?post=4354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}