需要将此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)