如何传递一个将在Powershell脚本中更新键值的变量 [英] how to pass a variable which will update key value in Powershell script
问题描述
我有几个Powershell脚本,它是用于上传azure包。目前,这些脚本都是使用包裹位置进行硬编码的。
位置就像\\ ... \ ... \adb_201340995.21 \..\ ... cspkg
现在我们要创建一个脚本这将更新"adb_201340995.21"在我的所有powershell脚本中,我将在执行脚本时手动提供参数。
我是一个非常新的脚本并试图学习它,所以任何帮助都会有用。
'Param'是你如何将参数传递给脚本
请参阅:help about_scripts
http:// technet.microsoft.com/en-us/magazine/jj554301.aspx
Hi,
I have several Powershell script which is used for uploading azure package. Currently those scripts are hardcoded with package location from where it will take the package.
The location is like \\...\...\adb_201340995.21\..\...cspkg
Now we want to create a script which will update "adb_201340995.21" in all my powershell scripts with a parameter which i will manually provide during executing the script.
I am very new to scripting and trying to learn it, so any help will be usefull.
'Param' is how you pass parameters to scripts
See: help about_scripts
这篇关于如何传递一个将在Powershell脚本中更新键值的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!