<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_config():
    '''
    Get the current DSC Configuration

    Returns:
        dict: A dictionary representing the DSC Configuration on the machine

    Raises:
        CommandExecutionError: On failure

    CLI Example:

    .. code-block:: bash

        salt '*' dsc.get_config
    '''
    cmd = 'Get-DscConfiguration | Select-Object * -ExcludeProperty Cim*'

    try:
        raw_config = _pshell(cmd, ignore_retcode=True)
    except CommandExecutionError as exc:
        if 'Current configuration does not exist' in exc.info['stderr']:
            raise CommandExecutionError('Not Configured')
        raise

    config = dict()
    if raw_config:
        # Get DSC Configuration Name
        if 'ConfigurationName' in raw_config[0]:
            config[raw_config[0]['ConfigurationName']] = {}
        # Add all DSC Configurations by ResourceId
        for item in raw_config:
            config[item['ConfigurationName']][item['ResourceId']] = {}
            for key in item:
                if key not in ['ConfigurationName', 'ResourceId']:
                    config[item['ConfigurationName']][item['ResourceId']][key] = item[key]

    return config