In python you can do something like:
if __name__ == '__main__':
# stuff
Is there any way in PS to achieve this functionality? I want to separate ps files that only have cmdlets inside them from the ones that are actually runnable and do stuff.