0
A
回答
0
尝试:
Run, PowerShell "new-item -path c:\ -name logfiles -itemtype"
似乎为我工作。
编辑根据新提供的信息:
命令发现@http://exchangeserverpro.com/install-exchange-2013-pre-requisites-windows-server-2012/
尝试:
Run, PowerShell "Install-WindowsFeature AS-HTTP-Activation
, Desktop-Experience
, NET-Framework-45-Features
, RPC-over-HTTP-proxy
, RSAT-Clustering
, Web-Mgmt-Console
, WAS-Process-Model
, Web-Asp-Net45
, Web-Basic-Auth
, Web-Client-Auth
, Web-Digest-Auth
, Web-Dir-Browsing
, Web-Dyn-Compression
, Web-Http-Errors
, Web-Http-Logging
, Web-Http-Redirect
, Web-Http-Tracing
, Web-ISAPI-Ext
, Web-ISAPI-Filter
, Web-Lgcy-Mgmt-Console
, Web-Metabase
, Web-Mgmt-Console
, Web-Mgmt-Service
, Web-Net-Ext45
, Web-Request-Monitor
, Web-Server
, Web-Stat-Compression
, Web-Static-Content
, Web-Windows-Auth
, Web-WMI
, Windows-Identity-Foundation"
0
+0
@Chad ..我提供的命令只是一个例子。其实我想从下面的文章中运行'Add-Windowsfeature'命令:http://exchangeserverpro.com/install-exchange-2013-pre-requisites-windows-server-2012/我无法运行它,因为一个说VARIABLE NAME太长的错误。请建议。 – samisda1
1
如果你想运行从AHK PowerShell脚本,它包含几行,你不想要使用外部文件,这是一个例子,如何做到这一点:
的AutoHotkey代码:
psScript =
(
param($param1, $param2)
new-item -path $param1 -name logfiles -itemtype directory
new-item -path $param2 -name logfiles -itemtype directory
remove-item -path 'c:\temp'
# etc, write any code, use this quotes for strings: '
# if you need ", then write: \":
$import = '[DllImport(\"ntdll.dll\")] public static extern int RtlAdjustPrivilege(ulong a, bool b, bool c, ref bool d);'
)
param1 = C:\temp
param2 = D:\temp
RunWait PowerShell.exe -Command &{%psScript%} '%param1%' '%param2%',, hide
; use this call if you want to see powershell output
Run PowerShell.exe -NoExit -Command &{%psScript%} '%param1%' '%param2%'
相关问题
- 1. AutoHotKey脚本SendInput
- 2. AutoHotkey循环脚本
- 3. Autohotkey执行脚本
- 4. Stardew Valley autohotkey脚本
- 5. AutoHotkey脚本错误
- 6. 蝙蝠脚本停止工作,如果通过AutoHotkey启动
- 7. AutoHotKey脚本停止工作
- 8. AutoHotKey脚本不工作
- 9. 通过脚本
- 10. 通过脚本
- 11. 通过脚本
- 12. 通过PHP脚本
- 13. 通过PowerShell脚本
- 14. 通过Groovy脚本
- 15. 通过shell脚本
- 16. 通过Linux的bash脚本
- 17. Java脚本的通过ID
- 18. 如何在AutoHotKey脚本中使用'或'?
- 19. AutoHotKey Basic脚本退出游戏
- 20. AutoHotKey脚本不适用于Hudson
- 21. 等高通过脚本
- 22. 逐步通过greasemonkey脚本
- 23. 如何通过硒脚本
- 24. 通过批处理脚本
- 25. 如何通过脚本
- 26. 通过SMO编写脚本
- 27. 如何通过脚本
- 28. 通过CGI执行脚本
- 29. 通过PHP执行脚本
- 30. 通过脚本创建cronjob
你提供的那个也适用于我。但是,当我使用'Add-Windowsfeature'命令而不是该示例中的命令时,出现一个错误,指出VARIABLE NAME TOO LONG太长。任何建议请。 – samisda1
我编辑了包含Add-Windowsfeature代码的代码,但是如果它正在工作还没有报告回来? – errorseven
运行后出现同样的错误。你能想到的其他方式吗?非常感谢。 – samisda1