We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Mike,
Preparing for my first teaching a class how to script. I cant say enough how thankfull I am that you share your stuff with us. Please feel hugged.
The ForEach() Loop is not necessary on all Array Parameters but for those (main Parameter) who takes Pipeline Input, i think it is compulsory.
So i think that we MUST mention it in our teaching.
In your presentation file (see link below) you present the following Code on line 266 without the ForEach() Loop.
function Test-MrParameterValidation { [CmdletBinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName ) Write-Output $ComputerName } Test-MrParameterValidation
for a naive this Code looks fine to work, but it is not without the loop!
better is to mention it and present this Code during the whole presentation:
function Test-MrParameterValidation { [CmdletBinding()] param ( [Parameter(Mandatory)] [string[]]$ComputerName ) ForEach($Computer in $ComputerName) { Write-Output $Computer } } Test-MrParameterValidation
https://github.com/mikefrobbins/Presentations/blob/dev/Gulf%20Coast%20Code%20Camp%202017/PowerShell%20Toolmaking%20with%20Advanced%20Functions%20and%20Script%20Modules.ps1
cheers Peter
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi Mike,
Preparing for my first teaching a class how to script.
I cant say enough how thankfull I am that you share your stuff with us.
Please feel hugged.
The ForEach() Loop is not necessary on all Array Parameters but for those (main Parameter) who takes Pipeline Input, i think it is compulsory.
So i think that we MUST mention it in our teaching.
In your presentation file (see link below) you present the following Code on line 266 without the ForEach() Loop.
for a naive this Code looks fine to work, but it is not without the loop!
better is to mention it and present this Code during the whole presentation:
https://github.com/mikefrobbins/Presentations/blob/dev/Gulf%20Coast%20Code%20Camp%202017/PowerShell%20Toolmaking%20with%20Advanced%20Functions%20and%20Script%20Modules.ps1
cheers Peter
The text was updated successfully, but these errors were encountered: