Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |

Tuesday, December 16, 2014

Sharepoint administrator interview questions with answers:MMS

  1. What is the “Managed metadata” column and use of it?
  2. What is the “Enterprise Keyword” column and use of it?
  3. What is the “TaxonomyHiddenList” list and use of it?
  4. Enterprise keyword Vs Managed Metadata?
  5. How to check enterprise keyword option is enabled? Means I cannot go to the each list/library level and confirm enabled/disabled?
  6. How to disable the Enterprise keywords from the list/library?
  7. Is it possible to stop creating new keywords when add new values to the enterprise keyword column in list/library?
  8. Error: Failed to create a term set: A default managed metadata service connection hasn’t been specified.
  9. Error: The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.
  10. Error: Users were unable to view the enterprise keywords in sharepoint list/library?
  11. Error: Users can’t see the values of the Managed Metadata Columns for list items?
  12. Error: The site doesn’t contain a default term keywords term store?
  13. Error: "The default term store for this site cannot be identified."
Am preparing answers for the above questions. Will post you soon.

Thanks,
Sasi kumar Reddy

Tuesday, December 2, 2014

Send Meeting Request in SharePoint

By using the below code, we can send the invite meeting request to any.
//To send Calder Meeting Event request
        private void sendMeetingRequest(DateTime startTime, DateTime endTime, string candidateEmail, string status, string location)
        {
            try
            {
                //create the credentials
                NetworkCredential cred = new NetworkCredential(ConfigurationManager.AppSettings["userName"], ConfigurationManager.AppSettings["password"]);

                //create the smtp client...these settings are for gmail
                SmtpClient sc = new SmtpClient(ConfigurationManager.AppSettings["SMPTPServerName"], (Convert.ToInt32(ConfigurationManager.AppSettings["portNo"])));
                sc.UseDefaultCredentials = false;
                sc.EnableSsl = true;

                //credentials (username, pass of sending account) assigned here
                sc.Credentials = cred;
                MailMessage msg = new MailMessage();
                msg.From = new MailAddress(ConfigurationManager.AppSettings["userName"], "FromMe");
                msg.To.Add(new MailAddress(candidateEmail, "From My  Portal"));
                msg.Subject = "Interview Schedueled";
                msg.Body = "Interview Scheduled. Get ready to face it.";
                //DateTime startTime = DateTime.UtcNow.AddDays(1);
                //DateTime endTime = DateTime.UtcNow.AddHours(25);
                StringBuilder str = new StringBuilder();
                str.AppendLine("BEGIN:VCALENDAR");
                str.AppendLine("PRODID:-//My Group");
                str.AppendLine("VERSION:2.0");
                str.AppendLine("METHOD:REQUEST");
                str.AppendLine("BEGIN:VEVENT");
                str.AppendLine(string.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", startTime));
                str.AppendLine(string.Format("DTSTAMP:{0:yyyyMMddTHHmmssZ}", DateTime.UtcNow));
                str.AppendLine(string.Format("DTEND:{0:yyyyMMddTHHmmssZ}", endTime));
                string meetingLocation = "LOCATION: " + location;
                str.AppendLine(meetingLocation);
                str.AppendLine(string.Format("UID:{0}", Guid.NewGuid()));
                str.AppendLine(string.Format("DESCRIPTION:{0}", msg.Body));
                str.AppendLine(string.Format("X-ALT-DESC;FMTTYPE=text/html:{0}", msg.Body));
                str.AppendLine(string.Format("SUMMARY:{0}", msg.Subject));
                str.AppendLine(string.Format("ORGANIZER:MAILTO:{0}", msg.From.Address));

                str.AppendLine(string.Format("ATTENDEE;CN=\"{0}\";RSVP=TRUE:mailto:{1}", msg.To[0].DisplayName, msg.To[0].Address));

                str.AppendLine("BEGIN:VALARM");
                str.AppendLine("TRIGGER:-PT15M");
                str.AppendLine("ACTION:DISPLAY");
                str.AppendLine("DESCRIPTION:Reminder");
                str.AppendLine("END:VALARM");
                str.AppendLine("END:VEVENT");
                str.AppendLine("END:VCALENDAR");
                System.Net.Mime.ContentType ct = new System.Net.Mime.ContentType("text/calendar");
                ct.Parameters.Add("method", "REQUEST");
                AlternateView avCal = AlternateView.CreateAlternateViewFromString(str.ToString(), ct);
                msg.AlternateViews.Add(avCal);
                ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
                sc.Send(msg);
               
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex); 
                if(ex.InnerException!=null)
                    Console.WriteLine("InnerException is: {0}", ex.InnerException);

            }
        }

Monday, December 1, 2014

Re-Order the sharepoint site columns in content type using powershell script


$URL = "http://LocalHost/”
$site = New-Object Microsoft.SharePoint.SPSite($URL)
$web = $site.openweb()
$myCustomContentype=$web.ContentTypes["MySiteContentType"]
$newFieldOrder = @("Title","MyCOl1","MyCol3","FileLeafRef","MyCOl5","MyCol2")
$myCustomContentype.FieldLinks.Reorder($newFieldOrder)
$myCustomContentype.Update()
Name:  Only refer the Sharepoint internal names for reorder.  
Example: Internal name for “Title” is “FileLeafRef