I'm not sure how to structure a larger PowerShell script that uses classes, and I cannot find anything. I have five classes in one file. How do I call them without a main class? Is it proper to create a standalone script that simply instantiates the other classes and calls them?
In PowerShell, most everything I see is based on functions, not classes. And, PowerShell OOP and OOD it isn't exactly like designing OOP in the C# or Java sense. There is a lot the same concepts, but the structure is eluding me. It isn't enough to have keywords and classes, if I cannot design with them in a comprehensive way.
What search am I missing, they keywords? How should I structure my script? I have a lot of PowerShell classes already that I'd like to put into Production. Now what?
I've searched, and I've looked on SO and Github, but do not know what's "right."
My particular case is using v5, but other times I have access to v7, if that matters. I have, for example:
class A
{
}
class B
{
}
class C
{
}
There's no Main
to start things off in PowerShell.