Pipeline and Parameter by halr9000 27 months ago (modification of post by halr9000 view diff)
diff | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1428"></script>download | new post
sample by r_keith_hill
- param(
- [Parameter(ValueFromPipeline=$true, Mandatory=$true, Position=0)]
- [string[]]
- $ComputerName
- )
- Process {
- foreach ($cn in $ComputerName) {
- Write-Host "Processing $cn"
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository