---
title: "Discussion on \"Importing Hyper-V VMs with Enabled TPM\" | Hashnode"
description: "Discussion on \"Importing Hyper-V VMs with Enabled TPM\". learn how to get imported virtual machines running that have trusted platform module enabled in Hyper-V"
url: "https://hashnode.com/posts/importing-hyper-v-vms-with-enabled-tpm/62e8cb703f084d032011c445"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Importing Hyper-V VMs with Enabled TPM](https://switchitup.tech/importing-hyper-v-vms-with-enabled-tpm?utm_source=hashnode&utm_medium=feed)

learn how to get imported virtual machines running that have trusted platform module enabled in Hyper-V

Aug 2, 2022 · 5 min read · switchitup.tech  
Read the article

-   [#windows](https://hashnode.com/tag/windows)
-   [#windows-server](https://hashnode.com/tag/windows-server)
-   [#hyper-v](https://hashnode.com/tag/hyper-v)
-   [#certificates](https://hashnode.com/tag/certificates)
-   [#virtual-machine](https://hashnode.com/tag/virtual-machine)

## Written by

[Ash Roberts](https://hashnode.com/@SwitchITUp)

@SwitchITUp · UK

  
[View profile](https://hashnode.com/@SwitchITUp)

The Varied Life of a Tech Consultant

I am a technical consultant for a fast growing MSP. Due to the nature of my job I have quite a range of real world experience focusing around server/cloud(Azure) infrastructures, network design, installation and configuration all across multiple vendors such as Microsoft/Cisco/HP Aruba/FortiNet to name a few. All which, I am trying to share with yourselves. Whether you are new to the IT landscape or a veteran I hope there is something for you as my content grows. Currently hold certifications in following: Aruba switching CCNA route and switch CCNA cyber ops CCNA security MCSA windows 10 MCSA server 2016 MCSE core infrastructure Azure Administrator (az104) O365 administrator expert (ms100/101) Modern desktop administrator (md100/101) Hybrid server administrator (az800/801) Azure virtual Desktop specialty (AZ140) So, join me on my learning journey as well as work experience!

## Responses 1

Markdown supported · ⌘↵ to post

[Casey Kourofsky](https://hashnode.com/@CKour)

[Nov 16, 2022](https://hashnode.com/posts/importing-hyper-v-vms-with-enabled-tpm/62e8cb703f084d032011c445/comment/637515afe1d53a5fd290e856)

Do you know how you could 're-create' those certificates from scratch? I (very stupidly) exported mine without the keys - then proceeded to delete them.

[Ash Roberts](https://hashnode.com/@SwitchITUp)

[Nov 16, 2022](https://hashnode.com/posts/importing-hyper-v-vms-with-enabled-tpm/62e8cb703f084d032011c445/comment/637515afe1d53a5fd290e856#reply-637534fe2cab3a64dcb6c335)

Sorry to be the bearer of bad news but if you lose the certificates, you're never getting back into the machine unfortunately. Unless you have a system state backup of the host to roll back to.

more info here: [altaro.com/hyper-v/hyper-v-2016-shielded-virtual-…](https://www.altaro.com/hyper-v/hyper-v-2016-shielded-virtual-machines-stand-alone-hosts/)

[Casey Kourofsky](https://hashnode.com/@CKour)

[Nov 17, 2022](https://hashnode.com/posts/importing-hyper-v-vms-with-enabled-tpm/62e8cb703f084d032011c445/comment/637515afe1d53a5fd290e856#reply-63769848abae2b7516a86942)

[Ash Roberts](https://hashnode.com/@SwitchITUp) So - thankfully, I had taken steps to make sure that I COULD get back into my VM. Prior to removing the certificates, I had unencrypted the drives, turned off TPM and tested rebooting successfully.

What my REAL problem turned out to be, is that I was trying to do this process on a host running server CORE - which will not allow you to remotely export the certificates with a private key. I had to find PowerShell commands to allow me to do this whole export/import process from the hosts.

I also found that I could re-create my certificates from PowerShell as well. In case anyone else finds this useful, what I did is below.

I found the existing guardian: Get-HgsGuardian

I then removed it: Remove-HgsGuardian -Name "UntrustedGuardian"

And finally, I recreated the Guardian with the certificates: New-HgsGuardian -Name "UntrustedGuardian" -Generatecertificates

[Ash Roberts](https://hashnode.com/@SwitchITUp)

[Nov 20, 2022](https://hashnode.com/posts/importing-hyper-v-vms-with-enabled-tpm/62e8cb703f084d032011c445/comment/637515afe1d53a5fd290e856#reply-637a5ca6b1e7ce958945582e)

[Casey Kourofsky](https://hashnode.com/@CKour) oh nice, thanks for the insight :)
