Has anybody started working with the linux powershell cmdlets?

i don’t have a test environment available yet, but after reading the full announcment:

already have requests to start utilizing some of this functionality, namely user/group management on linux servers.

wondered if anyone had started utilizing them and were willing to share

So, do bear in mind that PowerShell on Linux is alpha, and isn’t suitable for production environments in any way. That also means it isn’t feature-complete. We don’t, for example, know the full range of functionality that’ll eventually be delivered, although we obviously do know that we’ll be able to create our own functionality. Given that Linux manages users and groups (and damn near everything else) in text files, its likely we can do something like what Microsoft did for Cron jobs - wrap a command around the text file to ease the management burden.

But it’s super early days.

And, I will point out that if you look at the Linux DSC stuff (which has been out for a while, and is distinct from PowerShell on Linux), it’s got about a half-dozen resources, including one for users. The resource just hits the configuration files directly, rather than running PowerShell.

yah the dsc stuff is where i saw actual cmdlets (and wow, not sure how i missed the dsc stuff in may concerning user mgmt)

i hadn’t seen anything published using those cmdlets yet.

so any examples of usage would still be appreciated.

Well… no, Linux DSC resources at present don’t use cmdlets, because when that was released, there was no PowerShell on Linux to run the cmdlets. Go to the GitHub repo for the Linux DSC - you can see the contents of the resources (which are not cmdlets). Linux calls them “providers,” which Windows almost did. See PowerShell-DSC-for-Linux/Providers at master · microsoft/PowerShell-DSC-for-Linux · GitHub.

Or specifically, PowerShell-DSC-for-Linux/Providers/nxUser at master · microsoft/PowerShell-DSC-for-Linux · GitHub for the nxUser provider. It’s straight C - not a PowerShell cmdlet. As for usage examples, the docs are at PowerShell-DSC-for-Linux/Docs at master · microsoft/PowerShell-DSC-for-Linux · GitHub.

But you’re not going to use the Linux DSC providers outside the context of DSC - you can’t. They aren’t standalone commands.