<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>mailstore-notes.dwlab.me - MailStoreCmd</title>
    <link rel="self" type="application/atom+xml" href="https://mailstore-notes.dwlab.me/tags/mailstorecmd/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2023-01-01T00:00:00+00:00</updated>
    <id>https://mailstore-notes.dwlab.me/tags/mailstorecmd/atom.xml</id>
    <entry xml:lang="en">
        <title>Use SetUserPrivilegesOnFolder from MailStoreCmd.exe</title>
        <published>2023-01-01T00:00:00+00:00</published>
        <updated>2023-01-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              dave
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mailstore-notes.dwlab.me/articles/use-setuserprivilegesonfolder-from-mailstorecmd-exe/"/>
        <id>https://mailstore-notes.dwlab.me/articles/use-setuserprivilegesonfolder-from-mailstorecmd-exe/</id>
        
        <content type="html" xml:base="https://mailstore-notes.dwlab.me/articles/use-setuserprivilegesonfolder-from-mailstorecmd-exe/">&lt;p&gt;To use &lt;em&gt;MailStoreCmd.exe&lt;&#x2F;em&gt; we need to know a bit about the environment, but we can use MailStore Client to generate a working command line for us:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go to the &lt;em&gt;Archive E-mail&lt;&#x2F;em&gt; panel&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;See if you have any &lt;em&gt;EML&lt;&#x2F;em&gt; or &lt;em&gt;PST&lt;&#x2F;em&gt; or &lt;em&gt;File System&lt;&#x2F;em&gt; profiles that already exist and skip the next step.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;If you don&#x27;t have a profile you can use, create a &lt;em&gt;E-mail Files&lt;&#x2F;em&gt; --&amp;gt; &lt;em&gt;EML&lt;&#x2F;em&gt; profile, set the path to something that doesn&#x27;t exist (&quot;&lt;em&gt;C:\does-not-exist&lt;&#x2F;em&gt;&quot;), leave the other options at their defaults until you get the checkbox to run the profile now and uncheck this. Save the profile.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Now that you have a profile we can use, right click on it, choose &lt;em&gt;Create task on...&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Press the &lt;em&gt;Copy CMD Line&lt;&#x2F;em&gt; button at the bottom.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Paste into Notepad.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Mine looks like this:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c import-execute --id=3 --user=&quot;admin&quot; --verbose&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Cancel creating a scheduled task, we don&#x27;t need it, but this is a shortcut to generating a command line and setting the credentials. Once we have the command line above you can delete the profile you created, we don&#x27;t need it anymore.&lt;&#x2F;p&gt;
&lt;p&gt;Use your command rather than mine as it is personalized to your environment. We need everything up to the -c, this is where we specify the command we want to run, so for example with a base command line:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;We can &lt;em&gt;GetServerInfo&lt;&#x2F;em&gt; to prove we are connected:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The result:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;GetServerInfo
Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************

{
  &amp;quot;version&amp;quot;: &amp;quot;22.3.0.21002&amp;quot;,
  &amp;quot;machineName&amp;quot;: &amp;quot;EXCHANGEDC&amp;quot;
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we will retrieve the current status of the user:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c GetUserInfo --userName=&quot;frank.clark&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The result:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************

{
  &amp;quot;userName&amp;quot;: &amp;quot;frank.clark&amp;quot;,
  &amp;quot;fullName&amp;quot;: &amp;quot;Frank Clark&amp;quot;,
  &amp;quot;distinguishedName&amp;quot;: &amp;quot;CN=Frank Clark,OU=Seattle,DC=example, DC=com&amp;quot;,
  &amp;quot;authentication&amp;quot;: &amp;quot;directoryServices&amp;quot;,
  &amp;quot;emailAddresses&amp;quot;: [
    &amp;quot;frank.clark@example.com&amp;quot;
  ],
  &amp;quot;pop3UserNames&amp;quot;: [],
  &amp;quot;privileges&amp;quot;: [
    &amp;quot;login&amp;quot;
  ],
  &amp;quot;privilegesOnFolders&amp;quot;: [
    {
      &amp;quot;folder&amp;quot;: &amp;quot;frank.clark&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;abby.hernandez&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;alexis.page&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    }
  ]
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we will &lt;em&gt;SetUserPrivilegesOnFolder&lt;&#x2F;em&gt; to apply &lt;em&gt;&quot;read, write&quot;&lt;&#x2F;em&gt;:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c SetUserPrivilegesOnFolder --userName=&quot;frank.clark&quot; --folder=&quot;abby.hernandez&quot; --privileges=&quot;read, write&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;And the result:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And finally we can check the results with the previous &lt;em&gt;GetUserInfo&lt;&#x2F;em&gt; command:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;&quot;C:\Program Files (x86)\MailStore\MailStore Server\MailStoreCmd.exe&quot; --h=&quot;localhost&quot; --pkv3=&quot;161F2004CB4B5735038E49F3C611D34349180BA9&quot; --cred=&quot;admin@127.0.0.1&quot; -c GetUserInfo --userName=&quot;frank.clark&quot;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;Connecting...
Disconnecting...

*******************************************************************

      MailStore Command Line Client

      Version 22.3.0.21002

*******************************************************************

{
  &amp;quot;userName&amp;quot;: &amp;quot;frank.clark&amp;quot;,
  &amp;quot;fullName&amp;quot;: &amp;quot;Frank Clark&amp;quot;,
  &amp;quot;distinguishedName&amp;quot;: &amp;quot;CN=Frank Clark,OU=Seattle,DC=example, DC=com&amp;quot;,
  &amp;quot;authentication&amp;quot;: &amp;quot;directoryServices&amp;quot;,
  &amp;quot;emailAddresses&amp;quot;: [
    &amp;quot;frank.clark@example.com&amp;quot;
  ],
  &amp;quot;pop3UserNames&amp;quot;: [],
  &amp;quot;privileges&amp;quot;: [
    &amp;quot;login&amp;quot;
  ],
  &amp;quot;privilegesOnFolders&amp;quot;: [
    {
      &amp;quot;folder&amp;quot;: &amp;quot;frank.clark&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;alexis.page&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;
      ]
    },
    {
      &amp;quot;folder&amp;quot;: &amp;quot;abby.hernandez&amp;quot;,
      &amp;quot;privileges&amp;quot;: [
        &amp;quot;read&amp;quot;,
        &amp;quot;write&amp;quot;
      ]
    }
  ]
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        
    </entry>
</feed>
