How To Activate Windows 10 / Server 2016 Through Command Line

If you are having problems activating Windows 10, Server 2016, Windows 8, or Server 2012 one of these three solutions below should get you through:

This is handy if the GUI won’t start and you want to skip some steps to get it to work.

  1. click START (gets you to the tiles)4-no-change-product-key-link-missing-dns-error-0x8007232b-dns-error-activate
  2. type RUN
  3. type slui 3 and press ENTER
    1. yes, SLUI: which stands for SOFTWARE LICENSING USER INTERFACE
      1. SLUI 1 brings up the activation status window
      2. SLUI 2 brings up the activation window
      3. SLUI 3 brings up the CHANGE PRODUCT KEY window
      4. SLUI 4 brings up the CALL MICROSOFT & MANUALLY ACTIVATE window
  4. Type in your product key
  5. Have a nice day.

  1. Launch a CMD as an Administratorcommand-line-to-activate-windows-slmgr-slui
  2. Type: slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
  3. Press Enter

If your key is valid and you are connected to the internet, it should activate within a second or two.

In Canada and the US, call the support line directly at 1 800-936-4900, otherwise, use this table of Microsoft Activation Phone Numbers to do the deed.

You also might find some of our previous posts on activation problems to be helpful:  urtech.ca/?s=activation

P2V – anolamie e soluzioni

https://blog.workinghardinit.work/2016/09/08/disk2vhd-on-a-generation-2-vm-results-in-an-unbootable-vhdx/

Disk2VHD on a Generation 2 VM results in an unbootable VHDX

Most people who have been in IT for a while will know the Windows  Sysinternals tools and most certainly the small but brilliant Disk2VHD tool we can use for Physical To Virtual (P2V) and Virtual to Virtual (V2V) conversions. It’s free, it’s good and it’s trustworthy as it’s made available by Microsoft.

For legacy systems, whether they are physical  with IDE/SATA/SAS controllers or virtual with an IDE generation 1 VMS thing normally go smooth.

image

But sometimes you have hiccups. One of those is when you do a V2V of a generation 2 virtual machine using Disk2VHD. It’s a small issue, when you create a new generation 2 VM and point it to the OS vhdx it just won’t boot. That’s pretty annoying.

image

Why do a V2V in such a case you might ask. Well, sometimes is the only or fasted way to get out of pickle with a ton of phantom, non-removable checkpoints you’ve gotten yourself into.

But back to the real subject, how to fix this. What we need to do is repair the boot partition. Well recreate it actually as when you look at it after the conversion you’ll notice is RAW. That’s no good. So let’s walk through how to fix a vdhx that your created from a source generation 2 Hyper-V vm via Disk2VHD.

First of all create a new generation 2 VM that we’ll use with our new VHDX we created using Disk2VHD. Don’t create a new vdhx but select to use an existing one and point it to the one we just created with Disk2VHD. Rename it if needed to something more suitable.

Don’t boot the VM but add a DVD and attach the Windows Server ISO of the version your vhdx contains to the DVD.

image

Move the DVD to the top of the boot order I firmware.

image

The VM will boot to the DVD when you hit a key.

Select your language and keyboard layoout when asked and the don’t install or upgrade the OS but boot

image

image

 

image

 

 

image

 

image

Type diskpart and  list the disks. Select the disk we need (the OS disk, the only one here) and list the volumes. You can see that volume 3 off 99MB is RAW. That’s not supposed to be that way. So let’s fix this by creating boot loader directory structure, repair the boot record by creating the boot sector & copy the needed boot files into it.

Type:

select volume 3

assign drive letter L:

FORMAT FS=FAT32 LABEL=”BOOT”

That’s it we can now us that 99MB volume to make our disk bootable to windows again.  Type Exit to leave diskpart.

image

So now we have a formatted boot partition we can create the need folder structure and fix the boot record and configure our UEFI bootloader

Switch to the L: volume

create efi\microsoft\boot folder structure for the bootloader as show below with the md command(make directory)

Type: bootrec /fixboot to create the bootrecord

Type: bcdboot C:\Windows  /l en-us /s l: /f ALL

This creates the BCD store & copies the boot files from the windows system directory

You can create all the directories in one go by doing
mkdir -p L:/efi/microsoft/boot/

 image

Just click Continue to exit and continue to Windows Server 2012R2

image

.. and voila, your new VM has now booted.

image

Now it’s a matter of cleaning up the remnants of the original VMs hardware such as the NIC and maybe some other devices. The NIC is very important as it will have any static TCP/IP configuration you might want to assign tied to it which mean you can’t reuse it for your new VM. So, the 1st thing to do is uninstall the old network adapters from device managers, you’ll see them when you select “show hidden devices” in the view menu.

