We are submitting our custom artifact windows-execute-powershell-script to the public repo for the following reasons:
Up to this point, we have been hosting it on our own private repo but would now like to share it with other teams.
Moving it to the public repo eliminates our need to maintain an access token for our labs to access the private repo.
Moving it to the public repo will also resolve throttling issues with Azure DevOps since the public repo is cached by DTL.
We are submitting this PR as part of a security effort to eliminate all access tokens and improve reliability across our systems.
The windows-execute-powershell-script artifact can be used to execute a PowerShell script with robust logging and other features. Just provide the required script path and optionally the arguments to pass it.
To aid in investigation scenarios, the artifact optionally supports uploading a transcript of the operation and select files to an Azure Artifacts Drop. Simply provide the logs drop service URL, name, and authentication details (access token or managed identity). You can optionally specify files you would like to "snapshot" and add to the logs drop at the time of artifact completion via the LogsDropFilesToInclude and LogsDropFilesToExclude parameters.
Validation
You can test this artifact via the following steps:
Create a file script.ps1 with the following content:
Description
We are submitting our custom artifact
windows-execute-powershell-script
to the public repo for the following reasons:We are submitting this PR as part of a security effort to eliminate all access tokens and improve reliability across our systems.
The
windows-execute-powershell-script
artifact can be used to execute a PowerShell script with robust logging and other features. Just provide the required script path and optionally the arguments to pass it.To aid in investigation scenarios, the artifact optionally supports uploading a transcript of the operation and select files to an Azure Artifacts Drop. Simply provide the logs drop service URL, name, and authentication details (access token or managed identity). You can optionally specify files you would like to "snapshot" and add to the logs drop at the time of artifact completion via the
LogsDropFilesToInclude
andLogsDropFilesToExclude
parameters.Validation
You can test this artifact via the following steps:
script.ps1
with the following content:<path to script.ps1
with the path to the script you created in the previous step.%SystemDrive%\DevTestLabs\Artifacts\Logs
, open up the latest.log
file, and confirm it looks something like this:Successful Result
Following is a screenshot of the artifact logs of a successful execution of this artifact: