mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[macOS] Improve select datastore script (#1892)
* modify script to set tages * add vmname * nitpicks * add remove tag
This commit is contained in:
@@ -48,6 +48,13 @@ Import-Module $PSScriptRoot\helpers.psm1 -DisableNameChecking
|
||||
# Connection to a vCenter Server system
|
||||
Connect-VCServer
|
||||
|
||||
# Clear previously assigned tag with VM Name
|
||||
try {
|
||||
Remove-Tag $VMName -Confirm:$false
|
||||
} catch {
|
||||
Write-Host "Tag with $VMName doesn't exist"
|
||||
}
|
||||
|
||||
$vm = Get-VM $VMName
|
||||
|
||||
if ($env:AGENT_JOBSTATUS -eq 'Failed') {
|
||||
|
||||
Reference in New Issue
Block a user