Skip to content

Instantly share code, notes, and snippets.

@corbob
Created April 27, 2018 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corbob/00e3d00f6343a5a95a1d547d7a65991f to your computer and use it in GitHub Desktop.
Save corbob/00e3d00f6343a5a95a1d547d7a65991f to your computer and use it in GitHub Desktop.
[CmdletBinding()]
param
(
[Parameter(Mandatory = $True,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True)]
[string[]]$AssetTag
)
BEGIN {
$count = 0
$AssetTagCount = $AssetTag.Count
}
PROCESS {
foreach ($asset in $AssetTag) {
$count++
Write-Progress -Activity "Recycling Assets" -Status "Recycling $asset ($count/$AssetTagCount)" -PercentComplete (($count / $AssetTag.Count) * 100)
start-sleep -Milliseconds 1500
}
}
END {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment