I am trying to automate some tasks for new VMs in Hyper-V. I came across an article talking about this commandlet to configure static IP to a VM even when It is off. I am using it as follows
when I run it I get
Set-VMNetworkConfiguration: The term ‘Set-VMNetworkConfiguration’ is not recognized as a name of a cmdlet,
however, I saw somewhere on MS site that this is a commandletand also I visited a couple of websites like
where it is indicated Get-VMNetworkAdapter -VMName MaMachineVirtuelle | Set-VMNetworkConfiguration -IPAddress 192.168.1.2 00 ...............
Thanks for your help
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
( !! Sometimes the preformatted text button hides behind the settings gear symbol. )
The name of a command in PowerShell is “cmdlet” - no commandlet!!
The cmdlet Set-VMNetworkConfiguration is part of the Hyper-V PowerShell module. Do you have this module installed on the machine where you try to run this command?
And BTW: This site is in english. So there are probably very very few people speaking french. So the link you posted is not that helpful.
Olaf, I have done for PS code but forgot for error messages I will do now. Regarding the french url, I just wanted to show the statement where he uses the cmdlet