Question: How can I call `DisableEventFiring` using PowerShell?

C# code like this :

```
Type typeInfo = typeof(SPEventReceiverBase); 
MethodInfo disable = typeInfo.GetMethod("DisableEventFiring", BindingFlags.Instance | BindingFlags.NonPublic);
SPEventReceiverBase receiver = new SPEventReceiverBase();
 disable.Invoke(receiver, null);

```

I need do something like this using PS

Answer: 
You Shouldn't.

DisableEventFiring is only meant to be used inside EventReceivers. The main purpose is to prevent looping when they update items.

If you really REALLY want then it's almost identical to you c# code:

```
$receiver = New-Object "Microsoft.SharePoint.SPEventReceiverBase"
$type = $receiver.GetType()
[System.Reflection.BindingFlags]$flags = [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic
$method = $type.GetMethod("DisableEventFiring", $flags)
$method.Invoke($receiver, $null)

```
You can call this function only from inside an event receiver but not via powershell.

If you want to prevent a event receiver from being fired, you can use a power shell script to remove it. <http://blogs.msdn.com/b/sharepoint_bar__grill/archive/2011/12/12/10151733.aspx>

Another option is to SharePoint Manager 2010 to remove the Event receiver. <http://spm.codeplex.com>