Tag: Powershell
-
So, I have a PowerShell script that runs 4 different SQL queries whose results I want to save in an Excel file with 4 sheets. I’m utilizing dfinke’s ImportExcel module version 6.1.0 and I’m running into this error whenever it’s trying to write the datasets on the Excel file. The output would be an excel… Continue reading
-
Cos I don’t have access to this machine and I needed to know the timezone its on… Just fire up PowerShell and run the following command to fetch the timezone Just replace ServerName with the actual machine or server name Similarly if you want to get the timezone of your local machine Continue reading
-
Here’s another note to self… I’ve been looking for a way to password protect a csv file but found it’s not possible natively so one way to encrypt it is to zip it first and password protect the zip file. Now I have multiple files I want to to zip using 7-Zip compression and again… Continue reading
-
Oh this is super handy. Say you have an active log file you want to monitor in real-time, simply run this command in Windows Powershell and see your logs update live on the terminal. To demonstrate, in the screenshot above, I simply created a script that logs the current timestamp every two seconds on a… Continue reading