小编Sir*_*lot的帖子

在C#中集成Powershell

需要将此PowerShell脚本集成到我的C#汇编代码中.不知道怎么做.如果需要任何其他信息,请不要犹豫.提前致谢.

PowerShell脚本:

#Script that does the linking and renaming:

# Creates a variable called IncidentID and points Incident # to it for use within the script
Param(
[string]$IncidentID
)

# Load the SMlets module
Import-Module SMlets 

# Get the Incident Class
$IncClass = Get-SCSMClass -Name System.WorkItem.Incident$

# Get the RMA Class
$RMAClass = Get-SCSMClass -Name COMPANY.RMA.Class

# Build the Filter String
$FilterStr = "ID -eq " + $IncidentID

# Find the Incident we need to link to an RMA
$Inc …
Run Code Online (Sandbox Code Playgroud)

c# powershell scripting visual-studio-2013

2
推荐指数
1
解决办法
1554
查看次数

标签 统计

c# ×1

powershell ×1

scripting ×1

visual-studio-2013 ×1