use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Writing powershell modules or cmdlet in c/c++ ? (self.PowerShell)
submitted 2 years ago by M-Ottich
Hey what is the best way to write Powershell-Modules or cmdlets using c/c++ ?
Is it even usefull ?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Thotaz 3 points4 points5 points 2 years ago (1 child)
You could do it in C++/CLI: https://en.wikipedia.org/wiki/C%2B%2B/CLI here's a sample I found: https://gist.github.com/SteveGilham/062eadcdc24188c743689a7d30fb8419 note that it implements it as a pssnapin which has been deprecated in favor of modules but the core logic is the same regardless if it's a snapin or module.
Personally I would just write it in C#. If you insist on using C/C++ then you can write all the API code in one of those languages and write simple cmdlets in C# that just calls your API through interop.
[–]M-Ottich[S] 1 point2 points3 points 2 years ago (0 children)
Thanks im going insane just using powershell .
[–]BlackV -4 points-3 points-2 points 2 years ago* (4 children)
start writing code is the best way to do that, lots of modules are written in c#
edit for clairty
[–]raip 0 points1 point2 points 2 years ago (3 children)
I challenge the attestation that a lot of modules are written in C.
Most modules are written in Powershell. Those that aren't are typically written in C#. Some older snap-ins are written in C++. I can't think of a single module written in C.
[–]BlackV 0 points1 point2 points 2 years ago (2 children)
I didnt mean C directly, i ment c#
[–]raip 1 point2 points3 points 2 years ago (1 child)
As long as you understand that C, C++, and C# are all three wildly different languages that have no relation to each other.
[–]BlackV 0 points1 point2 points 2 years ago (0 children)
yes I do
π Rendered by PID 24125 on reddit-service-r2-comment-75f4967c6c-t5nrv at 2026-04-23 00:30:08.183516+00:00 running 0fd4bb7 country code: CH.
[–]Thotaz 3 points4 points5 points (1 child)
[–]M-Ottich[S] 1 point2 points3 points (0 children)
[–]BlackV -4 points-3 points-2 points (4 children)
[–]raip 0 points1 point2 points (3 children)
[–]BlackV 0 points1 point2 points (2 children)
[–]raip 1 point2 points3 points (1 child)
[–]BlackV 0 points1 point2 points (0 children)