powershell-provider

PowerShell custom provider RemoveItem

六眼飞鱼酱① 提交于 2019-12-10 11:08:29
问题 I'm implementing a custom PowerShell provider. I'm now working on the remove-item cmdlet implementation. The RemoveItem method has the following signature: protected override void RemoveItem(string path, bool recurse) When I type: Remove-Item .\Myobject -recurse the PowerShell infrastructure provides me with the value true in the recurse parameter of the RemoveItem method. However when I type: Remove-Item .\MyObject' I get a question: The item at MyObject has children and the Recurse

PowerShell custom provider RemoveItem

巧了我就是萌 提交于 2019-12-06 07:10:49
I'm implementing a custom PowerShell provider. I'm now working on the remove-item cmdlet implementation. The RemoveItem method has the following signature: protected override void RemoveItem(string path, bool recurse) When I type: Remove-Item .\Myobject -recurse the PowerShell infrastructure provides me with the value true in the recurse parameter of the RemoveItem method. However when I type: Remove-Item .\MyObject' I get a question: The item at MyObject has children and the Recurse parameter was not specified. If you continue, all children will be removed with the item. Are you sure you want