Good luck!

Allow DNS Suffix Appending to Unqualified Multi-Label Name Queries

fonte: http://www.computerstepbystep.com/allow-dns-suffix-appending-to-unqualified-multi-label-name-queries.html

Description:

Specifies whether the computers to which this setting is applied may attach suffixes to an unqualified
multi-label name before sending subsequent DNS queries, if the original name query fails.

A name containing dots, but not dot-terminated, is called an unqualified multi-label name, for example
“server.corp”. A fully qualified name would have a terminating dot, for example “server.corp.contoso.com.”.

If you enable this setting, suffixes are allowed to be appended to an unqualified multi-label name, if the
original name query fails. For example, an unqualified multi-label name query for “server.corp” will be queried
by the DNS Client first. If the query succeeds, the response is returned to the client. If the query fails, the
unqualified multi-label name is appended with DNS Suffixes configured for the computer for queries. These
suffixes can be derived from a combination of the local DNS Client’s primary domain suffix, a
connection-specific domain suffix and/or DNS Suffix Search List.

For example, if the local DNS Client receives a query for “server.corp”, and a primary domain suffix is
configured as “contoso.com”, with this setting the DNS Client will send a query for “server.corp.contoso.com.”
if the original name query for “server.corp” fails.

If you disable this setting, no suffixes are appended to unqualified multi-label name queries if the original
name query fails.

If you do not configure this setting, computers will use their local DNS Client configuration to determine the
query behavior for unqualified multi-label names.

Supported on: At least Windows Vista.
Allow DNS Suffix Appending to Unqualified
Multi-Label Name Queries

DescriptionGpeditRegeditCMDBack

VBScriptPowerShell Script

Gpedit:

Please perform the following steps:

Please go to Pearl button (Start) and click on the Search programs and files
For more information about the change from Start to Pearl button click here

Type gpedit.msc and press Enter

In the Group Policy window please navigate to Computer Configuration> Administrative Templates>
Network > DNS Client and open Allow DNS Suffix Appending to Unqualified Multi-Label Name Queries.
Not Configured > is the Default state
Enabled> apply this GPO
Disabled> this GPO will not be applied

To finish press ok button and close Group Policy window.

DescriptionGpeditRegeditCMDUpBack

VBScript

Type regedit and press ok

Please confirm User Account Control pop-up

Microsoft official disclaimer

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by
using another method. These problems might require that you reinstall the operating system. Microsoft
cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Note: This registry key is created by Group Policy when this GPO is Enable or Disable. The GPO Default state
is Not Configured> this registry entry is not present.

Please navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient and
locate
AppendToMultiLabelName registry key
Regedit:          

Please perform the following steps:

Please go to Pearl button (Start) and click on the Search programs and files
For more information about the change from Start to Pearl button click here

DescriptionGpeditRegeditCMDUpBack

VBScript

Double click on AppendToMultiLabelName and edit the value:

To Enable:
Change the data value with 1

To Disable:
Change the data value with 0

To finish press ok button and close Registry Editor window

Note: Manual editing of this registry key will not be reflected in Group Policy. If you modify this GPO from
Group Policy this registry key will be rewritten.

DescriptionGpeditRegeditBackCMD

VBScriptUp

Type cmd, right click on cmd icon under the Programs and click on Run as administrator

Please confirm User Account Control pop-up

Please select, right and copy a registry key from below, then right click on command prompt window
, select Paste and press Enter

Enabled:
REG add “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient” /v AppendToMultiLabelName /t REG_DWORD /d 1 /f

Disabled:
REG add “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient” /v AppendToMultiLabelName /t REG_DWORD /d 0 /f

Not Configured:
REG DELETE “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient” /v AppendToMultiLabelName /f

Note: Manual editing of this registry key will not be reflected in Group Policy. If you modify this GPO from
Group Policy this registry key will be rewritten.
CMD:

Please perform the following steps:

Please go to Pearl button (Start) and click on the Search programs and files
For more information about the change from Start to Pearl button click here

DescriptionGpeditRegeditBackCMD

VBScriptUp

VBScript:

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = “.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & _
strComputer & “\root\default:StdRegProv”)

strKeyPath = “SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strValueName = “AppendToMultiLabelName”
‘Enabled
dwValue = 1
‘Disabled
‘dwValue = 0
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
‘Not Configured
‘oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName

DescriptionGpeditRegeditBackCMD

VBScriptUp

PowerShell Script :

Enabled\Disabled

