Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Devbox/devbox.yaml → DevBoxConfig1/Devbox/devbox.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: sample
name: powershell-customization-test
image: microsoftwindowsdesktop_windows-ent-cpc_win11-22h2-ent-cpc-m365@1.0.0
hostInformation: general_a_8c32gb256ssd_v1
supportsHibernation: false
setupTasks:
- task: write-to-file
- task: powershell
inputs:
script: echo "Testing Powershell Task" >> C:\\powershell-test.txt
- task: powershell
inputs:
script: calc
- task: install-by-uri
inputs:
uri: 'https://community.chocolatey.org/install.ps1'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param(
[Parameter()]
[string]$Package
)
param(
[Parameter()]
[string]$Package
)

choco install $Package -y
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: choco
command: "./choco.ps1 -Package parameters('package')"
inputs:
package:
type: "string"
defaultValue: ""
name: choco
command: "./choco.ps1 -Package parameters('package')"
inputs:
package:
type: "string"
defaultValue: ""
required: true
6 changes: 6 additions & 0 deletions DevBoxConfig1/Powershell/Powershell.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
param(
[Parameter()]
[string]$powershell
)

$powershell
7 changes: 7 additions & 0 deletions DevBoxConfig1/Powershell/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: powershell
command: "powershell {{script}}"
inputs:
script:
type: string
defaultValue: ""
required: true
File renamed without changes.
13 changes: 13 additions & 0 deletions DevBoxTestConfig/DevBox/devbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: devbox-customization
image: microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win11-m365-gen2@1.0.0
hostInformation: general_a_8c32gb256ssd_v1
supportsHibernation: false
setupTasks:
- task: choco
inputs:
packages: git.install, nodejs
- task: write-text
inputs:
boolParam: false
stringParam: hello devbox
arrayParam: 1, 2, 3
1 change: 1 addition & 0 deletions DevBoxTestConfig/InstallChocolatey/install-chocolatey.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
2 changes: 2 additions & 0 deletions DevBoxTestConfig/InstallChocolatey/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: install-chocolatey
command: "./install-chocolatey.ps1"
18 changes: 18 additions & 0 deletions DevBoxTestConfig/WriteText/Write-Text.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
param(
[Parameter()]
[double]$DoubleParam,

[Parameter()]
[string]$StringParam,

[Parameter()]
[bool]$BoolParam,

[Parameter()]
[array]$ArrayParam
)

Write-Output "DoubleParam value is $DoubleParam"
Write-Output "StringParam value is $StringParam"
Write-Output "BoolParam value is $BoolParam"
Write-Output "ArrayParam value is $ArrayParam"
23 changes: 23 additions & 0 deletions DevBoxTestConfig/WriteText/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: write-text
command: .\Write-Text.ps1 -DoubleParam parameters('doubleParam') -BoolParam parameters('boolParam') -StringParam parameters('stringParam') -ArrayParam parameters('arrayParam') > C:\\result.txt
inputs:
stringParam:
type: string
defaultValue: some value
required: false
boolParam:
type: bool
defaultValue: $True
required: false
intParam:
type: int
defaultValue: 33
required: false
doubleParam:
type: double
defaultValue: 33.12
required: false
arrayParam:
type: array
defaultValue: 2, 3, 4
required: false
6 changes: 6 additions & 0 deletions DevBoxTestConfig/choco/choco.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
param(
[Parameter()]
[string]$Package
)

choco install $Package -y
7 changes: 7 additions & 0 deletions DevBoxTestConfig/choco/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: choco
command: "./choco.ps1 -Package parameters('package')"
inputs:
package:
defaultValue: ""
type: "string"
required: true
7 changes: 0 additions & 7 deletions Powershell/task.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions TestWriteToFile/testfolder/task.yaml

This file was deleted.

1 change: 0 additions & 1 deletion TestWriteToFile/testfolder/test.ps1

This file was deleted.