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)
Powershell
Restore AD Objects and Users using PowerShell
In this post we are going to look at the different ways you can restore Active Directory objects, such as User Accounts, Groups, Computers and OUs using Restore-ADObject in PowerShell. View Deleted Objects: Firstly this command will show you a list of all deleted objects: Get-ADObject -Filter 'isDeleted -eq $True -and name -ne "Deleted Objects"' … Continue reading Restore AD Objects and Users using PowerShell
Run PowerShell Commands On Remote Computer
In this post we are going to look at running commands on a remote server using PSRemoting sent using the WS-Managment technology WinRM protocol. Firstly you need to make sure WinRM is enabled: WinRM is enabled by default on Windows Server 2012 R2 but disabled on all client operating systems earlier than Windows Server 2012. … Continue reading Run PowerShell Commands On Remote Computer
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