Search code examples
azure-devopswindows-services

How to deploy windows service to onprem vm from azure devops server?


Im new to devops , and im trying to deploy windows service to on premises vm,

I have added Copy file from task and setup all the user name/ password/ source/ destination and all the required settings.

but error

[error]Failed to Create PSDrive with Destination: '\my_server\D$\TestCI', ErrorMessage: 'The network path was not found'

fails the release.

can you help on this?


Solution

  • Since you work on the Azure Devops Server,you should be using self-hosted agents.

    ErrorMessage: 'The network path was not found'

    The casue of this issue could be that the Self-hosted agent and the Target windows machine are not in the same Windows Domain.

    To solve this issue, you could try to create a new self-hosted agent under the same windows domain (the machine which in the same local network), then grant the permissions for the build agent service account to access another local PC.

    Here is the ticket with the similar issue, you could refer to it.