Category: Microsoft Windows

Prompt for a computer asset name & move a computer to a new OU in Active Directory using powershell.

Prompt for a computer asset name & move a computer to a new OU in Active Directory using powershell. Change the AD domain and Local Admins group to your chosen target. $name = Read-Host -Prompt ‘Enter the users asset tag that you want to move in AD’ Get-adcomputer $name | Move-ADObject -TargetPath “OU=Local Admins,OU=Devices,DC=blog-adigraham,DC=co,DC=uk”

Read More →

Set Windows Permissions using a batch file

I used this when for some reason a SQL Server Database would lose its permissions daily. Create a batch file .e.g Change Permissions.bat with the following inside it. cacls “D:\YOUR DIRECTORY PATH” /t /e /c /g “USERNAME – If its a Domain User domain\user”:F Change your path and username you wish to add permissions to. Please note: […]

Read More →

How to find which w3wp.exe Application Pool is using all the CPU or Memory in Windows

So you have a IIS Webserver that is running at 100% cpu and the process causing this is w3wp.exe, this is a good way to find out which App Pool / Site is causing the problem. Create a shortcut with the following command & save as List_IIS_Apppools.cmd %windir%system32cmd.exe /k iisapp.vbs Run List_IIS_Apppools.cmd Download and install Process Explorer here […]

Read More →
Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: