Click here to Skip to main content
15,893,508 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: PowerShell Pin
Ian Bell, #219-Mar-18 10:36
professionalIan Bell, #219-Mar-18 10:36 
GeneralRe: PowerShell Pin
PIEBALDconsult19-Mar-18 11:55
mvePIEBALDconsult19-Mar-18 11:55 
GeneralRe: PowerShell Pin
Stefan Schier @19-Mar-18 21:08
Stefan Schier @19-Mar-18 21:08 
GeneralRe: PowerShell Pin
sibling12321-Mar-18 1:27
sibling12321-Mar-18 1:27 
GeneralRe: PowerShell Pin
Jan Holst Jensen219-Mar-18 21:13
Jan Holst Jensen219-Mar-18 21:13 
GeneralRe: PowerShell Pin
spoljarecDamir19-Mar-18 22:00
spoljarecDamir19-Mar-18 22:00 
GeneralRe: PowerShell Pin
Rob Philpott20-Mar-18 2:16
Rob Philpott20-Mar-18 2:16 
GeneralRe: PowerShell Pin
sir_download_alot19-Mar-18 22:41
professionalsir_download_alot19-Mar-18 22:41 
I got into PowerShell end of last year when the guy that did the regular system checks was retired and the other moved to another department. So I took on the challenge to do a deep dive into it and automated the necessary system checks and more with PS. It proved to be the right tool for the job. Of course there are tool that you can buy or you can use a programming language to crank something out but the necessary resources were not available and I wanted to learn how to do it with PS. I had some light exposure to PS before.

One success factor (probably the most important) for me was to use VS Code with all the power of the available extensions, the writing, testing and debugging of my scripts was pretty efficient and fun to do with this editor. As usual, I spent some time on Stackoverflow too!

The following was implemented over a period of maybe 2 Month (only occasionally found time to work on it):
Parsing Windows Log for specific events
Parsing a 3rd party tool log for specific information
Checking network folder availability
Checking status of Web Sites
Checking status of SQL Server databases
File conversion tasks for a productive system
All of the above is using emails to alert if something fails (including attached logs and HTML reports)
Configuration is done using a JSON files

Some of the scripts are used as part of an SQL Server job, others are started using the Windows Task Scheduler on a server.

I started to tinker around with SQLLite to store some data and create a timeline with Google Chart services using that data. However, this is already more than I actually need but it worked.

One thing I like the most is the ease of deployment. Just copy the script and you are done.

Working with parameters can be a bit nifty but when you get the hang of it, it is Ok. The possibility to us, in addition to the native cmdlets, .NET Framework Classes makes PowerShell extremely versatile and powerful.

Would I do it again? Certainly!

modified 20-Mar-18 5:12am.

GeneralRe: PowerShell Pin
iacopovettori20-Mar-18 0:40
iacopovettori20-Mar-18 0:40 
GeneralRe: PowerShell Pin
agibs20-Mar-18 3:33
professionalagibs20-Mar-18 3:33 
GeneralRe: PowerShell Pin
Lucas Vogel20-Mar-18 3:37
professionalLucas Vogel20-Mar-18 3:37 
GeneralRe: PowerShell Pin
Richard Givis20-Mar-18 3:41
Richard Givis20-Mar-18 3:41 
GeneralRe: PowerShell Pin
sasadler20-Mar-18 3:39
sasadler20-Mar-18 3:39 
GeneralRe: PowerShell Pin
Retired201720-Mar-18 5:06
Retired201720-Mar-18 5:06 
GeneralRe: PowerShell Pin
firegryphon20-Mar-18 7:28
firegryphon20-Mar-18 7:28 
GeneralRe: PowerShell Pin
Retired201720-Mar-18 7:35
Retired201720-Mar-18 7:35 
GeneralRe: PowerShell Pin
Sekers20-Mar-18 8:58
Sekers20-Mar-18 8:58 
GeneralRe: PowerShell Pin
pmauriks22-Mar-18 13:02
pmauriks22-Mar-18 13:02 
Generalnot guilty by reason of insanity Pin
Marc Clifton19-Mar-18 1:18
mvaMarc Clifton19-Mar-18 1:18 
GeneralRe: not guilty by reason of insanity Pin
Kornfeld Eliyahu Peter19-Mar-18 2:01
professionalKornfeld Eliyahu Peter19-Mar-18 2:01 
GeneralRe: not guilty by reason of insanity Pin
glennPattonWork319-Mar-18 2:03
professionalglennPattonWork319-Mar-18 2:03 
GeneralRe: not guilty by reason of insanity Pin
megaadam19-Mar-18 2:43
professionalmegaadam19-Mar-18 2:43 
GeneralRe: not guilty by reason of insanity Pin
glennPattonWork319-Mar-18 3:04
professionalglennPattonWork319-Mar-18 3:04 
GeneralRe: not guilty by reason of insanity Pin
Nelek19-Mar-18 2:59
protectorNelek19-Mar-18 2:59 
GeneralRe: not guilty by reason of insanity Pin
#realJSOP19-Mar-18 2:10
mve#realJSOP19-Mar-18 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.