Search This Blog

Monday, September 25, 2023

Cannot Install PowerShell Module - Unable to find module repositories

Description:

You try to Install a new PowerShell Module. But you got an error saying "No match was found for the specified search criteria and module name ' ' Try Get-PSRepository to see all available registered module repositories". However when you try to run Get-PSRepository command you got "Unable to find module repositories error".

You have try the following, but still have the problem:

  • Make sure to Run as Administrator, 
  • Make sure to use TLS 1.2 

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

  • Unregister and Register
    • Unregister-PSRepository -Name PSGallery
    • Register-PSRepository -Default
Resolution:
Make sure there's no blocking at the Internet (proxy). Switch using different Internet connection and try to install again.

Modifying AdminSDHolder Permission Delegation

Description:

You want to delegate permission to write certain user attribute for member of protected groups in Active Directory to a "normal" users. You have add the permission at the AdminSDholder container through GUI for that "normal" users. However during testing, you find that the "normal" users is still unable to modify the protected groups users attribute.

Resolution:

You need to use command line instead of GUI.
In order to grant access to a specific user object attribute, for example department, use dsacls:
dsacls “CN=AdminSDHolder,CN=System,DC=example,DC=com” /G Allow-User-Management:WP;department;

Search Google