Category: Uncategorized

Change Permissions on Registry Hive Recursively

Below is a small powershell script that will add the “Everyone” Group to Full control for a the registry key HKEY_LOCAL_MACHINE\Software\MyKey. This script will then recursively change the permission on SubKeys and future keys. Save the text to a notepad document and call it something like RegPermissions.ps1

$acl = Get-Acl HKLM:\Software\MyKey
# Everyone has Full contol may do anything:
$person = [System.Security.Principal.NTAccount]"Everyone"
$access = [System.Security.AccessControl.RegistryRights]"FullControl"
$inheritance = [System.Security.AccessControl.InheritanceFlags]"ObjectInherit,ContainerInherit"
$propagation = [System.Security.AccessControl.PropagationFlags]"None"
$type = [System.Security.AccessControl.AccessControlType]"Allow"
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($person,$access,$inheritance,$propagation,$type)
$acl.ResetAccessRule($rule)
Set-Acl HKLM:\Software\MyKey $acl

To run the program from a login script you can assign it to the computer and run using the following syntax:

powershell -executionpolicy bypass -File \\Server\Share\RegPermissions.ps1
Share

Hyper-V Virtual Machine Key Combinations

Standard Windows Key combination Virtual Machine Connection Key Combination Explanation
CTRL + ALT + DEL CTRL + ALT + END Displays the Task Manager or Windows Security dialog box on Windows (or logs in).
ALT + TAB ALT + PAGE UP Switches between programs from left to right.
ALT + SHIFT + TAB ALT + PAGE DOWN Switches between programs from right to left.
ALT + ESC ALT + INSERT Cycles through the programs in the order they were started.
CTRL + ESC ALT + HOME Displays the Windows Start menu.
N/A CTRL + ALT + PAUSE Changes the Virtual Machine Connection window to / from full screen mode.
N/A CTRL + ALT + LEFT ARROW Releases mouse and keyboard focus from the Virtual Machine Connection window.

You can also send key all windows commands to a Hyper-V by clicking on the server in Hyper-V Manager and choosing Action -> Hyper-V Settings. Under user select “Use on the Virtual Machine”

Share

Copy cisco router config between routers

To backup and restore a configuration from one cisco router to another using Hyperterm do the following:

  1. Connect to the router you need to copy the configuration from via Hyperterm.
  2. At the Router> prompt, issue the enable command, and provide the required password when prompted.

    The prompt changes to Router#, which indicates that the router is now in privileged mode.

  3. Issue the terminal length 0 command in order to force the router to return the entire response at once, rather than one screen at a time.

    This allows you to capture the configuration without extraneous --more-- prompts generated when the router responds one screen at a time.

  4. On the HyperTerminal menu, choose Transfer > Capture Text.

    The Capture Text window appears.

  5. Name this file “config.txt.”
  6. Click Start in order to dismiss the Capture Text window and begin the capture.
  7. Issue the show running-config command, and allow time for the router to complete its response. You will see:
    Building configuration...

    followed by the configuration.

  8. On the HyperTerminal menu, choose Transfer > Capture Text > Stop in order to end the screen capture.
  9. Open the config.txt file you created in any text editor, such as Notepad or Wordpad.
  10. Search for and remove any line that starts with “AAA”.

    Note: This step is to remove any security commands that could lock you out of the router.

  11. Save the file.
  12. Connect to the router that needs the configuration.
  13. Open the config.txt file.
  14. Highlight the entire contents of the config.txt file.

    You can do this by dragging the cursor from before the first character to after the last character in the file while holding down the left mouse button. Alternatively, if you use Notepad, you can choose Edit > Select All from the menu.

  15. Copy the selected text to the Windows clipboard.

    You can either choose Edit > Copy from the text editor menu, or hold down the CTRL key and simultaneously press the C key in order to perform the copy.

  16. Switch to the HyperTerminal window, and issue the configure terminal command at the Router# prompt. Then press Enter.
  17. Paste the configuration file into the router by selecting Edit > Paste to Host on the HyperTerminal menu.
  18. After the configuration has finished pasting and the router brings you back to the configuration prompt, issue the copy running-config startup-configcommand in order to write the configuration into memory.
  19. Issue the exit command in order to return to the Router# prompt

 

There are other ways to copy the configuration using ftp and tftp found at.

http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml

Share