• Home
  • Cisco
  • Exchange
  • Linux
  • Navision
  • Network
  • Virtualization
  • Windows
  • About
  •  

    Make changes to a users system registry (Regedit) – Windows 2012

    February 27th, 2015

    Log into the system as Administrator and open regedit.

    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
    In this path you can see all users, and inside this you can see their profile path etc c:\users\test1
    You will also see the user SID

    This SID can be found in: HKEY_USERS


    Add RDP-Tcp connection in Windows 2012 R2

    February 26th, 2015

    If you for some reason need two RDP-Tcp connections in Windows 2008 you could easily add one in the “Remote desktop Session Host Configuration” tool.
    RDP
    This tool does not exist in Windows 2012 and you have to do it with regedit.
    Make an export of this:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

    Edit this regfile and change the path
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp-3390

    This will be your new RDP-Tcp connection.
    Change “LanAdapter” to the listening netcard
    0 = all
    1= netcard1
    2=netcard2
    3=netcard3

    Change “PortNumber” to the port listening on the RDP-Tcp-3390
    In this way, the original RDP-Tcp could listening on port 3389 with netcard1 and RDP-Tcp-3390 listening on port 3390 with netcard2

    RDP2

    Show netcard ID:
    netsh interface ipv4 show interfaces

    Show assignments in powershell:
    gwmi Win32_TSNetworkAdapterSetting -filter “TerminalName=’RDP-Tcp'” -namespace “root/cimv2/TerminalServices” | Select NetworkAdapterLanaID,NetworkAdapterName
    and
    gwmi Win32_TSNetworkAdapterSetting -filter “TerminalName=’RDP-Tcp-3390′” -namespace “root/cimv2/TerminalServices” | Select NetworkAdapterLanaID,NetworkAdapterName


    Set standard printer with a script

    February 13th, 2015

    RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n “RICOH 3228C”

    If you need a delay og 10 sec, add this before:
    ping 1.1.1.1 -n 1 -w 10000 > nul

    —-
    Alternative:

    In bat file:
    cscript print.vbs

    In vbs file:
    Option Explicit
    On Error Resume Next
    Dim objNetwork
    Set objNetwork = CreateObject(“WScript.Network”)

    objNetwork.SetDefaultPrinter “printer MFP(PCL) (redirected 1)”
    objNetwork.SetDefaultPrinter “printer MFP(PCL) (redirected 2)”
    objNetwork.SetDefaultPrinter “\\server\printer”

    WScript.Quit