PowerShell is a great tool for managing your repetitive tasks with DNS records. In this example I will show you how you can bulk import DNS records to Windows DNS servers. Populate a CSV with your device names and IP’s In PowerShell, import your CSV with the devices and IPs: #Import CSV $devices = Import-Csv “\\ServerPath\devices.csv” 3. Loop…
Category: PowerShell
Automating Windows Server Updates with PowerShell
Introduction If you are anything like me, you probably get fed up managing Windows Server updates manually pretty quickly. Logging onto servers, checking for updates, installing them, rebooting them, trying to keep track of which servers have been updated, what updates were installed etc… etc… I wanted to automate the process but still have control over when the updates were…
Simplivity Backup Reports with PowerShell
An issue with Flash in the web browser and the version of Simplivity we are running forced my hand to learn to manage the backups using PowerShell. I started managing the backups through the Simplivity CLI but then discovered there was an PowerShell API which made life a lot easier. If you have experience using PowerShell you will find these…
Managing DHCP Scopes with PowerShell
Introduction We recently restructured our whole IP addressing schema. This was a mammoth job. The management of DHCP scopes was one part of this. We had to create around 20 new DHCP scopes and create reservations for all the devices that reservations in the old scopes. I thought to myself that this is the perfect time to learn about using…
Exchange Online Migration error: “Target user already has a primary mailbox”
Issue When migrating mailboxes from Exchange On Premise to Exchange Online, it fails with the following error: Target user ‘Users Name’ already has a primary mailbox. Cause Long before we had ever thought about migrating to Exchange Online we had manually created some students in our Office 365 tenant (not using the Azure AD Connect) to give them access to…
Spiceworks: Unassigned tickets report with PowerShell
An “Unassigned Tickets” report is very useful for making sure everyday that all tickets are being picked up and not left sitting unassigned. Spiceworks has the built in report functionality which are great, but the only issue I have with them is that you cant put report content directly in an email, it sends it as an attachment. So I…
How to (Easily) backup MS SQL Databases using Powershell
Backing up SQL databases with Powershell is quite useful and is probably easier than you think. This can be used in situations where you only have the SQL Server Express edition installed and can’t manage backups through the SQL Management Studio, or if you just want to do some one off backups Install SQLServer Powershell module 1. Open a Powershell…
How To Export Spiceworks Reports to HTML Using Powershell
Introduction This allows you to query the Spiceworks database and save the results as a HTML report. It uses the PSSQLite Powerhsell module and then the ‘ConvertTo-HTML’ command to output it to HTML. Step 1: Create your SQL Query It is best to run your test query’s against a copy of your Spiceworks database, not your live database. There are…
Powershell: Automating Exiting Users
Introduction I have being playing around with Powershell a lot more lately and trying to learn and utilise it as much as possible. One of the repetitive tasks we deal with is when a student exits the school. There are a number of steps in AD that have to be undertaken each time a student leaves. These include: Disable the…
PowerShell Resources
As a Sys Admin, I am probably a bit late to the party with how useful PowerShell can be. I have lately completed a couple of online courses about PowerShell and am trying to use it as much as I can in my day to day work. I am finding it incredibly useful in work and relatively easy to pick…