OneScript Team Blog

A world of automation script samples based on IT Pros' real-world tasks
  • Microsoft All-In-One Script Framework Sample Release on October 15th

    Microsoft All-In-One Script Framework is updated today with 7 new SQL Server script samples.   The scripts are written for solving frequently asked IT tasks that our team observed in the SQL Server TechNet forums and Microsoft Support Incidents.  Many customers are asking about these IT scenarios, so we expect that the script samples can save some time for IT Pros.

     

    --------------------------------------------------------------

    SQL Server Script Samples

    image

     

    Enroll SQL Server instances on multi server into an existing SQL Server Utility

    Download: enrollinstances.zip

    http://gallery.technet.microsoft.com/scriptcenter/Enroll-SQL-Server-66687842

    Description: This PowerShell sample script is used to enroll SQL Server instances on multi server into an existing SQL Server Utility. This script applies to SQL Server 2008 R2 and SQL Server 2012 editions.

    User Scenarios: SQL Server Utility can manage the SQL Server environment as a whole through the concept of application and multiserver management in it, so after created one utility control point, administrator need to enroll instances of SQL Server into the SQL Server Utility. If your task included in below two scenarios, this script will be one good assistant.

    • There are multiple managed instances need to be enrolled tothe SQL Server Utility.
    • We can store the server and instance names in one .txt file.

    Acknowledgement: Thanks Stephanie Lv for collecting the script idea.  Thanks Sharp Wang for producing the script sample. 

     

    Check SQL Server missing KB2277078 to prevent leak of security audit entries

    Download: CheckSQLInstanceVersionNumber.zip

    http://gallery.technet.microsoft.com/scriptcenter/Check-SQL-Server-missing-ac29a3ed

    Description: This script will demo how to check SQL Server missing update KB2277078 to prevent leak of security audit entries in TokenAndPermUserStore.

    User Scenarios: When we create and enable a SQL Server audit on a computer that is running Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008, the TokenAndPermUserStore cache store continues to grow in size. Additionally, the size does not decrease even when we run the DBCC FREESYSTEMCACHE command, this issue occurs because a memory leak occurs when a SQL Server audit is enabled on an object. To fix it, for different versions, we should install the corresponding updates.

      Acknowledgement: Thanks Sharp Wang for collecting the script idea and producing the script sample.

       

      How to retrieve the top N rows for each group

      Download: TopNRowsofGroup.zip

      http://gallery.technet.microsoft.com/scriptcenter/How-to-retrieve-the-top-N-248cdc67

      Description:  This script illustrates how to retrieve the top N rows for each group. The first solution can be used with SQL Server 2000 and upward versions, the second solution applies to SQL Server 2005 and upward versions with common table expression feature and Row_Number() function.

      User Scenarios:

      For example, there is a sample table that has three columns and eight rows:

      ProductID   CategoryID  UnitPrice

      ----------- ----------- -----------

      1           1           100

      2           1           25

      3           1           46

      4           1           22

      5           2           11

      6           2           44

      7           2           21

      8           3           15

      If we want to see the three of the most expensive (UnitPrice) products for each category in the table, the expected result should be:

      ProductID   CategoryID  UnitPrice

      ----------- ----------- -----------

      1           1           100

      3           1           46

      2           1           25

      6           2           44

      7           2           21

      5           2           11

      8           3           15

      Acknowledgement: Thanks Jian Kang for collecting the script idea.  Thanks Sharp Wang for producing the script sample. 

       

      Publish report to Reporting Services in SharePoint Integrated Mode

      Download: PublishReportInIntegratedMode.zip

      http://gallery.technet.microsoft.com/scriptcenter/Publish-report-to-0ca69662

      Description: This VB.NET sample script illustrates how to publish a report from a computer path to Reporting Services in SharePoint integrated mode. This script applies to SQL Server Reporting Services 2008 R2 integrated with SharePoint 2010.

      User Scenarios: Starting from SQL Server 2008 R2, the rs utility is supported against report servers that are configured for SharePoint integrated mode as well as servers configured in native mode. Today, most of the available script samples correspond to the native mode.  This sample script will ease the problems in below two scenarios:

      The report server configured to SharePoint integrated mode.

      The published report use embedded data source or shared data source.

      Acknowledgement: Thanks Challen Fu for collecting the script idea.  Thanks Sharp Wang for producing the script sample. 

       

      Bulk set the Timeout property of the reports that in one specified folder

      Download: bulksetTimeout.zip

      http://gallery.technet.microsoft.com/scriptcenter/Bulk-set-the-Timeout-10dcd062

      Description: This Visual Basic.NET sample script illustrates how to bulk set the Timeout property of the reports that in one specified folder via SSRS web services. This script applies to SQL Server Reporting Services 2005, 2008, 2008 R2 and 2012 versions in native mode.

      User Scenarios: Manually, we can make use of Report Manager to modify the Report Timeout property of the reports one by one, but if we have a lot of reports which need to apply this setting, don't we want to replicate in doing this tedious action? The answer is no, we can author a VB.NET script and save it into a .rss file, then take use of RS utility to execute this script with specified parameters. As a result, we can bulk apply this setting to multiple reports. This script will ease IT profs' work in these two scenarios:

      • Need to set this property for multiple reports
      • These reports organized in the same folder or path

      Acknowledgement: Thanks Bill Lu for collecting the script idea.  Thanks Sharp Wang for producing the script sample. 

       

      Add one user/group to a specified Reporting Services item

      Download: addpolicy.zip

      http://gallery.technet.microsoft.com/scriptcenter/Add-one-usergroup-to-one-59b89695

      Description: This Visual Basic.NET sample script illustrates how to add one user or one group to a SQL Server Reporting Services item by referencing SSRS web services. This script applies to SQL Server Reporting Services 2005, 2008, 2008 R2 and 2012 versions in native mode.

      User Scenarios: Add a user or a group and grant certain permission on specify item is one question frequently meet in Reporting Services administration. Traditionally, IT professionals can finish this task in Report Manager web site. Actually, using one rss script with variables can also achieve the same effect as using UI.

        Acknowledgement: Thanks Sharp Wang for collecting the script idea, and producing the script sample. 

         

        Get properties of the objects that in multiple SQL Server instances

        Download: PropertiesOfObjectsInMultipleInstances.zip

        http://gallery.technet.microsoft.com/scriptcenter/Get-properties-of-the-41d810f6

        Description: This Windows PowerShell sample script helps you to get the properties of the objects in multiple SQL Server instances or SQL Server groups.  It applies to SQL Server 2005, SQL Server 2008, SQL Server 2008 R2 and SQL Server 2012.

        User Scenarios: IT administrators frequently ask this question in the TechNet forums: how to get all logins/databases/agent jobs and their properties of multiple SQL Server instances?  In traditional ways, we can write T-SQL query and obtain the expected results one by one.  By using the following script, you can resolve the problems in below scenarios:

        • The objects belong to different instances or SQL Server group.
        • For different object, you would like to obtain the different properties.
        • Output the results in individual files for each object.

        Acknowledgement: Thanks Stephanie Lv for collecting the script idea.  Thanks Sharp Wang for producing the script sample. 

      • Happy Thanksgiving! Thank you from Microsoft All-In-One Script Framework

        Nov 22 is Thanksgiving in U.S.  This is a holiday where we are thankful for the people and circumstances in our lives.  It is a good time to say thank you.  We are deeply grateful for your supports and helps.  You, our readers, the project authors, the people behind the scenes, the sponsors, and our family and friends, help the project grow.  Nothing is more honorable than a grateful heart.  THANK YOU!

        image

      • New Year Gift from Microsoft All-In-One Script Framework

        image

        Happy New Year!   Thank you for all your support since All-In-One Script Framework was born five months ago.  What a great year of 2012!  So many things have happened.  We gave birth to this customer-driven script sample library on August 1st – the date when Windows 8 was RTM-ed.   Global PowerShell MVPs and the community gave lots of suggestions to change us for the better.   With your love and support, we have released 124 automation script samples to the TechNet Script Center, with the focus on Windows 8, Windows Server 2012, Office 365, and Office 2013.   There is customer evidence behind every script sample that was published.   Luckily, these scripts received 300,000 reads in five months.    Two of the Windows 8 script samples seem getting really popular.   “Script to Create a Shutdown/Restart/Logoff Windows 8 Tile for the Start menu (PowerShell)” is ranking the 1st among 7000+ scripts in TechNet, and “Remove Windows Store apps in Windows 8” is ranking the 2nd.  The team is very thankful to the IT community, so they prepared a New Year gift (actually 2 New Year gifts, but today, we announce the first one)!

         

        As an IT Pro, there is no gift better than useful automation scripts that can save time, ease the work and free the hassle in the New Year!  The All-In-One Script Framework team worked over-time during the holiday season, and presents to you 20 NEW Windows 8 script samples, 10 NEW Office 365 script samples and 13 new Office 2013 samples!

         

        clip_image001 20 Windows 8 and Windows Server 2012 script samples, and 5 Windows 8 sample how-do-I videos.
        clip_image001[7] 10 Office 365 script samples.
        clip_image001[9] 13 Office 2013 script samples

         

        We are looking forward to the New Year and the many coming new experiences and growths.  In our internal pipeline, we have another 150+ script ideas in triage and 150+ script samples under construction.  The pool is growing quickly every month.  In 2013, the team will announce many new services and offerings to save IT Pros’ time.  Let’s look forward to another exciting year of 2013!

         

        Cheers and Happy New Year

         

        - All-In-One Script Framework Team

      • Microsoft All-In-One Script Framework Sample Release on September 27th

        Microsoft All-In-One Script Framework is updated today with 9 new script samples.   These new script samples cover Lync Server, Exchange Server, SharePoint Server, and Office. All of these scripts are written for solving frequently asked IT tasks that our team observed in TechNet forums and Microsoft Support Incidents.  Many customers are asking about these IT scenarios, so we expect that the script samples can save some time for IT Pros.

         

        ------------------------------------------------------------------------

        New Lync Server Script Samples

         

        Script to Enable Users and Enterprise Voice in Microsoft Lync Server 2010

        http://gallery.technet.microsoft.com/scriptcenter/Script-to-Enable-Users-and-f56306ed

        Description: This script could be used to enable users and enterprise voice feature in Microsoft Lync Server 2010. It will help you to generate LineUri and provide a confliction detection mechanism. Also you can assign dial plans and voice policies at the same time. It is recommended to use this script right after deploying a new Lync environment. You need to find another solution or extend this script to support user provisioning.

        User Scenarios: With Enterprise Voice, Microsoft Lync Server 2010 delivers a stand-alone Voice over Internet Protocol (VoIP) offering to enhance or replace traditional PBX systems. Enterprise Voice users can call colleagues on your organization’s VoIP network or PBX, and they can call traditional phone numbers outside your organization.  Currently, administrators feel difficulties when they try to enable users and enterprise voice right after deploying a new Lync environment. It requires a lot of work to assign phone numbers (LineUri) to each user. So administrators do need a script to mitigate this problem.

        Acknowledgement: Thanks Sean Xiao for collecting the script idea.  Thanks Greg Gu for producing the script sample.  Thanks  Christopher Tart  (Microsoft SR SUPPORT ESCALATION ENGINEER) for reviewing it and improving its quality.

         

        Import Contacts for Microsoft Lync 2010 (PowerShell)

        http://gallery.technet.microsoft.com/scriptcenter/Import-Contacts-for-Lync-5fe0e671

        Description: This script could be used to import custom groups and distribution groups for Microsoft Lync 2010.

        User Scenarios: In a real world, IT help desks are often required to add dozens of predefined custom groups or distribution groups for Lync clients in different department. It is a time-consuming task for adding predefined custom group or distribution group for each Lync client.

        Acknowledgement: Thanks Anders Wang for collecting this script idea.  Thanks Greg Gu for composing the script.  Thanks Christopher Tart  (Microsoft SR SUPPORT ESCALATION ENGINEER) for reviewing it and improving its quality.

         

        ------------------------------------------------------------------------

        New Exchange Server Script Samples

        image

         

        Generate report of user mailbox’s size for Exchange 2010 (PowerShell)

        http://gallery.technet.microsoft.com/scriptcenter/Generate-report-of-user-e4e9afca

        Description: This script could be used to export mailboxes’ information to a CSV file, including SamAccountName, DisplayName, TotalItemSize. Based on these CSV files, script will also generate a report about the variation tendency of user mailbox.

        User Scenarios: IT Administrators may care about the size of user’s mailbox.  It’s good for admins to log this size information every day, and create report when admins want to check the variation tendency of user mailbox.

        Acknowledgement: Thanks Zifeng Wang for collecting the script topic from TechNet forums.  Thanks Edward Qi for composing the script sample.  Thanks Flo Raharja – Microsoft Escalation Engineer – for reviewing the script sample before we publish it.

         

        Create Report for Average Mailbox Size and Item Count per DB in Exchange 2010

        http://gallery.technet.microsoft.com/scriptcenter/Create-Report-for-Average-8bbd0467

        Description: This script could be used to create report for average mailbox size and item count per database in Microsoft Exchange 2010. Also you can use this script to measure all the properties which can be measured.

        User Scenarios: In a real world, IT Administrators may want to know the detail information about Mailbox Database, some of them even require the average mailbox size of each database, and they need these data to manage the exchange server better.

        Acknowledgement: Thanks Zifeng Wang for collecting the script idea.  Thanks Greg Gu for writing the script sample.  Thanks Mike Hendrickson for reviewing the sample before it’s published.

         

        Remove E-Mail address with Specific Domain Name in Microsoft Exchange 2010

        http://gallery.technet.microsoft.com/scriptcenter/Remove-E-Mail-address-with-d716e055

        Description: This script could be used to remove E-Mail address with specific domain Name in Microsoft Exchange 2010. This script can remove E-Mail address from mailbox, distribution group and dynamic distribution group.

        User Scenarios: In a real world, IT Administrators may want to remove new e-mail addresses due to variety of reasons. If an organization has thousands of recipients, it’s impossible to remove e-mail addresses for these recipients one by one. IT administrators do need a script to complete this task.

        Acknowledgement: Thanks Zifeng Wang for collecting the script idea.  Thanks Greg Gu for writing the script sample.  Thanks Mike Hendrickson for reviewing the sample before it’s published.

         

        Add Proxy Addresses for Recipients by Using a CSV file in Exchange 2010

        http://gallery.technet.microsoft.com/scriptcenter/Add-Proxy-Addresses-for-3a317074

        Description: This script could be used to add proxy addresses for recipients by using a CSV file in Microsoft Exchange 2010. You can export the recipients which you want to add new proxy address by using this script also.

        User Scenarios: In a real world, IT Administrators may want to add new proxy addresses due to variety of reasons. If an organization has thousands of recipients, it’s impossible to add proxy address for these recipients one by one. IT administrators do need a script to complete this task.

        Acknowledgement: Thanks Zifeng Wang for collecting the script idea.  Thanks Greg Gu for writing the script sample.  Thanks Mike Hendrickson for reviewing the sample before it’s published.

         

        Manage Large Messages in Microsoft Exchange 2010

        http://gallery.technet.microsoft.com/scriptcenter/Manage-Large-Messages-in-f1076d8f

        Description: This script could be used to manage large messages in Microsoft Exchange 2010. You can use this script for suspending or resuming large messages. Meanwhile, this script will send notifications to these users who are sending large messages.

        User Scenarios:  In a real world, IT administrators may want to find out the users who are sending lager messages. They hope these messages will be delivered at afterhours. Large quantity of newsletter messages is a typical scenario for using this script.

        Acknowledgement: Thanks Christy Zhang for collecting this script topic from TechNet forums.  Thanks Greg Gu for composing the script sample.  Thanks Mike Hendrickson for reviewing it.

        ----------------------------------------------------------------------

        New SharePoint Server Script Samples

         

        image

         

        Get Checkout Files List in Microsoft SharePoint Server 2010 (PowerShell)

        http://gallery.technet.microsoft.com/scriptcenter/Get-Checkout-Files-List-in-040002fd

        Description: This script could be used to get a list of checkout files from a site collection in Microsoft SharePoint Server 2010. You can also get a list of files which checkout by specific user.

        User Scenarios: In a real world, IT administrators often need to get a checkout files list in Microsoft SharePoint Server 2010, especially after the resignation of an employee. It will be a heavy task if they do it manually. It’s better to use a script to generate a checkout files list automatically.

        Acknowledgement: Thanks Pengyu Zhao for collecting the script topic from TechNet forums.  Thanks Greg Gu for composing the script sample.  Thanks Nishand Vasudevan from Microsoft  for reviewing the script before it’s published.

         

        ----------------------------------------------------------------------

        New Office Script Samples

         

        image

         

        Automating Out of Office in Outlook (VBScript)

        http://gallery.technet.microsoft.com/scriptcenter/Automating-Out-of-Office-bc0edb1e

        Description: This VBScript illustrates how to automate the user's Out of Office state in Outlook.

        User Scenarios:  Sometimes user will forget to turn on or turn off the Out of Office assistant, this could be annoying. Using this script will help user to manage his/her Out of Office state automatically.

        Acknowledgement: Thanks Rex Zhang for collecting the script idea.  Thanks Cristin Yan for writing the script sample.  Thanks Shaleen Thapa (Microsoft Support Escalation Engineer) for reviewing the script to ensure its quality.

      • Microsoft All-In-One Script Framework Sample Release on August 23rd

        Microsoft All-In-One Script Framework is updated today with 10 new script samples.   These new script samples cover Office and SharePoint. All of these scripts are written for solving frequently asked IT tasks that our team observed in TechNet forums and Microsoft Support Incidents.  Many customers are asking about these IT scenarios, so we expect that the script samples can save some time for IT Pros.

         

        ------------------------------------------------------------

        New Office Script Samples

        image

         

        Save attachments from multiple selected items in Outlook (VBA)

        http://gallery.technet.microsoft.com/scriptcenter/Save-attachments-from-5b6bf54b

        Description: This VBA sample illustrates how to save attachments from multiple selected items in Outlook.

        User Scenarios: When multiple items are selected, the Save Attachments option in the File menu will be grayed out, and it's inconvenient to save attachments one by one. This script is useful and can be used to save attachments from multiple selected items all at once.

        Acknowledgement: Thanks Zhiliang Zhou for collecting the script topic.  Thanks Cristin Yan for composing the script sample.   Thanks  Pranav Wagh (Microsoft Support Escalation Engineer) for reviewing it and ensuring the quality.

         

        Convert PowerPoint Presentation to Word Document (VBA)

        http://gallery.technet.microsoft.com/scriptcenter/Convert-PowerPoint-c3a26165

        Description: This VBA sample illustrates how to convert PowerPoint presentations to Word documents, in the meantime, it will try to keep the original format and layout and reduce the output file size. It can be only run on PowerPoint 2010.

        User Scenarios: Converting PowerPoint presentations to Word documents is a frequently asked question by end-users in many public forums. Although there are similar methods available from built-in feature or 3rd-party applications, but most of them have evident disadvantage, some of them make large file size, some of them break or lose the format or layout.

        Acknowledgement: Thanks Zhiliang Zhou for collecting the script topic.  Thanks Cristin Yan for composing the script sample.   Thanks  Shiv Khare (Microsoft Tech Lead) for reviewing it.

         

        Remove or Change Password for Multiple PowerPoint Presentations (VBA)

        http://gallery.technet.microsoft.com/scriptcenter/Remove-or-Change-Password-0efd9823

        Description: This VBA sample illustrates how to convert PowerPoint presentations to Word documents, in the meantime, it will try to keep the original format and layout and reduce the output file size. It can be only run on PowerPoint 2010.

        User Scenarios: Converting PowerPoint presentations to Word documents is a frequently asked question by end-users in many public forums. Although there are similar methods available from built-in feature or 3rd-party applications, but most of them have evident disadvantage, some of them make large file size, some of them break or lose the format or layout.

        Acknowledgement: Thanks Zhiliang Zhou for collecting the script topic.  Thanks Cristin Yan for composing the script sample.   Thanks  Shiv Khare (Microsoft Tech Lead) for reviewing it.

         

        Import Multiple Tables from Access to Excel (VBA)

        http://gallery.technet.microsoft.com/scriptcenter/Import-Multiple-Tables-ad78b80f

        Description: This VBA sample illustrates how to import multiple Access tables to Excel worksheets at once, meanwhile each worksheet‘s name will correspond to each table's name. It can be run on Excel 2003, 2007 and 2010.

        User Scenarios: Users would like to import Access tables to Excel worksheets, meanwhile each worksheet's name will correspond to each table's name.

        Acknowledgement: Thanks Cristin Yan for collecting the script topic and composing the script sample.  Thanks Shiv Khare (Microsoft Tech Lead) for reviewing it.

         

        Remove Notes Pages in PowerPoint (VBA)

        http://gallery.technet.microsoft.com/scriptcenter/Remove-Notes-Pages-in-9cd979c7

        Description: This VBA demo illustrates how to remove notes pages in PowerPoint 2007 and the later version.

        User Scenarios: Removing notes pages in PowerPoint is a frequently asked question by users in the Answers forums. For example, 1) remove slide numbers from PowerPoint notes pages using VBA  2) VBA shut off for PowerPoint 2007 Notes Page Header.  

        Acknowledgement: Thanks Cristin Yan for collecting the script topic and composing the script sample.  Thanks Shiv Khare (Microsoft Tech Lead) for reviewing it.

         

        ------------------------------------------------------------

        New SharePoint Script Samples

         

        image

         

        Retrieve SharePoint list data (PowerShell)

        http://gallery.technet.microsoft.com/scriptcenter/Retrieve-SharePoint-list-8e7fb421

        Description: This script demonstrates how to retrieve Microsoft SharePoint list data by Windows PowerShell and Microsoft SharePoint PowerShell snapin.

        User Scenarios: Retrieve list data is a regular but important task for SharePoint content management. From the related cases, we could see that there are requirements from the IT administrators. There are some scripts in Internet, but all of them just focus on one section (e.g. retrieve all the list items), and also hard to read due to lack of explanations.

        Acknowledgement: Thanks Simon Huang for collecting the script topic.  Thanks Greg Gu for composing the script.  Thanks Sojesh Sreelayam (Microsoft Support Escalation Engineer) for reviewing the script sample.

         

        SharePoint List Enumerator (PowerShell)

        http://gallery.technet.microsoft.com/scriptcenter/SPListEnumerator-PowerShell-b0ce0b9f

        Description: This script enumerates through a "large" list or document library and provides information about items in it.

        User Scenarios: In SharePoint (2007 and 2010) we have a threshold on the number of list items in a container. In SharePoint 2007, the threshold value is 2,000 and in SharePoint 2010, it is 5,000. We often come across customers who have a large number of items in their lists/document libraries and complain of overall site performance. It is possible for customers to create nested folders and have a large number of documents/list items reside in them. But exceeding the threshold value can cause slowness and have a performance impact on the backend SQL content database.  This script traverses through each folder in a given list/document library and will enumerate items at each container level. It writes the output to a .CSV file to make it easier for viewing in Excel and perform further filtering.

        Acknowledgement: Thanks J Vijay William (Microsoft Support Escalation Engineer) for collecting the script topic and composing the script sample.

         

        Reset the User Profile Synchronization Service in SharePoint (PowerShell)

        http://gallery.technet.microsoft.com/scriptcenter/Reset-the-User-Profile-cebcdee1

        Description: This script will help IT administrator to reset the User Profile Synchronization Service in Microsoft SharePoint Server 2010.

        User Scenarios: The User Profile Synchronization service interacts with Microsoft Forefront Identity Manager (FIM) to synchronize profile information with external systems such as directory services and business systems. The two FIM services, Forefront Identity Manager Service and Forefront Identity Manager Synchronization Service, are provisioned when you start the User Profile Synchronization service. Being unable to start the User Profile Synchronization service is the most common profile synchronization (profile sync) issue that administrators encounter. The farm account is used to start the User Profile Synchronization service. If you have configured a wrong service account, User Profile Synchronization Service won’t be started. This script could be used to reset the User Profile Synchronization service and its service account.

        Acknowledgement: Thanks Anders Wang for collecting the script topic.  Thanks Greg Gu for composing the script sample.   Thanks Sojesh Sreelayam (Microsoft Support Escalation Engineer) for reviewing it before publishing.

         

        Add attachments for a specific list item in Microsoft SharePoint Server 2010

        http://gallery.technet.microsoft.com/scriptcenter/Add-attachments-for-a-1e931663

        Description:  This script could be used to add attachments for a specific list item in Microsoft SharePoint Server 2010.

        User Scenarios: In a real world, IT Administrators may need to add attachments for a specific list item. It will be a heavy task if we do it manually, so the IT Administrators need a script to complete this task.

        Acknowledgement: Thanks Wenxuan Fan for collecting the script topic.  Thanks Greg Gu for composing the script sample.   Thanks Nishand Vasudevan (Microsoft Escalation Engineer) for reviewing it.

         

        Add Allowed Inline Downloaded MIME Types for one Web Application in SharePoint

        http://gallery.technet.microsoft.com/scriptcenter/Add-Allowed-Inline-1ae367ae

        Description:  This script could be used to add allowed inline downloaded MIME types for one Web Application in Microsoft SharePoint Server 2010.

        User Scenarios: By default PDF files cannot open in browser. It is not listed as a safe MIME type. But for most companies, PDF files are widely used in their daily work, so it is necessary to add PDF to the allowed inline downloaded MIME types list.

        Acknowledgement: Thanks Wenxuan Fan for collecting the script topic.  Thanks Greg Gu for composing the script sample.   Thanks Sojesh Sreelayam (Microsoft Support Escalation Engineer) for reviewing it.

         

        We look forward to learning your feedback and serving you better.  If you have any suggestions, please email All-In-One Script Framework: onescript@microsoft.com.

         Script of the Day