Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Access to variables in PDQ Inventory?

Hello everyone.  There is a variable in PDQ Inventory that I would like to be able to read in PDQ Deploy.  However, PDQ Deploy does not seem to be able to read it.  For example, from within PDQ Inventory, I am able to Run Command and have that execute "echo $(HFName102009MonthlyLatest)" which works just fine.  But, if I create a package in PDQ Deploy and have a Powershell step that also executes "echo $(HFName102009MonthlyLatest)" then I get an error from Powershell stating that the term 'HFName102009MonthlyLatest' is not recognized as the name of a cmdlet, blah blah blah.

How might I be able to read that PDQ Inventory variable from PDQ Deploy?

Thank you!

1

Comments

2 comments
Date Votes
  • It is not currently possible to automatically sync variables between Deploy and Inventory. You could write a PowerShell script to do it periodically, but it would require reading from the database since there's no command to read variables.

    1
  • I just added Sync-PdqVariable to my PowerShell module, PdqStuff. It synchronizes all variables between Deploy and Inventory. Open a PowerShell window as admin, then run the following. You will most likely have to accept a few prompts.

    Set-ExecutionPolicy 'RemoteSigned'
    Install-Module -Name 'PdqStuff'
    Import-Module -Name 'PdqStuff'
    Get-Help Sync-PdqVariable -Full
    0