Automating the world one-liner at a time…
Hi,
The PowerShell team is planning on adding the following verbs to the standard PowerShell verbs' list. Please review and send us any feedback you might have:
Wassim [MSFT]
<Updated to correct PUSH/POP definitions and capitalize Search - jps>
I'd really appreciate feedback on this proposal to expand the standard verb set: [link] Thanks!
Looks good, but you should capitalize "search" ;-)
That said, is there going to be a place where people can go an publish Cmdlet names and code, i.e. Get-ScheduledTasks (as one example.)
It would be awesome to have a central clearing house for Cmdlet names and code and interfaces so users don't have to reinvent the wheel and also create so many incompatible implementations (can you say "Split-String?")
In fact I already use Invoke, Search and Show, though they are not standard. Pop-Location, Push-Location are already standard cmdlets. Other proposed verbs look useful, too.
While opinions may vary, I would really prefer to have "pop" remove from the top of a stack, and have "push" put something on top of a stack.
Call me crazy but I think Push and Pop are reversed in that table. Otherwise sound great.
Suggestions for some new verbs -
Something to complement creation (which is covered with 'New'), like 'Destroy' or 'Dispose'.
Also, how about verbs to support transactional operations?
1. To begin modification - 'Modify'
2. to commit the modifications - 'Save', 'Commit'
3. Optionally a 'Discard' or one mentioned above.
- 'Push' and 'Pop''s meaning are interchanged.
- The entry for search is not completely visible here.
Invoke is already present as Invoke-Item and Invoke-Expression
Good to see these verbs standardized. Are there plans to enforce correct use of verbs (or non-standard verbs output a warning)?
It seems as if Invoke should have an opposite, too, such as Cancel or something. If "Invoke-Procedure" starts a procedure running, then wouldn't "Cancel-Procedure" end it prematurely?
I like most of the new verbs especially Search. The ones I'm not sure about are Publish/Unpublish because I could see just using Add/Remove to do this.
These new verbs look fine. There really needs to be a way to speed this process. Maybe someone that's building a PowerShell centric web site can create a PowerShell thesaurus where the community can suggest verbs, find out what others are using etc. I was a week or two away from having to pick a verb like "wait". I'm glad I didn't ship a product that used "delay". Now, what about "reset" and "submit"?
Thank you all for your feedback.
According to Dictioary.com, the definitions of Push and Pop are the correct ones.
> It would be awesome to have a central clearing house for Cmdlet names
We concur. It will take us a while but we are working on something in this space. Things change so I dont' want to talk more until we have it.
>Modify/Save/Discard
We recommend not doing this pattern and using SET instead. There are all sorts of problems that you avoid by using a REST pattern.
> Are there plans to enforce correct use of verbs (or non-standard verbs output a warning)?
This topic deserves it's own blog entry. I'll try to do that soon.
> It seems as if Invoke should have an opposite, too, such as Cancel or something
As a general rule, if you can do something like that, you should be using STOP/START. There might be cases where it is fine to match an INVOKE with a STOP. We are looking at just such a situation so let me tell you about it to provide some insight into our thinking.
<THE REST IS ALL SUBJECT TO CHANGE>
As part of remoting, we looking at extending INVOKE-EXPRESSION with -COMPUTER which would then run the expression on the remote computer or computers. There will be times that the command takes a long time to finish (because the command is long or because you are invoking it on hundreds/thousands of machines). In those circumstances you don't want to wait until so we are thinking of adding -ASYNC. We then need a way of cancel this which of course lead us to think STOP. But stop is matched with START not INVOKE. I then realized that INVOKE -ASYNC could almost be thought of as the definition of START!
We haven't finished thinking about that but I thought it was interesting to share.
Cheers!
Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
The list above looks fine by the way :-)
But, can also the team fix the function a$ = Get-Content –Encoding Byte it is extremely slow, and it allocates 800MB or ram for each MB of content loaded :-)
Hi, Jeff.
Rather than invoke. Wouldn't Start (and Stop) be better and more generally useful?
Thanks.