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.

Feature Request - Target variable

It would be nice to have a @(Target) variable that was updated dynamically for the respective target machine.  This would be very useful in more complex scripting environments such as using PowerShell.  Granted that within PowerShell you can use the $env:COMPTUERNAME variable within the script.  However, since PDQ Deploy doesn't have a native PowerShell interface and we have to launch PowerShell via the cmd.exe host, the ability to pass in the intended target information would be useful.

0

Comments

2 comments
Date Votes
  • Or even better, create a "New Step" where you can enter a variable that can then be referred to in scripts whether it be command line, or powershell

    0
  • in my case where i have to do an inventory of my target devices and show their hostnames, this is my command

    for /f "tokens=14" %%a in ('ipconfig ^| findstr IPv4') do echo %%a>\\Public\temp\%computername%---%%a.txt
    

    One dilemma i have for this is that the resulting file doesn't show the actual computer name. Hostname mismatch is the case. One thing I would want to know if there's a %target% environment variable i can use to determine which host has the mismatch.

    0