We're using the following command to export our DHCP server to another server (both W2K8R2):
Import-Module ServerManager
Add-WindowsFeature Migration
Add-pssnapin Microsoft.Windows.ServerManager.Migration
Stop-Service DHCPserver
Export-SmigServerSetting –FeatureID dhcp –User Disabled –Path “C:\temp”
These commands are in a document that we're using to migrate all of our sites' DHCP servers from one host to another. If I copy/paste these commands and hit enter, I get the following error on the last line (Export-SmigServerSetting):
Cannot bind parameter 'Feature'. Cannot convert the "-FeatureID " value of type "System.String" to type "Microsoft.Wind ows.ServerManager.Migration.Commands.Feature". + CategoryInfo : + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.Windows.ServerManager.Migration.Commands.Export SvrMigSettingCommand
I've tried wrapping "dhcp" in double-quotes, single-quotes, and no quotes and it still throws the same error about being unable to conver a string to the proper object when pasted from clipboard.
However, if I literally retype this command identically as it's listed above, it works like a champ; ...apparently able to convert the value from a string perfectly... Can anyone explain that?