{"id":7221,"date":"2007-09-26T13:16:00","date_gmt":"2007-09-26T13:16:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2007\/09\/26\/howto-invoking-cmdlets-from-within-a-cmdlet\/"},"modified":"2019-02-18T13:16:30","modified_gmt":"2019-02-18T20:16:30","slug":"howto-invoking-cmdlets-from-within-a-cmdlet","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/howto-invoking-cmdlets-from-within-a-cmdlet\/","title":{"rendered":"Howto: Invoking cmdlets from within a cmdlet&#8230;"},"content":{"rendered":"<p>A fairly common question cmdlet developers have is &#8220;How do I invoke a cmdlet from within a cmdlet&#8221;. This usually comes up when converting a script or function into a compiled cmdlet. Marco Shaw is writing a nice series of blog posts covering this topic using the&nbsp;<a class=\"\" title=\"PowerGadgets\" href=\"http:\/\/www.powergadgets.com\/\">PowerGadgets<\/a> &nbsp;cmdlets as examples. Check it out at:<\/p>\n<p>&nbsp;<a href=\"http:\/\/marcoshaw.blogspot.com\/2007\/09\/howto-invoking-cmdlets-within-cmdlet.html\">http:\/\/marcoshaw.blogspot.com\/2007\/09\/howto-invoking-cmdlets-within-cmdlet.html<\/a><\/p>\n<p>(As an aside &#8211; we&#8217;re doing a bunch of stuff in V2&nbsp;that will make this scenario both easier and more effective. It&#8217;s pretty cool! We&#8217;ll be releasing the details on this and other V2 features in&nbsp;November at ITForum.)<\/p>\n<p>-bruce<\/p>\n<p class=\"MsoNormal\"><font face=\"Calibri\" size=\"3\">=========================================================<\/font><\/p>\n<p class=\"MsoNormal\"><font face=\"Calibri\" size=\"3\">Bruce Payette<\/font><\/p>\n<p class=\"MsoNormal\"><font face=\"Calibri\" size=\"3\">Principal Developer, Windows PowerShell Team<\/font><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A fairly common question cmdlet developers have is &#8220;How do I invoke a cmdlet from within a cmdlet&#8221;. This usually comes up when converting a script or function into a compiled cmdlet. Marco Shaw is writing a nice series of blog posts covering this topic using the&nbsp;PowerGadgets &nbsp;cmdlets as examples. Check it out at: &nbsp;http:\/\/marcoshaw.blogspot.com\/2007\/09\/howto-invoking-cmdlets-within-cmdlet.html [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[12,43],"class_list":["post-7221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-cmdlet","tag-sdk"],"acf":[],"blog_post_summary":"<p>A fairly common question cmdlet developers have is &#8220;How do I invoke a cmdlet from within a cmdlet&#8221;. This usually comes up when converting a script or function into a compiled cmdlet. Marco Shaw is writing a nice series of blog posts covering this topic using the&nbsp;PowerGadgets &nbsp;cmdlets as examples. Check it out at: &nbsp;http:\/\/marcoshaw.blogspot.com\/2007\/09\/howto-invoking-cmdlets-within-cmdlet.html [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/7221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=7221"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/7221\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=7221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=7221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=7221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}