Sunday, July 10, 2016

(Solved) The WinRM client cannot process the request. If the authentication scheme is different.

My title page contents

“ Enter-PSSession : Connecting to remote server x.x.x.x failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be
used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.”

image

Received this error when I try to initiate a powershell remote session with Nano Server. but saw that most of the time in Windows 2016 server also giving the same error.
To resolve this you can follow below mentioned steps.

First check whether your PC (or the PC which you are trying to initiate the session) have already enabled the WinRM service. For that you can run,

net start WinRM

image

Then you have to add your remote PC (Nano Server) in to the trusted host list in your local machine. For that you can run,

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "IP address of the nano Server"
PS C:\WINDOWS\system32> Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.1.69"

clip_image003

You will get the Security warning, Accept that.

clip_image005

Once you done with that, you should be able to connect in to your Nano Server environment remotely. Try PSSession command to initiate the session.

PS C:\WINDOWS\system32> Enter-PSSession -ComputerName "192.168.1.69" -Credential administrator

image









Friday, July 8, 2016

How to add Nano Server in to Trusted host

Once you setup your Nano server, then to work with that you have to use PowerShell remoting. Once you setup the remote session with the NANO Server, then you will be able to add new packages, Add in to Domain, Enable the services, Enable/Disable firewall rules can be done.

First ill explain the current environment that I’m working here, My Nano Server is running on to of Hyper-V environment which is configured on Windows 10 PC. I’m try to connect into this Nano server by using the Windows 10 PC.

First you have to enable the “ICMP V4 In” firewall rule from the Nano server firewall and then you will be able to ping the Nano server from outside.

Then, enable the “WMI In” rule in the Nano firewall. This is just to minimize the troubleshooting steps. Later you can disable this.

Now you have to enable the WinRM service in your local environment (In my case it’s Windows 10). For that you can run net start winrm

PS C:\WINDOWS\system32> net start winrm

clip_image001

Then you have to add your remote PC (Nano Server) in to the trusted host list in your local machine. For that you can run,

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "IP address of the nano Server"

PS C:\WINDOWS\system32> Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.1.69"

clip_image003

You will get the Security warning, Accept that.

clip_image005

Once you done with that, you should be able to connect in to your Nano Server environment remotely. Try PSSession command to initiate the session.

PS C:\WINDOWS\system32> Enter-PSSession -ComputerName "192.168.1.69" -Credential administrator

image

To get a confirmation, I have ran “Get-CimInstance “ Command. you can see that I already logged in to my Nano server environment.

Tuva is a code name for Nano server.

Get-CimInstance Win32_OperatingSystem | Format-List CSName, Caption, Manufacturer

Hope this help you to resolve the remote connectivity issue with Nano server.

Monday, July 4, 2016

How to attach a Nano VHD in to Hyper-V Manager


There is not any rocket science here. This is just a next next process. I’ll list down the steps below.

Fist locate the Nano Sever VHD File.
image

Then open the Hyper- V Manager and select New Virtual Machine

image

Click next to continue.

image

Give a name for the new Virtual Machine.

image

Select the Generation for the new VM.

image

Here you can select the RAM. you can keep 512 MB for the Nano Server.

image

Then Select the Network interface.

image

From net window select the “Use and existing Virtual Disk” option and select the created Nano VHD file.

image

Click finish to continue.

image

Start the Virtual Machine from the Hyper-V Manager.

image

Give the initially defined User name and the password. now you will be able to logging in to the Nano Server.



image




image

Will do some testings on a another post.

How to remove Windows Server Backups



