腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(7809)
视频
沙龙
1
回答
如何通过vbscript将字符串
数组
传
递给
powershell
?
powershell
、
vbscript
我试图通过vbscript将一个字符串
数组
传
递给
powershell
。我得到了
file
.ps1脚本中的params: [string[]]$target我试图通过vbscript调用
file
.ps1。我想让$target = @('c:\dev','d:\lib')被
传
进来。-noexit -ExecutionPolicy Unrestricted -
file
.\
file
.ps1
浏览 4
提问于2021-02-05
得票数 1
回答已采纳
1
回答
将
数组
传
递给
使用
PowerShell
参数
执行的-
File
脚本
arrays
、
powershell
、
parameters
我有一个简单的脚本,它接受
数组
参数
: [Parameter(Mandatory=$true)]) }
powershell
.exe -
File
Untitled2.ps1-keys a
如何将
参数
浏览 0
提问于2014-11-27
得票数 9
回答已采纳
2
回答
如何将
数组
参数
传
递给
powershell
-
file
?
powershell
、
command-line
我有以下
powershell
脚本: [Int32[]] $SomeInts = $null, [String但是,如果我在一个单独的
powershell
实例中运行它,比如这个
powershell
-
file
.\ParameterTest.ps1 (1..10),我不会得到预期的结果。在这种情况下,我会得到以下结果:Login : 2我的问题
浏览 0
提问于2011-10-07
得票数 4
回答已采纳
1
回答
将
参数
从
数组
传递到
powershell
java程序
java
、
arrays
、
powershell
我有一段执行
powershell
的java代码,script.My的
参数
在我从用户那里得到的字符串
数组
中。String sentence = clientinp.readUTF();我应该如何在每次执行代码时将
参数
放到脚本中我试过这段代码: String command = "
powershell
.exe $Add-DnsServerResourceRecordA -Zon
浏览 2
提问于2016-11-21
得票数 0
3
回答
如何将
参数
数组
传
递给
Powershell
命令行
powershell
、
powershell-2.0
我试图将
参数
数组
传
递给
powershell
脚本文件。 但它并没有像看上去的那样。我遗漏了什么?如何传递
参数
数组
?
浏览 7
提问于2012-11-07
得票数 23
2
回答
在python中,
如何将
数组
参数
传
递给
powershell
脚本
python
、
powershell
我有一个
PowerShell
脚本,它有两个
参数
,第一个是字符串,第二个是字符串
数组
。subprocess.run(['
powershell
.exe', 'script.ps1', 'arg1', '@("st
浏览 5
提问于2019-11-15
得票数 2
2
回答
如何通过
Powershell
将复杂
参数
传
递给
ADF
powershell
、
azure-data-factory
This answer帮助我完成了我需要做的事情,但我需要传
递给
我的Azure Data Factory管道的
参数
之一是一个
数组
。在UI中,我只需在“默认
参数
”栏中输入"x","y","z“,但我不确定
如何将
其语法转换为
Powershell
。
如何将
非原语
参数
传
递给
我的管道? 提前谢谢你。
浏览 47
提问于2020-01-10
得票数 0
回答已采纳
1
回答
Powershell
-将
数组
作为
参数
传
递给
从命令行调用的可执行文件
powershell
、
arguments
、
pipeline
想知道
如何将
数组
作为命令行
参数
传
递给
powershell
中的exe文件吗?这是我目前正在做的事情$firstParam = "test1" $thirdParam =\SomeApp.exe' "$firstParam" "$secondParam" "$thirdParam&quo
浏览 0
提问于2012-10-18
得票数 0
回答已采纳
1
回答
如何从ansible剧本中传递
参数
数组
到蔚蓝扩展?
azure
、
powershell
、
ansible
我正在尝试将"string“类型的
数组
参数
从ansible剧本传递到
powershell
脚本,该脚本需要运行,因为vm扩展对运行在蔚蓝cloud.Below中的VM是ansible剧本代码。{"fileUris": ["{{ var_powershellscriptUrl }}"]}' protected_settings: '{"commandToExecute": "[
powershell
-Executio
浏览 1
提问于2019-11-02
得票数 0
回答已采纳
2
回答
从Python调用时将
参数
传
递给
PowerShell
脚本
python
、
function
、
powershell
、
parameter-passing
在python中,我想调用一个
powershell
脚本并向其传递一个
参数
Function Invoke-Neo4j [cmdletBinding(SupportsShouldProcess[Parameter(Mandatory=$false,ValueFromPipeline=$false,Position=0)] )
如何将
参数
$Command = 'start‘从py
浏览 1
提问于2016-06-23
得票数 0
1
回答
powershell
的Jenkins
参数
powershell
、
jenkins
如何将
jenkins字符串
参数
传
递给
power shell脚本的param值? 我必须将源路径url传
递给
powershell
脚本的param值。给出源路径作为jenkins中的字符串
参数
。我想知道
如何将
jenkins
参数
值传递到
powershell
脚本的param值中。
浏览 77
提问于2019-05-10
得票数 15
回答已采纳
1
回答
如何在
Powershell
中添加带有
参数
的文件中的文本
powershell
我正在尝试将作为
powershell
中的
参数
传递的文本添加到配置文件中。下面是代码的示例。我期望下面的命令将读取配置文件&搜索parameter1 &当它找到
参数
时,它将在"=“之后添加值(作为
参数
传递)因此,应该是这样的输出: Parameter1 = hostname 当执行以下命令时:
pow
浏览 3
提问于2018-03-23
得票数 1
回答已采纳
1
回答
将相同类型的命令行
参数
读入
Powershell
中的
数组
/哈希
arrays
、
powershell
、
hash
、
command-line-arguments
如何将
Powershell
中的命令行
参数
读入
数组
?有点像然后我有一个
数组
哈希也有类似的问题。谢谢。
浏览 2
提问于2013-10-04
得票数 1
回答已采纳
1
回答
为什么我的脚本在从命令行运行时工作,而不是在Java代码中运行呢?
java
、
powershell
、
command-line
、
process
当我运行
powershell
中的命令“
powershell
.exe -ExecutionPolicy -
file
'C:\Users\xxxyyy\Downloads\test_script.ps1‘-d’C:\Users\xxxyyy\下载‘-f 'TestFile'”时,我尝试用Java代码运行的这个
powershell
脚本工作。下面是Java测试类和
powershell
脚本的代码。} public void runCommand() throws IOExce
浏览 3
提问于2022-11-08
得票数 -1
回答已采纳
1
回答
如何通过命令行或计划任务将
数组
参数
传
递给
powershell
脚本?
powershell
、
cmd
、
parameters
、
parameter-passing
、
scheduled-tasks
我编写了一个接受字符串
数组
参数
的
PowerShell
脚本。命令行调用脚本时,我可以使用以下语法轻松地将多个字符串传
递给
此
参数
: .@(...)语法不起作用,传递用逗号分隔的字符串也不起作用,将
数组
放在括号中也不起作用,无论我如何用单引号、双引号、甚至多个单引号或双引号转义
参数
,甚至整个脚本调用,它都不起作用。Bypass -
File
"C:\Script\Script.ps1" -TemplateNames ...如何在计划任务中或
浏览 67
提问于2021-01-28
得票数 0
回答已采纳
1
回答
从C#将
参数
传
递给
powershell
脚本
c#
、
powershell
、
c#-4.0
、
powershell-3.0
、
powershell-4.0
我试图将字符串列表作为
参数
传
递给
powershell
脚本。该列表可能包含任意数量的
参数
,每次都会发生变化。
如何将
此列表作为一个
参数
从C#传
递给
powershell
脚本?
浏览 5
提问于2015-04-02
得票数 0
回答已采纳
3
回答
将哈希表作为
参数
传
递给
powershell
.exe
powershell
、
hashtable
如何将
哈希表作为
参数
传
递给
powershell
.exe?Param() 呼叫:
powershell
.exe -
File
.A
浏览 5
提问于2022-08-30
得票数 4
1
回答
将Python变量传
递给
Powershell
脚本
python
、
powershell
、
scripting
、
subprocess
我希望在不使用
参数
的情况下将Python脚本中的变量传递到
Powershell
脚本的变量中。C:\\Users\\user\\Desktop\\Code\\Creation\\var_pass_test.ps1' stdout=sys.stdout)Write-Host $test1 如何才能这样
浏览 6
提问于2021-05-25
得票数 2
1
回答
将
数组
项传
递给
PowerShell
中的函数
arrays
、
function
、
powershell
我已经阅读了许多关于
PowerShell
函数的文章,并将
参数
传
递给
它们,但是我还没有找到
如何将
特定
数组
项传
递给
函数而不是完整
数组
的解决方案。@("one", "two", "three") { $message | Out-
File
$log -Append现在,我想将<em
浏览 4
提问于2013-12-05
得票数 2
回答已采纳
3
回答
如何将
文件列表作为
参数
传
递给
powershell
脚本
powershell
如何将
文件列表作为
参数
传
递给
Powershell
脚本?() 当我尝试运行它时它打印出来但是我希望会有类似的东西
file
2.datfileN.dat
浏览 0
提问于2013-05-29
得票数 5
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
即时通信 IM
活动推荐
运营活动
广告
关闭
领券