Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Mod 5 Lab 1: Prepare PowerShell snippet for easy copy&paste without modification #57

@mkennten

Description

@mkennten

Module: 05

Lab: Configuring Agent Pools and Understanding Pipeline Styles

Exercise: 02 Task: 01

Step: 14

Description of issue

From the PowerShell snippet the string "PS C:> " should be removed so that it can be easily copied and pasted directly into a PowerShell prompt. In addition in the first line the current directory should be changed to the root of the drive so that the folder won't be created in the user's context.

Now:

PS C:\> mkdir agent ; cd agent
PS C:\agent> Add-Type -AssemblyName System.IO.Compression.FileSystem ;
[System.IO.Compression.ZipFile]::ExtractToDirectory("$HOME\Downloads\vsts-agent-win-x64-[AGENT_VERSION].zip", "$PWD")

Then:

cd \
mkdir agent ; cd agent
Add-Type -AssemblyName System.IO.Compression.FileSystem ;
[System.IO.Compression.ZipFile]::ExtractToDirectory("$HOME\Downloads\vsts-agent-win-x64-[AGENT_VERSION].zip", "$PWD")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions