Posts

Correct Way to Rename an Active Directory Domain Controller

If you rename your DC by renaming a Domain Controller in the normal way you would rename a computer (using the System > Rename this PC gui), you didn’t do it right and your metadata is likely irreversibly damaged. However, I have seen success in this situation when multiple DC’s exist by demoting a re-promoting the DC. If only a single DC exists I would say its maybe a good idea to follow the below guide as it may get your out of the proverbial but probably not recommended and you may have to rely on backups.  Use the below method carefully to rename your DC in a right way and for a smooth migration Step 1: Getting ready. Open a command prompt. (Windows key+r (run) + cmd) Step 2: Adding an alternate computer name. SYNTAX : netdom computername <currentDC FQDN> / add:<newDCName FQDN> In the command prompt, type (minus quotes) “netdom computername wrongname.domain.local /add:server.domain.local“   This should return with “Added (NAME) as an alternate nam

Add User To The Local Administrators Group On Multiple Computers Using PowerShell

  To achieve the objective I’m using the Invoke-Command PowerShell cmdlet which allows us to run PowerShell commands to local or remote computers. In the example below, I’ll add my User ABC to the local Administrators group on two Server (serv1, serv2) Invoke-Command -ComputerName Serv1, Serv2 -ScriptBlock {add-LocalGroupMember -Group "Remote Desktop Users" -Member ABC }   There is another everyone's favorite way here along with input file and result comment: $Computerlist = get-content "C:\temp\servers.txt" foreach ($computername in $computerlist) { Invoke-Command -ComputerName $computername -ScriptBlock {add-LocalGroupMember -Group "Administrators" -Member GIN } Write-host "ABC User added in $computername" }    

How to Export Active Directory Objects to CSV

Image
  Open the Powershell ISE → Create new script with the following code and run it. Get-ADObject -Filter 'Name -like "*"' | Where-Object {$_.ObjectClass -eq "user" -or $_.ObjectClass -eq "computer" -or $_.ObjectClass -eq "group" -or $_.ObjectClass -eq "organizationalUnit"} | Sort-Object ObjectClass | Export-CSV C:\Temp\ExportAD.csv -notypeinformation Open the file produced by the script in MS Excel.

How to Stop Your Webcam From Freezing and Crashing on Windows 10

Image
 A technological change made in Windows 10 Anniversary Update caused a problem where webcams failed to work, and the respective software (like Logitech, Skype) simply hung up within minutes of use. Microsoft is working on an official fix that will be available in September. But, if you can’t wait a month before your webcam works properly again, there’s a registry hack you can use to re-enable the old behavior and fix this problem. First, open the registry editor by opening the Start menu, typing “regedit”, and pressing Enter. Then, navigate to the following key in the left sidebar: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Foundation\Platform Right-click the “Platform” key in the left sidebar and select New > DWORD (32-bit) Value. Name the value “EnableFrameServerMode”. Double-click it and set the value to “0”. The next part depends on if you’re using a 32-bit or 64-bit version of Windows to perform this process. Not sure? If you’re using a 32-bit version of

Microsoft Failover Cluster: Event ID 1257 every 15 minutes

Image
  Having just created a new cluster, I noticed Event ID 1257 being logged in the Cluster Events node within Failover Cluster Manager. Cluster network name resource failed registration of one or more associated DNS name(s) because the access to update the secure DNS zone was denied. cluster Network name: 'Cluster Name' DNS Zone: *dns zone* Ensure that cluster name object (CNO) is granted permissions to Secure DNS Zone.    Here’s a screenshot of the actual events: The reason: Before creating the cluster, I had pre-added (manual) the DNS ‘A’ record for the CNO that I would need using IPAM. The solution: I simply deleted the CNO ‘A’ record in DNS and recreated it, ensuring that when I did so, I ticked, “ Allow any authenticated user to update DNS record with the same owner name ” If you do not manually pre-create the CNO 'A' record in DNS then you will not have this issue.  

How to Get LUN WWN ID on Windows Server 2012 Operating System

Go to powershell and run below mentioned command. Get-Disk -Number 17 | Select UniqueId   Replace numeric digit with actual disk ID (can fetch that from disk management console) output : UniqueId -------- 60002AC0000000000000006A003430FA

Modify BulkRegistry Permission Through Regedit in Windows

Image
Sometimes it becomes necessary to remove a group of registry entries from Registry editor but due to lack of permission adn inheritance it becomes so  quite impossible to action on them in a go. Below solution will allow you to set desired permission in any of the registry group in single go.   Open an empty mmc and add the Snap-ins “ Security Configuration and Analysis ” and “ Security Templates ”. 2.     Create a Template Right click on the path under Security Template Choose “New Template” Name the template as wanted Go to “Registry” and right click on right pane and click on add key Select the target registry path and click on OK. Add “Everyone” and give “Full Permission”. Go to “ Advanced ” and click on “ Owner ” Set Owner as “ Everyone ” and Click on “ OK ” Select “ Replace existing permissions on all subkeys with inheritable permissions ” and click on “ OK ”.