$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft”
If(Test-Path ($RegKey + “\Windows NT”))
{
 $RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT”
 If(Test-Path ($RegKey + “\DNSClient”))
 {
   $RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
   ##Enabled
   New-ItemProperty –path $RegKey –name AppendToMultiLabelName –value 1 –PropertyType DWord –Force
   ##Disabled
   ##New-ItemProperty –path $RegKey –name AppendToMultiLabelName –value 0 –PropertyType DWord –Force
 }
 else
 {
   New-Item –path $RegKey –name Service
   $RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
   ##Enabled
   New-ItemProperty –path $RegKey –name AppendToMultiLabelName –value 1 –PropertyType DWord
   ##Disabled
   ##New-ItemProperty –path $RegKey –name AppendToMultiLabelName –value 0 –PropertyType DWord
 }
}
else
{
 New-Item –path $RegKey –name Windows NT
 $RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT”
 New-Item –path $RegKey –name Service
 $RegKey = “HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient”
 ##Enabled
 New-ItemProperty –path $RegKey –name AppendToMultiLabelName –value 1 –PropertyType DWord
 ##Disabled
 ##New-ItemProperty –path $RegKey –name AppendToMultiLabelName –value 0 –PropertyType DWord
}

Not Configured

$RegKey = “HKLM:\SOFTWARE\Policies\Microsoft”
Remove-ItemProperty –Path($RegKey + “\Windows NT\DNSClient”) –name AppendToMultiLabelName
If( (Get-Item –Path($RegKey + “\Windows NT\DNSClient”)).ValueCount –eq 0 –and (Get-Item –Path($RegKey + “\Windows NT\DNSClient”)).SubKeyCount –eq 0)
{
 Remove-Item –Path($RegKey + “\Windows NT\DNSClient”)
 If( (Get-Item –Path($RegKey + “\Windows NT”)).ValueCount –eq 0 –and (Get-Item –Path($RegKey + “\Windows NT”)).SubKeyCount –eq 0)
 {
   Remove-Item –Path($RegKey + “\Windows NT”)
 }
}

Come risolvere l’errore L’app è stata bloccata a scopo di protezione in Windows 10

fonte: http://www.windowsblogitalia.com/2016/01/errore-lapp-e-stata-bloccata-a-scopo-di-protezione/

Microsoft ha deciso di migliorare la sicurezza impedendo ai programmi non sicuri e verificati di essere installati in Windows 10. Può capitare, però, che vengano riconosciuti dei falsi positivi e che l’utente non possa installare l’applicazione; in tal caso viene restituito l’errore L’app è stata bloccata a scopo di protezione. Vediamo come risolvere questo problema.

METODO 1: PROMPT DEI COMANDI

Una prima soluzione temporanea al blocco delle app a scopo di protezione può essere quella di ricorrere al Prompt dei comandi:

  1. Digitate nel box di ricerca cmd (o in alternativa Prompt dei comandi), cliccate con il tasto destro del mouse e selezionateEsegui come amministratore.
  2. Alla richiesta di Controllo dell’account utente cliccate .
  3. Digitate il percorso dove è disponibile il setup dell’applicazione (nel nostro caso abbiamo sul Desktop il setup WBI.exe; nel Prompt dei comandi digiteremo C:\Users\biagi\Desktop\WBI.exe) e premete Invio.
  4. Et voilà: l’app verrà eseguita correttamente.

METODO 2: ACCOUNT ADMINISTRATOR

Per risolvere questo problema delle app dovete ricorrere all’account Administrator, che ha dei privilegi maggiori rispetto al classico account da amministratore:

  1. Digitate nel box di ricerca cmd (o in alternativa Prompt dei comandi), cliccate con il tasto destro del mouse e selezionateEsegui come amministratore.
  2. Alla richiesta di Controllo dell’account utente cliccate .
  3. Digitate la seguente stringa e premete Invio: net user administrator /active:yes
    Se l’operazione andrà a buon fine, comparirà la scritta Esecuzione comando riuscita.
  4. Disconnettetevi dall’account.
  5. Accedete al nuovo account Administrator.
  6.  Grazie all’Esplora file, individuate l’eseguibile (nel nostro caso sarà presente in C:\Users\biagi\Desktop\WBI.exe) ed installate il programma.
  7. Disconnettetevi dall’account Administrator e rientrate nel vostro account.
  8. Disattivate l’account Administrator digitando in un Prompt dei comandi con privilegi di amministratore la seguente stringa: net user administrator /active:no

Il problema delle app bloccate è stato risolto. Vi è mai capitato di incorrere in questa situazione? Avete risolto il problema? Fatecelo sapere nei commenti.

Articolo di Windows Blog Italia
Fonte | WinAero