If you want to take a windows server backup, then you can use Windows Backup Manager feature which comes with the windows server. This is a good tool when you are having a hard time with recovering your AD or Exchange server installation Disks. Not only that if you get used to this Backup solution, it’s having more features, but the GUI is not a user-friendly one.
Once you configured your Windows Server Backup (This you can do by using CMD or the Backup Manager Application) then this will automatically take the scheduled backups into the given destination. I’m not going to show those steps here, because that is a having only few next, next steps to be followed.
The problem that you can see is, if the destination folder or the Driver capacity exceeds or the reconciliation was not happening then you have to re-format the Backup destination which you can’t do.
Then the best option that remaining is to remove some of the old backups from that location. For that you have to use CMD or the Powershell. You can follow the below steps to delete some old backups and free up some space for the future backups.
First open the CMD as Administrator and type Diskshadow to  go in to the Volume Shadow Copy Service (VSS)
--> Diskshadow enables you to create and manage hardware and software shadow copies, including transportable shadow copies.
You can use Diskshadow to:
  • Create hardware or software shadow copies that are subsequently exposed as read-only volumes.
  • Convert a shadow copy into a read-write volume.
  • Create hardware transportable shadow copies that can be imported on a different computer and used for backups or data mining.
  • Create a fast-recovery scenario where a shadow copy created earlier can be imported to replace a volume that may have become corrupted.
Once you run Diskshadow , you will be able to mange you backup disk by using the command line,

Image

Then you can type “list shadows all” to list the total shadow copies in there. Details windows will be displayed here and you will be able to find the all the backups, Backup Volume, Destination address details here.

 image_thumb2

In my case, can see that there are 221 copies are saved on the disk. I just want to delete my old backups which were back-up in the last year.
For that I can run the command "delete shadows oldest G: " G: means the dive which is having those shadow copies saved.

If you are using Windows backup to configure the destination disk, then you will not be able to see that destination backup disk drive letter.

In that case you can copy the  Volume ID of the details. (Once you ran the " list shadows all" command in the details you can find the shadow copy ID and the destination disk Volume ID)  Copy that. (In my case ID is efff2fab-1922-440a-bb04-6980779ee3fb )

Then run the command 
> delete shadows oldest efff2fab-1922-440a-bb04-6980779ee3fb


Image

Now you can run "list shadows all" to check whether the old shadow copy was deleted from the destination.

Image

If you wan to clean the total backup sets, then you can run 
> delete shadows all 
 
Or else you can delete by using the shadow copy ID.













Friday, July 1, 2016

How to Setup on-premise Nano Server.

 

Nano Server is a pared down headless version of Windows Server that Microsoft has been developing under the code name Tuva. It is designed to run services and to be managed completely remotely. Microsoft describes Nano Server as “a purpose-built operating system designed to run born-in-the-cloud applications and containers.”

To install Nano server, first you have to download Windows Server 2016 TP5. Nano Server installation was kept inside this and you have to create a Powershell Script to create the Nano Server.  The script you can Download from TechNet Gallery.  Once you have those two, you can start the Nano Server installation.

First mount the Windows Server 2016 TP5 ISO and copy and paste the Nano folder from there.

image

Then you have the all required things with you, to create the Nano server. First I’ll copy and paste the script below,

.\New-NanoServerVHD.ps1 `
-ServerISO 'H:\NanoSVR\RELEASE_SERVER_OEMRET_X64FRE_EN-US.ISO' `
-DestVHD H:\NanoSVR\NanoServer07.vhd `
-ComputerName NANOTEST07 `
-AdministratorPassword 'Password@123' `
-Packages 'Storage','OEM-Drivers','Guest','FailoverCluster' `
-IPAddress '192.168.1.55'

Save the downloaded PS Script into a Folder.

In Server ISO, you can point the correct location of the Windows 2016 ISO file.

DestVHD, is the location where you want to save your new Nano VHD file.

Then you can give a name for the VHD,Administration password, IP address and the required Packages. those are in a separate folder under Nano server and you can install them on demand.

image

Under Packages you can select the packages that you want to install.

Run the Poweshell as a administrator and point the executing location. In my case it’s already downloaded PS script folder.

image

Then run the customized script to create the Nano server VHD.

image

Once you run the script, Script warning will be displayed. Click run once.

image

Then PS script will create the VHD for you. this will take few minutes and in the background you can  see the  and the success percentage of the job

image

Once this finished, you will be able to see your newly created Nano VHD in the mentioned destination.

image

Now you can add this in to your Hyper-V Manager and work.

image

In next post I’ll show the steps to attached this Nano server in to Hyper-V Manager.