Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6791163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:48:46+00:00 2026-05-26T17:48:46+00:00

After scripting around in Powershell with low restrictions (or for brief periods none) I

  • 0

After scripting around in Powershell with low restrictions (or for brief periods none) I decided to get my act together and start doing everything Set-ExecutionPolicy AllSigned. After walking through Hanselman’s old post, I was unable to even sign my profile.ps1.

A quick test revealed that: Get-ChildItem cert:\CurrentUser\My –codesign always returns null. I opened up certmgr and I can see all of the certificates, but I am uncertain why I can’t sign anything local. Running this:

Set-AuthenticodeSignature "C:\users\[MY USER ACCOUNT]\Documents\WindowsPowerShell\profile.ps1" @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0]

Will always return:

Set-AuthenticodeSignature : Cannot bind argument to parameter
‘Certificate’ because it is null

I am on Windows 7 Ultimate in an administrator account, and I have executed everything in PS or CMD as an admin. I have been pretty much just kind of hacking my way around PowerShell for a while now, but I hope I am not missing something super simple here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:48:46+00:00Added an answer on May 26, 2026 at 5:48 pm

    I think I have figured it out, actually. I am not sure if this best practice or not in this case, but I am tired of beating my head against my desk.

    1.) So, I looked at this MS Support Article and I noticed that the SYSTEM user is supposed to have full control over the …\Crypto\RSA\MachineKeys dir and mine did not have SYSTEM listed at all. So, I changed the permissions there (this would also jive with SO Question #11887).

    2.) Deleted the certs I created earlier and re-created them.

    3.) Opened up certmgr, found the cert, went to props, and set the specific purpose.

    Now Get-ChildItem cert:\CurrentUser\My -codesigning returns the thumbprint and I can sign scripts.

    I am not sure why my installation was like this or how unusual this is, but I have never touched the MachineKey directory there previously. But it seems to work now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the beginning PHP was a scripting language. But after the introduction and improvement
I am currently scripting for After Effects using ExtendScript Toolkit How do I apply
Is there any validation tool for shell scripting on unix platform. like after the
I'm doing some Javascript scripting with InDesign Server at the moment. I'm having trouble
I'm developing a Java application that uses Kahlua for embedded Lua scripting. After calling
I've been looking around for information about XMPP and JavaScr-er, ECMAScript and XMPP. After
after being sick for a few week I am trying to get back into
After a little testing/scripting/playing with PHP 5.3 PHAR archives, I discovered some problems. glob
I'm having some problems with some python scripting I've been doing. The idea of
I have a problem trying to get my head around using UTF8 with Poco::XML::XMLWriter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.