Powershell and Set-VHD


so i'm learning powershell amongst other things work. 

but 1 thing has caused me grind stop face set-vhd worked me no more week ago. last day or 2 literally stopped working , have no idea why.

the error gives me follows:

set-vhd : term 'set-vhd' not recognized name of cmdlet, function, script file, or operable program. check spelling of name, or if path included, verify that 

the path correct , try again.

at path.ps1:20 char:1

+ set-vhd -path "path" -parentpa ...

+ ~~~~~~~

    + categoryinfo          : objectnotfound: (set-vhd:string) [], commandnotfoundexception

    + fullyqualifiederrorid : commandnotfoundexception

file paths are definitely correct.

can me understand why stop working out of blue?




if don't have hyper-v module it'll fail, or if you're running powershell 2.0 , haven't run:

import-module hyper-v

before running command.


hope helps! jason



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group