Set DNS source to DHCP on Windows

    CLI Example:

    .. code-block:: bash

        salt -G 'os_family:Windows' ip.get_default_gateway

def get_default_gateway():
    '''
    Set DNS source to DHCP on Windows

    CLI Example:

    .. code-block:: bash

        salt -G 'os_family:Windows' ip.get_default_gateway
    '''
    try:
        return next(iter(
            x.split()[-1] for x in __salt__['cmd.run'](
                ['netsh', 'interface', 'ip', 'show', 'config'],
                python_shell=False
            ).splitlines()
            if 'Default Gateway:' in x
        ))
    except StopIteration:
        raise CommandExecutionError('Unable to find default gateway')