No programmer is perfect and everyone makes mistakes, but one is for sure – practice makes better. To give you a heads-up, we have selected the best websites to practice your code. Those websites will help you grow and achieve your coding goals.
Continue reading 5 great websites where you can test your code skillsCategory: Scripting
Powershell: Run SQL command using different credentials
Hey!
Finally found time to post in here. Recently I’ve been working on a Powershell script that connects to a SQL 2016 database. Easy one, huh?
The problem may be using Invoke-Sqlcmd cmdlet when you’re using Windows authentication ONLY. In such cases, here’s a function I use to connect to SQL: Continue reading Powershell: Run SQL command using different credentials
Error handling in Powershell
Hey there!
I have recently played around with an error handling, also using functions.
You can explicitly define the behaviour of the script and how it should handle errors using an $ErrorActionPreference variable. You will typically set it to either of following: Continue reading Error handling in Powershell
How to disable SMB v1 using Powershell
Hey guys,
long time no see!
As you may be aware, there has been some malware activities within last few days and your Windows environments could be affected as well. One of the recommendations is to disable SMB v1 protocol and here’s how to do it using Powershell. Continue reading How to disable SMB v1 using Powershell
Powershell and Secure/Encrypted strings
Hey there!
Sometimes you may have a need to encode or encrypt a string. This is usually neccessary for strings like passwords. Continue reading Powershell and Secure/Encrypted strings
Send e-mail using Powershell
Hey there,
so today I’d like to take a look at sending an e-mail from Powershell, that I’m sure many of us had to do. Continue reading Send e-mail using Powershell
Enable WinRM to run remote Powershell commands
Hey there,
sometimes you’d just like to run Powershell on remote servers but from local console. So you work locally from your PC, but get results from remote computers or servers. It can save you some time automating stuff, doing reports etc. Continue reading Enable WinRM to run remote Powershell commands
Convert time to UTC in Powershell
Hello again!
This time I’d like to spend a moment on many times asked question, how to convert time in Powershell. Continue reading Convert time to UTC in Powershell