用于破坏资源的Powershell动词 [英] Powershell verb for destroying a resource

查看:131
本文介绍了用于破坏资源的Powershell动词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图坚持命名我的cmdlet时批准的Powershell动词列表.我有一个创建资源的函数,所以它称为New-ClearCaseView.我还想创建一个函数,一旦不再使用该资源就将其销毁.但是,我看不到New有任何成对动词.我认为,Remove动词最接近,但这是从集合中删除资源,而不是实际破坏资源.

I've been trying to stick with the approved list of Powershell verbs when naming my cmdlets. I have a function which creates a resource, so it's called New-ClearCaseView. I'd also like to make a function which destroys this resource once it is no longer in use. However, I don't see any pair verb to go with New. The Remove verb is closest I think, but that's for removing a resource from a collection, not for actually destroying a resource.

有什么建议吗?是否还有其他最新的Powershell动词列表?

Any suggestions? Is there any more up to date list of accepted Powershell verbs?

谢谢!

推荐答案

删除是通常使用的动词(例如delRemove-Item的别名).

Remove would be the normal verb to use (eg. del is an alias for Remove-Item).

取消发布可能是另一种可能性(但仅当您在 publish 之类的意义上使用了您的 new 时).同样是 Unregister (通常与 register 配对).

Unpublish might be another possibility (but only if your new is being used in a sense like publish). Equally Unregister (normally paired with register).

这篇关于用于破坏资源的Powershell动词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