Skip to content

Instantly share code, notes, and snippets.

@dfch
Last active August 29, 2015 14:13
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 dfch/ebadcc8f03871826c613 to your computer and use it in GitHub Desktop.
Save dfch/ebadcc8f03871826c613 to your computer and use it in GitHub Desktop.
### Miscellaneous Test Scripts

d-fens Miscellaneous Test Scripts

d-fens GmbH General-Guisan-Strasse 6 CH-6300 Zug Switzerland

d-fens Miscellaneous Test Scripts
Copyright 2015 d-fens GmbH
This product includes software developed at
d-fens GmbH (http://d-fens.ch/)
d-fens GmbH
General-Guisan-Strasse 6
CH-6300 Zug
Switzerland
<#
$PSDefaultParameterValues.'Test-PSDefaultParametersForScripts.ps1:Param1' = 'SomeOtherParameter'
$PSDefaultParameterValues.'Test-PSDefaultParametersForScripts.ps1:Param2' = 15
The above will have no effect on the script parameters, as PSDefaultParameterValues only seems to work with Cmdlets and functions.
#>
PARAM
(
[string] $Param1 = 'tralala'
,
[int] $Param2 = 42
)
Write-Host ("Param1: '{0}'. Param2: '{1}'" -f $Param1, $Param2)
#
# Copyright 2014-2015 Ronald Rink, d-fens GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Requires -Module PSWorkflow
# The above statement does work with PowerShell 3.0 or 4.0
# see for usage / help
# PS > help about_requires
Write-Host "Hello, world!`r`n";
#
# Copyright 2014-2015 Ronald Rink, d-fens GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Requires -PSSnapin VMware.VimAutomation.Core
# The above statement does not work with PowerShell 3.0 or 4.0
# see for usage / help
# PS > help about_requires
Write-Host "Hello, world!`r`n";
#
# Copyright 2014-2015 Ronald Rink, d-fens GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Requires -PSSnapin Microsoft.PowerShell.Core
# The above statement does not work with PowerShell 3.0 or 4.0
# see for usage / help
# PS > help about_requires
Write-Host "Hello, world!`r`n";
#
# Copyright 2014-2015 Ronald Rink, d-fens GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Requires -PSSnapin WDeploySnapin3.0
# The above statement does not work with PowerShell 3.0 or 4.0
# see for usage / help
# PS > help about_requires
Write-Host "Hello, world!`r`n";
#
# Copyright 2014-2015 Ronald Rink, d-fens GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment