Remote Registry service and Get-DbaProductKey

  • Hello ,

    I have to do an SQL license audit I try to use the command dbatools Get-DbaProductKey

    except that this command requires starting the Remote Registry service

    AVERTISSEMENT : [09:59:19][Get-DbaProductKey] Can't access registry for DESKTOP-95KKMMH. Is the Remote Registry service started?
    AVERTISSEMENT : [09:59:21][Find-DbaInstance] Failed to execute Service Principal Name discovery | Exception lors de l'appel de « FindAll » avec « 0 » a
    rgument(s) : « Le domaine spécifié n’existe pas ou n’a pas pu être contacté.
     »

    how I can use this command without starting this service

    Sans titre

    ManualConfig_GenEvents_RemoteRegistry2016

    thanks for your help

     

     

  • Is the service running on the remote server?   The screenshot says "Local" so I wasn't sure...

    First thing I'd check is if the remote server has Remote Registry enabled.

    If that service is not running, the command won't work.  There is no way around that.  Well, one way around it would be to run the command on the physical server as then you aren't accessing a remote machine and as such don't need remote registry (just need permissions to read the registry).

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • My recommendation would be to contact the people that wrote the "Get-DbaProductKey" PoSh snippet and ask them.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply