Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Thursday, July 4, 2019

Reset Local Administrator Password (Windows 10)


If you've run into a situation where you can't log into a Windows 10 computer because your domain credentials no longer work as the computer object was deleted from Active Directory and you don't know the local Administrator account.  You can reset the local Administrator account using the steps below.
  • Hold down shift and click on the reboot button on the Windows 10 login screen.  It will reboot into recovery mode.
  • Go into the Command Prompt from recovery mode.
  • Enter in the Bitlocker Key if your disk is Bitlocked.
  • Overwrite utilman.exe with cmd.exe.
    • move c:\windows\system32\utilman.exe c:\windows\system32\utilman.exe.bak
    • copy c:\windows\system32\cmd.exe c:\windows\system32\utilman.exe
  • Reboot the computer using the following command.
    • wpeutil reboot
  • On the login prompt after rebooting, click on the Utility Manager icon.  This will open up the command prompt.
  • Change the password of the Adminstrator account by using the following command.
    • net user administrator <new password>
  • Exit the Command Prompt and log in with the new password.

Thursday, November 8, 2018

Run a program as admin from command line.


Ever run into a situation where you need to run a program as admin and Windows is not allowing you because you're in a screenshare with someone and UAC is prompting you but not let you type in your administrator credentials?  Give the following a try!

  1. Open a command prompt.
  2. Type in the following command.  
    • runas /user:Administrator cmd
    • type in your Administrator password
  3. Another command prompt will open up but this time, its run under the Adminstrator account.
  4. Navigate to the executable file you want to run, if its not in the environment path and type in the name and hit enter.
  • Note:  for some reason, you can't open the control panel by running control.exe from this.  If anyone knows why, please let me know.

Saturday, June 9, 2018

Change IP address using Powershell.


  1. Get-NetIPAddress
    1. get the InterfaceIndex number for the nic you want to change the IP address on.
  2. Remove-NetIPAddress -InterfaceIndex X
  3. New-NetIPAddress -InterfaceIndex X -IPAddress x.x.x.x -PrefixLength 23 -DefaultGateway x.x.x.x
  4. Set-DnsClientServerAddress -InterfaceIndex X -ServerAddresses  x.x.x.x, x.x.x.x

Thursday, January 11, 2018

Reset Local Administrator Password

Here's a way to reset the local Administrator password in Windows 2008.

  1. Boot up a WIndows installer CD.
  2. Press F8 at the Local Deployment Wizard
  3. Type in 
    1. move d:\windows\system32\utilman.exe d:\
    2. copy d:\windows\system32\cmd.exe d:\windows\system32\utilman.exe
  4. Boot to normal Window.  At the log in, click on "Ease of Access" button at the bottom left.
  5. Type in:
    1. net user administrator /active:yes
    2. net user administrator <new password>



Friday, January 5, 2018

How to use ImageX

imagex /capture <source disk> <destination disk>:\<wim filename> "description"
imagex /capture d: z:\c.wim "wimtest"

DISKPART>list disk
DISKPART>select disk (id)
DISKPART>online disk (if the disk is not online)
DISKPART>clean
DISKPART>convert mbr (or gpt)
DISKPART>create partition primary
DISKPART>select part 1
DISKPART>active (if this is the boot partition)
DISKPART>format fs=ntfs label=(name) quick
DISKPART>assign letter c:
DISKPART>list volume
DISKPART>exit

X:\Tools>net use n: \\server\share /user:Domain\username "password"
X:\Tools>imagex /apply <source disk>:\<wim filename> "samedescription" c:
X:\bcdboot c:\windows
chkdsk c: /f /v /x

1.  go to windows aik tools directory and run "copype.cmd x86 c:\winpe" to create winpe structure to c:\winpe.

2.  mount the wim file on c:\winpe\winpe.
                      "imagex /mountrw d:\boot.wim 1 d:\image.mount"

3.  edit image........
4.  unmount the wim file and commit changes.
                      "imagex /umount /commit d:\image.mount"

5.  copy the wim file to winpe structure created in step 1.  c:\winpe\ISO\sources

6.  create an iso from image.
                      "oscdimg -n -bc:\winpe\iso\boot\etfsboot.com c:\winpe\iso d:\ghost.iso"

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

  1. Create an ISO of the backup image and mount it to VM.
  2. Install a fresh OS
  3. Install vmware tools.
  4. Reboot into Windows install ISO.
  5. Select System Image Recovery
  6. Select the command prompt.
  7. Type in "start /w wpeinit"  to enable the network and get an ip.
  8. Exit the command prompt.
  9. Select System Image Recovery.
  10. Select the Operating System.
  11. Select the "Select a system image" radio button and next.
  12. Click on the "Advanced.." button.
  13. Click on "Search for a system image on the network"
  14. Type in the path of the backup.  Make sure its the path that has the "WindowsImageBackup" folder or it will not detect an available image.
  15. Type in your credentials.
  16. Select the backup from the list and click Next.


