类的使用
com.tlcsdm.core.powershell.PowerShell
使用PowerShell的程序包
-
com.tlcsdm.core.powershell中PowerShell的使用
修饰符和类型方法说明PowerShell.configuration(Map<String, String> config) Allows to override jPowerShell configuration using a map of key/value
Default values are taken from file jpowershell.properties, which can be replaced just setting it on project classpathPowerShell.executeCommandAndChain(String command, PowerShellResponseHandler... response) Allows to chain command executions providing a more fluent API.private PowerShellstatic PowerShellPowerShell.openSession()Creates a session in PowerShell console an returns an instance which allows to execute commands in PowerShell context.
It uses the default PowerShell installation in the system.static PowerShellPowerShell.openSession(String customPowerShellExecutablePath) Creates a session in PowerShell console an returns an instance which allows to execute commands in PowerShell context.
This method allows to define a PowersShell executable path different from default