Beginner Question :-)

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
treierp
Posts: 7
Joined: Tue Aug 28, 2018 11:42 pm

Re: Beginner Question :-)

Post by treierp » Thu Aug 30, 2018 1:23 am

OK! Thank you for this!

Are there good tutorials available to get deeper in to Powershell - there is a lot arround on Youtube but I can't find good basics :-/

thank you for your time!

Peter

treierp
Posts: 7
Joined: Tue Aug 28, 2018 11:42 pm

Re: Beginner Question :-)

Post by treierp » Thu Aug 30, 2018 1:27 am

And one more question...
What would be the best way (Project Type) to have all this PS Scripts togehter in one compiled executable (if possible)

Peter

User avatar
jvierra
Posts: 13718
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Beginner Question :-)

Post by jvierra » Thu Aug 30, 2018 1:31 am

The most comprehensive basic tutorial is here: https://mva.microsoft.com/en-us/trainin ... shell-8276

It is about 5 hours and should be done carefully one section at a time. Don't move on until you are sure you understand the current lesson.

User avatar
jvierra
Posts: 13718
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Beginner Question :-)

Post by jvierra » Thu Aug 30, 2018 1:36 am

treierp wrote:
Thu Aug 30, 2018 1:27 am
And one more question...
What would be the best way (Project Type) to have all this PS Scripts togehter in one compiled executable (if possible)

Peter
What scripts? A project executable can have functions and it can call external scripts. You cannot have separate independent scripts in an executable. You can include script files and have them wrapped in a function- as you have just discovered.

I recommend avoiding complicated executables and projects u til you have a more complete understanding of how PowerShell works. It is called a "scripting system" and not a "language". This is for a number of very specific reasons.

treierp
Posts: 7
Joined: Tue Aug 28, 2018 11:42 pm

Re: Beginner Question :-)

Post by treierp » Thu Aug 30, 2018 1:39 am

I'll do this Tutorial and come back to my Project later !

Locked