Created
April 24, 2018 10:05
-
-
Save shaneis/f2fa66ccdc1863b90ccb61b6a2c319fc to your computer and use it in GitHub Desktop.
Using the ampersand to "call" the scriptblock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ($i = 0; $i -lt 10; $i++) { | |
[PSCustomObject]@{ | |
Date = Get-Date | |
ScriptBlock = 'Actual Scriptblock' | |
DateDescription = & $Script | |
} | |
Start-Sleep -Seconds 6 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment