question

ShahinMortazave-1426 avatar image
0 Votes"
ShahinMortazave-1426 asked XiaoweiHe-MSFT answered

powershell module

Hi,
We have a 2 nodes server 2016 hyper-v cluster that uses a shated storage.
We have an issue with one of the VMs and we have have to run some powershell commands, but commands returen an error and MS support suggest to run
this cmdlet

Remove-Module Hyper-V
and
Import-Module -Name Hyper-V -RequiredVersion 1.1


I did check and there are no scripts on both nodes that use the current hyper-v module.

This cluster is in a production environment and would like to know removing the current powershell module will not cause any problem at cluster level.
any suggestion on removing the module?

windows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaoweiHe-MSFT avatar image
0 Votes"
XiaoweiHe-MSFT answered

Hi,

Remove the Powershell module will not affect the cluster function. The Powershell module just management tools.

Thanks for your time!
Best Regards,
Anne


If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShahinMortazave-1426 avatar image
0 Votes"
ShahinMortazave-1426 answered

Hi @XiaoweiHe-MSFT Thank you for your reply and sorry for late response from me..
Just one more question,

Before remove the Module I did check the installed module and saw this:

83568-image.png

but when tried to Remove-Module Hyper-V on the same cluster node get this error! why the remove cmdlet failed?

83619-image.png



image.png (67.6 KiB)
image.png (54.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaoweiHe-MSFT avatar image
0 Votes"
XiaoweiHe-MSFT answered

Hi,

"Get-Module -Name Hyper-V -ListAvailable" means the module you could install, this means you haven't installed the modules.

So, according to your screenshot, you didn't import the Hyper V module, so when you remove it you get the error message.

Thanks for your time!
Best Regards,
Anne


If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.