Sunday 31 May 2020

VMWare Cannot Join to Domain - Domain in Unreachable

When trying to join to a domain in VMware Workstation, domain in unreachable. To resolve this:

1. Open cmd as an administrator
2. Execute the following command: bcdedit /set hypervisorlaunchtype off
3. Restart the host
4. Executing the following command should display the domain names: resolve-dnsname <domain-name>


Saturday 30 May 2020

Building a Windows Server Core from a Full GUI Install

The Server Core installation installs the operating system in non-GUI with minimal footprint and helps to secure the server running Hyper-V role. The benefits of using core server are:

  • Reduced attack surface
  • Reduced maintenance
  • Consume fewer hardware resources
  • Increased stability due to fewer running applications
  1. Clean install a full Windows Server
  2. Open Powershell as Administrator
  3. Execute the following commands:

    Import-Module ServerManager
    Uninstall-WindowsFeature Server-Gui-Shell-Restart
    Uninstall-WindowsfeatureServer-Gui-Mgmt-Infra-Restart

    Powershell C:\>sconfig.cmd     
    # configure the server

VMWare Unable to run a VM due to Device/Credential Guard

VMware Workstation and Device/Credential Guard are not compatible. VMware Workstation can be run after disabling Device/Credential Guard.

1. Open cmd as an administrator
2. Execute the following command: bcdedit /set hypervisorlaunchtype off
3. Restart the host

Wednesday 27 May 2020

Bring Data to HTML using D3 JS

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>HTML Data</title>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/d3/5.16.0/d3.js'></script>
</head>
<body>
  <script>
  function GetData() {
 
fetch('https://jsonplaceholder.typicode.com/todos')
  .then(response => response.json())
  .then(json=> d3.select("div")
.selectAll("p")
.data(json)
.enter()
.append("p")
.text(d => d.title));
  }
  GetData();
  </script>
 
  <h1>Hello World</h1>
  <div></div>
</body>
</html>

Tuesday 26 May 2020

Bring Data to HTML using XMLHttpRequest

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>

<script>
  function GetData() {
  var req = new XMLHttpRequest();
  req.open ('GET','https://jsonplaceholder.typicode.com/posts');
  req.onload = function () {
    var data = JSON.parse(req.responseText);
    RenderHtml (data);
}
  req.send();
}

function RenderHtml(data) {
console.log (data)
var dt = "";

for (i=0; i<data.length; i++) {
  dt += "<p>" + data[i].title + "</p>";
    }
  document.getElementById ('dataTable').innerHTML = dt;
}
</script>
</head>

<body>
<div id="dataTable">Nothing yet...</div>
<button onclick="GetData()">Get Data</button>
</body>
</html>

Tuesday 5 May 2020

Auto reconnect Blazor Serverside

Add the following method to _Host.cshtml file:

<script>
   Blazor.defaultReconnectionHandler._reconnectCallback = function(d) {
        document.location.reload(); 
   }
</script>

Upgrade Windows 11 Home to Windows 11 Pro

Disable internet connection (Wi-Fi, Internet, etc.) Change the product key using the following Generic product key:                     VK7J...