Disable IPv6 via commands in Windows

get-netadapterbinding
set-NetAdapterBinding -Name “Network Adapter Name” –ComponentID ms_tcpip6 –Enabled $False

new-itemproperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value ffffffff

Enable/Disable SMBv1,2,3 in Windows


Bare metal recovery for Windows 2012 from a Windows Server Backup image.

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

  1. Create an ISO of the backup image and mount it to VM.
  2. Install a fresh OS
  3. Install vmware tools.
  4. Reboot into Windows install ISO.
  5. Select System Image Recovery
  6. Select the command prompt.
  7. Type in "start /w wpeinit"  to enable the network and get an ip.
  8. Exit the command prompt.
  9. Select System Image Recovery.
  10. Select the Operating System.
  11. Select the "Select a system image" radio button and next.
  12. Click on the "Advanced.." button.
  13. Click on "Search for a system image on the network"
  14. Type in the path of the backup.  Make sure its the path that has the "WindowsImageBackup" folder or it will not detect an available image.
  15. Type in your credentials.
  16. Select the backup from the list and click Next.


Disable IPv6 via commands in Windows

get-netadapterbinding
set-NetAdapterBinding -Name “Network Adapter Name” –ComponentID ms_tcpip6 –Enabled $False

new-itemproperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value ffffffff

Enable/Disable SMBv1,2,3 in Windows


Bare metal recovery for Windows 2012 from a Windows Server Backup image.

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

  1. Create an ISO of the backup image and mount it to VM.
  2. Install a fresh OS
  3. Install vmware tools.
  4. Reboot into Windows install ISO.
  5. Select System Image Recovery
  6. Select the command prompt.
  7. Type in "start /w wpeinit"  to enable the network and get an ip.
  8. Exit the command prompt.
  9. Select System Image Recovery.
  10. Select the Operating System.
  11. Select the "Select a system image" radio button and next.
  12. Click on the "Advanced.." button.
  13. Click on "Search for a system image on the network"
  14. Type in the path of the backup.  Make sure its the path that has the "WindowsImageBackup" folder or it will not detect an available image.
  15. Type in your credentials.
  16. Select the backup from the list and click Next.


Disable IPv6 via commands in Windows

get-netadapterbinding
set-NetAdapterBinding -Name “Network Adapter Name” –ComponentID ms_tcpip6 –Enabled $False

new-itemproperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value ffffffff

Enable/Disable SMBv1,2,3 in Windows


Bare metal recovery for Windows 2012 from a Windows Server Backup image.

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

  1. Create an ISO of the backup image and mount it to VM.
  2. Install a fresh OS
  3. Install vmware tools.
  4. Reboot into Windows install ISO.
  5. Select System Image Recovery
  6. Select the command prompt.
  7. Type in "start /w wpeinit"  to enable the network and get an ip.
  8. Exit the command prompt.
  9. Select System Image Recovery.
  10. Select the Operating System.
  11. Select the "Select a system image" radio button and next.
  12. Click on the "Advanced.." button.
  13. Click on "Search for a system image on the network"
  14. Type in the path of the backup.  Make sure its the path that has the "WindowsImageBackup" folder or it will not detect an available image.
  15. Type in your credentials.
  16. Select the backup from the list and click Next.


Disable IPv6 via commands in Windows

get-netadapterbinding
set-NetAdapterBinding -Name “Network Adapter Name” –ComponentID ms_tcpip6 –Enabled $False

new-itemproperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value ffffffff

Enable/Disable SMBv1,2,3 in Windows


Wednesday, January 3, 2018

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

Bare metal recovery for Windows 2012 from a Windows Server Backup image.

  1. Create an ISO of the backup image and mount it to VM.
  2. Install a fresh OS
  3. Install vmware tools.
  4. Reboot into Windows install ISO.
  5. Select System Image Recovery
  6. Select the command prompt.
  7. Type in "start /w wpeinit"  to enable the network and get an ip.
  8. Exit the command prompt.
  9. Select System Image Recovery.
  10. Select the Operating System.
  11. Select the "Select a system image" radio button and next.
  12. Click on the "Advanced.." button.
  13. Click on "Search for a system image on the network"
  14. Type in the path of the backup.  Make sure its the path that has the "WindowsImageBackup" folder or it will not detect an available image.
  15. Type in your credentials.
  16. Select the backup from the list and click Next.


http://ift.tt/2CBqx23

Disable IPv6 via commands in Windows

get-netadapterbinding
set-NetAdapterBinding -Name “Network Adapter Name” –ComponentID ms_tcpip6 –Enabled $False

new-itemproperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value ffffffff
http://ift.tt/2lPOBDQ