Sunday, September 29, 2019

How to see line numbers in the visual studio code editor


To get line numbers displayed:
-----
Tools --> Options
Text Editor -->All languages -->line numbers checkbox


How to get visual studio free version

visualstudio.com -- click on free visual studio -- select community edition





Wednesday, November 29, 2017

GitHub Desktop for other providers

GitHub Desktop can be downloaded from GitHub Desktop.
It is provided by GitHub and supposed to use only for GitHub.com
Other providers like BitBucket can’t be used directly with GitHub Desktop.
If we need desktop client for BitBucket, we can use directly the Git software available at Git website, this is the most recommended one and have both command line and GUI versions.
But for people, who are acquainted with GitHub Desktop, they can follow below instructions to use BitBucket and other service providers with GitHub Desktop.
  1. Clone the Bitbucket repo locally via command line.
  2. Add Cloned Repository to Your GitHub Desktop App.
Video Tutorial:
Reference: Main Link

How to connect to Remote Hyper-V in a workgroup network

We can access Hyper-V server and its machines through Hyper-V manager on a different machine if it is connected in Active Directory network.It will pickup the AD credentials we logged in with and provide access based on the rights the logged-in user have.
Prior to server 2016 and windows 10, we don’t have below option to connect with Remote Hyper-V.
1.PNG
So we don’t have option to use Hyper-V server on the previous OS of windows.
From the OS mentioned above (from windows 10), we can connect to remote Hyper-V server or client machines and access/control their VMs.
Before doing that, we need to configure some settings on the remote machine and on the local machine to create a trust between both the machines.
To do that, run below scripts on respective machines.
Server.ps1:
CommandLine : Set-ExecutionPolicy Unrestricted

CommandLine : Get-ExecutionPolicy

CommandLine : Start-Service WinRM

CommandLine : Enable-WSManCredSSP -Role "Server"

CommandLine : .\Configure-SMRemoting.exe -Enable

CommandLine : Set-NetFirewallRule -DisplayGroup 'Windows Management Instrumentation (WMI)' -Enabled true

CommandLine : Set-NetFirewallRule -DisplayGroup 'Windows Management Instrumentation (WMI)' -Enabled true -Passthru

CommandLine : Set-NetFirewallRule -DisplayGroup 'Windows Management Instrumentation (WMI)' -Enabled true -PassThru

CommandLine : Set-NetFirewallRule -DisplayGroup 'Remote Event Log Management' -Enabled true -PassThru

CommandLine : Set-NetFirewallRule -DisplayName 'File and Printer Sharing (Echo Request - ICMPv4-In)' -Enabled true 
              -PassThru

CommandLine : .\cscript.exe C:\Windows\System32\SCregEdit.wsf /AR 0

CommandLine : Set-NetFirewallRule -DisplayGroup 'Remote Volume Management' -Enabled true -PassThru

CommandLine : get-history | Format-List CommandLine | out-file c\server.txt
Client.ps1:
CommandLine : Enable-WSManCredSSP -Role "Client" -DelegateComputer "chellangi-2016"

CommandLine : Enable-WSManCredSSP -Role "Client" -DelegateComputer "chellangi-2016"

CommandLine : Connect-WSMan -ComputerName "chellangi-2016"

CommandLine : set-item wsman:\localhost\Client\TrustedHosts -value *

CommandLine : set-item wsman:\localhost\Client\TrustedHosts -value "chellangi-2016"

CommandLine : $current=(get-item WSMan:\localhost\Client\TrustedHosts).value

CommandLine : $current=(get-item WSMan:\localhost\Client\TrustedHosts).value

CommandLine : get-command *winrm*

CommandLine : get-command *remote*

CommandLine : get-command *winrm*

CommandLine : get-command *win*

CommandLine : get-command *remote*

CommandLine : winrm quickconfig

CommandLine : winrm quickconfig

CommandLine : clear

CommandLine : winrm quickconfig

CommandLine : winrm quickconfig

CommandLine : $Profile = Get-NetConnectionProfile -InterfaceAlias Ethernet1

CommandLine : Get-NetConnectionProfile 

CommandLine : $Profile = Get-NetConnectionProfile -InterfaceAlias ERWIN-AP01

CommandLine : $Profile = Get-NetConnectionProfile -InterfaceAlias "vEthernet (wifi)"

CommandLine : $Profile.NetworkCategory = "Private"

CommandLine : Set-NetConnectionProfile -InputObject $Profile

CommandLine : winrm quickconfig

CommandLine : winrm set winrm/config/client @{TrustedHosts="Name of the Server"}

CommandLine : winrm set winrm/config/client @{TrustedHosts="chellangi-2016"}

CommandLine : winrm set-winrm/config/client @{TrustedHosts="chellangi-2016"}

CommandLine : winrm set winrm/config/client @{TrustedHosts="chellangi-2016"}

CommandLine : winrm set winrm/config/client @{TrustedHosts="chellangi-2016"}

CommandLine : Enable-WSManCredSSP -Role "Client" -DelegateComputer "chellangi-2016"

CommandLine : Set-NetFirewallRule -DisplayGroup 'Remote Volume Management' -Enabled true -PassThru

CommandLine : get-history

CommandLine : get-history | format-list

CommandLine : get-history | format-list CommandLine

After that, add below settings on the local machine, to add remote machine to the trusted zone.
add to trusted.png

How to reset windows password

In the windows operating system, the credentials are stored in the registered in encrypted format at [HKEY_LOCAL_MACHINE\SAM]
This location won’t be visible once the OS is loaded.
This can be accessed during the boot time and we can access it by launching the command prompt during boot time and can clear or reset the password.
To make it simpler, below third party vendors provide bootable media or application to create that bootable media.
List of softwares to create the bootable media to reset windows password.
You can comment on the post if you need any details.