And another good day to everyone!
It has been busy for me, busier than it has been in a few years now. While it can annoy, it still is a good sign so I am hoping it will stay this busy.
Anyhow, that of course is not the reason I made this post. Today will be all about checking physical disks and their RAID status through Powershell.
It has been a while, but that is to be expected. There is a lot of work to do at the start of a new year, but mostly not the most interesting work.
Anyway, this will be an easier one.
Fortigate routers, Fortiswitches and other Fortinet options are gaining more traction within a good few businesses (Might be country-dependent) so using the Forticlient software is done more and more by our customers.
However, you mostly only want it for one reason... to have the entire company use its VPN function.
Today I will look at a Powershell script made to retrieve (and if needed, alert on/work with) certificate expiration data.
As of last weekend I have full moved to my new home so I hopefully will have more time to spend on informative posts.
An important part of a workstation’s security is its Antivirus or Security software.
However, how to see which device is already protected? Because before you know it, you might have devices in a network that don’t have a security product as someone has forgotten to install it. Let us look at where to find this information!
As I am moving homes I have not had enough time lately to create too much blog material. I spend most of my time on actions like painting and cleaning right now (Also important ofcourse).
Nonetheless, a very small script here to allow for you to set a default printer within Windows using Powershell. This can be useful in combination with remote monitoring software or similar when customers don’t make use of GPO’s or other means of easier deployment.
My apologies for the lengthy silence, but it has been very busy in my life.
Holidays, several important matters like the purchase of a house and a ton of work at my job have been keeping me busy.
It is important to finish what I started though so part 2 of the basic use of regex (Regular Expressions).
Hopefully, everyone is still staying safe.
I have kept myself busy with more and more work within the company to be much impacted by the current situation.
Anyway, time for some timesaving additions to our Powershell scripts. Shortcuts that allow us to reduce even a single action by up to 3 lines.
I am talking about... Regex, also known as Regular Expressions.
Hopefully everyone is staying safe and healthy in these harsh days. As always I will simply have to keep working from office, though with some slight communication- and interaction-restrictions.
Today I want to bring you a Powershell script, or at least the base, that allows for automatic and randomized restores using the Veeam Backup and Replication software.
I have posted a similar script before. This however is an improved version as this one first tries restore locations on whether they exist before trying to restore them.
Now the question would be, why would I want an automated randomized restore?
Today I will look at the basics of System Protection and how to monitor and/or manage it through Powershell, either remote or locally.
For this, we have multiple Powershell commands and ways to use those commands.
Let us look at a few options!
Today, another small one.
At times, you will have a certain process, service or software package that during faulty periods takes take up a lot of memory.
To counter this, we can have a script take automatic remedial actions.
Another quick Powershell script.
Even though it is already 2020, there are still enough servers with older disks capable of slowing down because of fragmentation.
So, how can we make sure we stay up to date on the fragmentation?
Lately I have been having more issues regarding deploying software that depends on scheduled tasks it should create itself/would have to be manually created.
Most of the time we do not want to have to manually create scheduled tasks and the software itself won't always create scheduled tasks when deployed/installed remotely.
So we have to create the scheduled tasks within the Task Scheduler ourselves! And what better way to do it than using Powershell?
It has been a while, but more posts will come soon.
For now, an easier one that has more informational value than any actual use.
Ever felt like you wanted to know how old the workstation is of a customer? Or how long that old physical server has been standing there?
Now you might be able to figure that out using Powershell.
Some have already seen this error before while others are confused by it appearing when running their script.
I am talking about an error occurring when using the Webclient object in Powershell to download or upload files.
To be specific ... this one:
An exception occurred during a WebClient request.
A small one this time. Whether it is Azure servers, customer servers or workstations ... there can be many reasons why a device can not be running 24/7 and reboots need to happen.
As an example, Azure servers that have been set to turn off after work hours and turn on in the morning. To realize this, you must have set rules or other automation tools to have it shut down and start up again. However, can you trust on it always working? Maybe the server has been online for the last few weeks without you noticing!
The script below checks how long a device has been active for and executes actions depending on the result.
Today I wanted to mix it up a bit more and combine both the informational posts with scripting.
And thus for people who are new to Powershell ... the basics!
Disclaimer. This will not teach you HOW to script and/or most of the scripting language, there are more than enough good quality tutorial video's and reference material on that. This will simply be a small lesson on how Powershell is set up to work and some tips/tricks that might help you create your first working scripts.
After this session you hopefully will be able to see the idea behind the logo shown at the top of this blog post.
Good evening again!
This time I am back with quite an easy one.
The scenario. Users are logged in on their workstation/server and you need to know which group policies they are getting loaded in (either computer or user)! (Assuming there is a reason for doubt on whether or not they are getting the correct ones from the domain GPO)
This time a niche script for those customers that use terminal/remote desktop servers with User Profile Disks.
For people unsure about what User Profile Disks (UPD's) are. They are profile folders located on for example a file server that get loaded onto a terminal server the moment the user it belongs to logs in. These contain the user-data files (documents, appdata etc. etc.). This saves space and allows you to easier set limits to how big their profile is allowed to be.
However .. problems can arise at times and if a UPD gets stuck on one of the terminal servers while the user gets directed to a different one (giving that employee constant temporary profiles) it can get annoying real quick to find out where it is stuck (as usually the best way is to manually disconnect the disk from the server), especially when you have multiple servers with 10+ users on it.
Another script that can be used to make managing a bigger amount of workstations easier.
Ever got annoyed by devices being installed remotely (or manually) by either yourself or software and it keeps going to hibernate? Or perhaps those few HP Surfaces that keep losing their internet connection because someone closes the lid and it goes into sleep-mode?
Not anymore, at least if you manage to execute the script before the device falls asleep.
Good day again!
This time I have a smaller and a lot easier script to share.
Ever had clients ask to have their PC's checked for specific software (now and in the future) to make sure no one installs certain software packages?
Well, I had and thus I created this Powershell script (which by the way, requires Powershell 3.0 or higher) that can check this for you.
While it is best to combine this with remote monitoring software, GPO and/or other methods to remote have this run on multiple devices, I am sure there are more uses for it.
So, what does this do?
It simply gets the values under the Installation registry that contain the names of installed software (while not 100% foolproof against some sneakier installation packages, it does mostly retrieve all the installed software) and pastes those in a txt file next to the Powershell script (Can be adjusted).
Hereby a script that I have running over all customer workstations and servers on a daily base.
Windows firewalls is important, no matter how annoying they can be sometimes to set up correctly for some applications, and it is almost always preferred to keep them active.
Knowing customers, fellow IT-people and third-party support however they do have a tendency to "temporarily" turn off the firewall and don't always remember or want to turn it on again.
To make sure that we have a full guarantee that Windows firewall is enabled everywhere, we run this script over all devices to give us that guarantee.
While its not really a script that is useful for running manually on 1 device, it has good use when being run through GPO, remote monitoring software, task scheduler or similar methods.
Good day again!
Network drives are commonly used in many companies. Whether they have a H: drive linking to their home drives or some other drive letters linking to specific shares on file servers .. these are commonly used ways of allowing people to access files that are saved on servers, storage devices or other remote places.
These drive letters are usually spread around by different methods ranging from group policy, workstation management software or manually added by customers.
However, some times something changes that requires the old shares to be removed due to being invalid or outdated.
When you have customers with clusters of network drives of which some are new/correct and others are invalid, it can become annoying to manage.
The script is quite simple and only has a niche usage, but can nonetheless be quite useful.
Good day and welcome to the first of hopefully many blog posts whereby I mention some of the issues I run into while trying to gather experience regarding the world of IT and share solutions or workarounds I find as I go.
One of the earlier things I ran against (Mostly while performing remote background tasks) is changing current user registry's. The problem is that either the specific user/customer accounts on the servers/workstations don't have enough rights to change a registry or that remote software uses an administrator or SYSTEM account on which it has no use to change the current user registry.
Therefor this Powershell script ended up saving me a few times. This can be used from either an Administrator account on the device itself or remotely using any RMM/MSP software.
Patrick Berger AKA Powershellder.
[ i ] Parallax section below. Click on the section below to upload image. Don't worry if it looks weird in the Weebly editor. It'll look normal on your published site.
To edit or delete your image, press the "toggle" button below. Then, hover over your image until a popup appears with the "edit" and "delete" options. If you don't want a white content section, leave it blank. It will disappear on your live website.