d-fens GmbH General-Guisan-Strasse 6 CH-6300 Zug Switzerland
Last active
August 29, 2015 14:13
-
-
Save dfch/ebadcc8f03871826c613 to your computer and use it in GitHub Desktop.
### Miscellaneous Test Scripts
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
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 |
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
<# | |
$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. | |
# |
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
#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. | |
# |
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
#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. | |
# |
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
#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. | |
# |
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
#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