Out with the old, in with the new... I've been meaning to update my server setup script post for quite a while now. It was one of the first posts I made on this blog and at that time of writing that post I was very new to PowerShell scripting and it showed. Well tonight … Continue reading Updated – Server Setup PowerShell Script
script
Get Computer Workstations Manufacturer and Model Remotely using a PowerShell Script
In this post we are going investigate the use of PowerShell scripting to remotely mass gather all desktops \ laptops make and model details within an environment. Asset management is a big part of the general management of business IT. Having useful little scripts to gather information quickly with minimal effort has proved very beneficial … Continue reading Get Computer Workstations Manufacturer and Model Remotely using a PowerShell Script
Active Directory clean up using PowerShell script e.g Name, UPN, SAM, Email
In this post we are going to look at a simple script to change AD attributes on a large scale with minimal effort. Although bare in mind every Active Directory structure has it's differences, parts of the script or the majority of it's contents may not be applicable to your current situation. This post is … Continue reading Active Directory clean up using PowerShell script e.g Name, UPN, SAM, Email
Automate VM Failover on Hyper-V Replicated hosts – PowerShell Script – Domain & Workgroup
In this post we are going to look at using a PowerShell script to automate the process of a planned fail over on multiple replicated Hyper-V virtual machines, on both domain and workgroup servers. What the script does: Requests for user input specifying the Hyper-V source host Requests whether All VM's need to be migrated … Continue reading Automate VM Failover on Hyper-V Replicated hosts – PowerShell Script – Domain & Workgroup
Automatically Clear assigned KMS Host on multiple KMS Clients and enable Auto-discovery
To do this we are going to utilize a small PowerShell script to remotely run a command to clear the assigned KMS host on multiple clients. Doing this will remove the manual KMS Host entry and re-enable auto-discovery. Normally if your clients are pointing to a dead KMS host - you will notice that you … Continue reading Automatically Clear assigned KMS Host on multiple KMS Clients and enable Auto-discovery
How to Pass Credentials in PowerShell
In this post we are going to look at the multiple different ways to use user credentials in PowerShell. Bare in mind, the examples listed in this post aren't the only options available when it comes to using credentials in PowerShell, but these examples are a good place to start. Having your domain username and password … Continue reading How to Pass Credentials in PowerShell
Delete Local User Profiles Remotely using a PowerShell Script (DelProf2.exe)
In this post we are going to look at utilizing a tool called DelProf and a small PowerShell script to delete user profiles on workstations remotely. First we need to download the tool, it's just one executable file that can be found here The reason for using DelProf2.exe over the syntax's Remove-Item or leveraging WMI … Continue reading Delete Local User Profiles Remotely using a PowerShell Script (DelProf2.exe)
Remove and automatically Re-add Computers from the Domain using PowerShell scripts
In this post we're going to look at removing and then automatically re-adding a workstation from the domain using PowerShell scripts and a batch file. **Bare in mind - the script may not be the best first step for troubleshooting a computer falling off the domain or a trust issue. 'test-computersecurechannel -repair' would be a … Continue reading Remove and automatically Re-add Computers from the Domain using PowerShell scripts
Export Event Viewer Alerts to CSV
Getting access denied error messages or requests to export event viewer logs to a csv or txt file? I've got your back! In this post I am going to show you some simple Power Shell / cmd line techniques to export Event Viewer logs with minimal hassle. A simple one time use example can be shown below … Continue reading Export Event Viewer Alerts to CSV
Server Setup PowerShell Script
In this post we will be looking at creating a simple Power Shell setup script for the initial configuration of a newly imaged server. What the script does: The script takes you through the process of easily imputing your chosen configurations for the settings listed below: Sets IPV4 Network Adapter Settings [optional] Enable Remote Desktop [optional] … Continue reading Server Setup PowerShell Script