Background Service is not running

1

I am referring to the script in this thread: https://support.adminarsenal.com/hc/en-us/community/posts/220479147-Remote-deployment-Background-service-not-running?input_string=Background%20Service%20is%20not%20running

Which says:

$secpasswd = ConvertTo-SecureString "DOMAIN_ADMIN_PASSWORD" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ("DOMAIN\DOMAIN_ADMIN",$secpasswd)
$remotecomputer = Get-Content env:computername

Invoke-Command -ComputerName SERVER_RUNNING_PDQ_DEPLOY -Credential $creds -ScriptBlock { param($name) & 'C:\Program Files (x86)\Admin Arsenal\PDQ Deploy\PDQDeploy.exe' Deploy -Package 'PDQ_DEPLOY_PACKAGE_NAME' -Target $name } -ArgumentList $remotecomputer

 

However when I run this I get this error:

Cancel
login to comment
1
$remotecomputer = Get-Content env:computername

That's going to vomit red text all over a prompt. 

  1.  You can't Get-Content that variable
  2.  it's $env:computername, not env:computername

 

In order for this to work, you have to do a couple of things. 

  1.  You need to make sure the account you are using for the Creds of the Invoke-Command are listed in the Console Users section of preferences
  2. Use TCP not named Pipes
  • Location: HKEY_LOCAL_MACHINE\SOFTWARE\Admin Arsenal\PDQ Deploy
  • Value: ServicePort (DWORD value)
  • It can be any port you want

Finally, the code should look like this:

Invoke-Command -ComputerName <pdq server> -Credential $creds -ScriptBlock{ pdqdeploy.exe Deploy -Package <package name> -Targets $args[0] } -ArgumentList $RemoteComputer

 

Cancel
login to comment

0

Restart your background Service.

Cancel
login to comment

0

Thanks you Stephen.. and I found the video too. 

Cancel
login to comment

0

HA GOT IT!!

Cancel
login to comment

0

Restart your background Service. That should fix that issue.

Cancel
login to comment

0

Adding the port caused PDQ to not open. Is there a value I need to stay between?

I remember them saying something about the service port in a video, but I can't find that video to save me

Cancel
login to comment

Reply