diff --git a/drush/default_content.drush.inc b/drush/default_content.drush.inc
index 6c4ace0..1f54af9 100644
--- a/drush/default_content.drush.inc
+++ b/drush/default_content.drush.inc
@@ -5,6 +5,8 @@
  * Drush integration for the default_content module.
  */
 
+use Drupal\Core\Session\UserSession;
+
 /**
  * Implements hook_drush_command().
  */
@@ -56,7 +58,10 @@ function default_content_drush_command() {
 function drush_default_content_export($entity_type_id, $entity_id) {
   /** @var \Drupal\default_content\DefaultContentExporterInterface $exporter */
   $exporter = \Drupal::service('default_content.exporter');
+  $switcher = \Drupal::service('account_switcher');
+  $switcher->switchTo(new UserSession(['uid' => 1]));
   $export = $exporter->exportContent($entity_type_id, $entity_id);
+  $switcher->switchBack();
 
   if ($file = drush_get_option('file')) {
     file_put_contents($file, $export);
@@ -77,7 +82,9 @@ function drush_default_content_export($entity_type_id, $entity_id) {
 function drush_default_content_export_references($entity_type_id, $entity_id = NULL) {
   /** @var \Drupal\default_content\DefaultContentExporterInterface $exporter */
   $exporter = \Drupal::service('default_content.exporter');
+  $switcher = \Drupal::service('account_switcher');
 
+  $switcher->switchTo(new UserSession(['uid' => 1]));
   $folder = drush_get_option('folder', '.');
   if (is_null($entity_id)) {
     $entities = \Drupal::entityQuery($entity_type_id)->execute();
@@ -90,6 +97,7 @@ function drush_default_content_export_references($entity_type_id, $entity_id = N
     $serialized_by_type = $exporter->exportContentWithReferences($entity_type_id, $entity_id);
     $exporter->writeDefaultContent($serialized_by_type, $folder);
   }
+  $switcher->switchBack();
 }
 
 /**
@@ -101,7 +109,10 @@ function drush_default_content_export_references($entity_type_id, $entity_id = N
 function drush_default_content_export_module($module_name) {
   /** @var \Drupal\default_content\DefaultContentExporterInterface $exporter */
   $exporter = \Drupal::service('default_content.exporter');
+  $switcher = \Drupal::service('account_switcher');
+  $switcher->switchTo(new UserSession(['uid' => 1]));
   $serialized_by_type = $exporter->exportModuleContent($module_name);
+  $switcher->switchBack();
   $module_folder = \Drupal::moduleHandler()
     ->getModule($module_name)
     ->getPath() . '/content';
