Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores

r/PowerShell

members
online


Modules getting too long Modules getting too long

I'm not super new to powershell but I am to making my own modules and I'm trying to follow Microsofts recommendation which I understand is to create a module for groups of cmdlets that perform similar tasks. So for example I created one called MACs which has all my functions for moves, adds, and changes that are commonly done at my company.

Here's the problem: some of these functions are a couple hundred lines themselves (e.g. on & offboarding), so with the whole module put together it's well over a thousand lines, which makes it little bit of a pain to scroll through when I need to make just a quick edit to one function. Of course I know I can ctrl F but it just feels not ideal to have such a giant block of code in one file.

Is there a better way that I'm missing?


See why more IT pros are moving to Atera—the all-in-one, AI-powered IT management platform built for pros.

Start your free 30-day trial now!

See why more IT pros are moving to Atera—the all-in-one, AI-powered IT management platform built for pros.


Powershell career advice Powershell career advice

I am a 2023 grad from India working in a bank during my internship in the same bank I was in a development team the work was good development deployment but few months back due to some changes I am now in operations team there isn’t any development work. Manager is cooperative but all he has is powershell scripting SCCM end point management. Everyone in the team have 10-20+ YOE and all related to powershell. I am not aligned towards any tech stack but it kinds scars me because haven’t heard of powershell much. And every developer i came across had bad reviews about it like it is old and no future scope and it scares me for my career.

Currently assigned a project related to SCD baselines if anyone have heard of it might be banks specific as there isn’t much about it online. It scares me if I stay here for more than a year I might have limited or no opportunities.

Edited : my colleague doesn’t have any knowledge about web dev or development related stuff

Can anyone suggest that powershell have career scope or not?