# Running WindowsProcess

**URL:** <https://forums.powershell.org/t/running-windowsprocess/3671>\
**Category:** DSC\
**Created:** [January 26, 2015, 7:46pm UTC](https://forums.powershell.org/t/running-windowsprocess/3671 "2015-01-26T19:46:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravinda-cat](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@aravinda-cat](https://forums.powershell.org/u/aravinda-cat)\
**Post date:** [January 26, 2015, 7:46pm UTC](https://forums.powershell.org/t/running-windowsprocess/3671/1 "2015-01-26T19:46:44Z")

</div>

Hi All,

I am working on converting a powershell script to DSC Configuration to run a process.

Script :

[b]$si = new-object System.Diagnostics.ProcessStartInfo  
$si.fileName = “C:\Windows\System32\wevtutil.exe”  
$si.Arguments= ’ sl Microsoft-IIS-Configuration/Operational /e:true’  
$si.windowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden

```
$process = [System.Diagnostics.Process]::Start[$si][/b]

```

DSC Configuration block :

WindowsProcess wevutilprocess  
{  
Ensure = “Present”  
Path = “C:\Windows\System32\wevtutil.exe”  
Arguments = ’ sl Microsoft-IIS-Configuration/Operational /e:true’  
StandardErrorPath = “C:\log.txt”  
}

Below is the Error I am getting :

PowerShell provider MSFT\_ProcessResource failed to execute Set-TargetResource functionality with error message: Failure starting process matching path  
‘C:\Windows\System32\wevtutil.exe’. Message: “Failed to wait for processes to start”.  
+ CategoryInfo : InvalidOperation: (🙂 , CimException  
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure  
+ PSComputerName : localhost

Please post your thoughts.

Thanks,  
Aravinda

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [January 27, 2015, 11:53pm UTC](https://forums.powershell.org/t/running-windowsprocess/3671/2 "2015-01-27T23:53:34Z")

</div>

That means it was unable to find the executable at the path you specified, or the process did not start in time, or did not start at all.

It’s possible that the process you are trying to start doesn’t like being run with no security context, which is how DSC configurations run.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:17pm UTC](https://forums.powershell.org/t/running-windowsprocess/3671/3 "2024-05-16T21:17:24Z")

</div>


