Search code examples
tfsrelease-management

TFS Release Management Visual Studio 2013 - Permission Issue


I am attempting to do a deployment to the 'Program Files' directory on the target server, which is running the TFS deployment agent under an account with 'Administrator' privilege.

I am unable to perform any directory operations on 'Program Files'

Surely a deployment tool should be able to access program files?

Microsoft Release Management ManageWindowsIO PowerShell Script v12.0
Copyright (c) 2013 Microsoft. All rights reserved.

Executing with the following parameters:
  Action: Create
  Source file or folder name: c:\Program Files\xxx
  Destination file or folder name: 
  Read Only: 
  Archive: 
  System: 
  Hidden: 
  Owner Domain: 
  Owner Name: 
  Working Directory: (script path)

New-Item : Access to the path 'xxx' is denied.
At C:\Users\xxxxxxxxxxxxxx\AppData\Local\Temp\RM\T\RM\Create Folder\201507
141521278761159-39\ManageWindowsIO.ps1:165 char:17
+         New-Item <<<<  -ItemType directory -path $FileFolderName
    + CategoryInfo          : PermissionDenied: (C:\Program File... 
   xxx:String) [New-Item], UnauthorizedAccessException
    + FullyQualifiedErrorId : CreateDirectoryUnauthorizedAccessError,Microsoft 
   .PowerShell.Commands.NewItemCommand

Done with errors.

The folder could not be created. 

Exiting with error: 9999

Thanks


Solution

  • After you make changes to account permissions, make sure you restart the deployment agent service.