We offer two things:
1. Hundreds of automation script samples based on IT Pros' frequently asked IT tasks
2. Script Browser & Script Analyzer tools to ease and improve the script writing
Microsoft All-In-One Script Framework was publicly announced four months ago. For those of us who are working on the project, it is like we gave birth to a baby. The feedback from many warm-hearted community has changed him for better. It’s a great joy to watch him grow under our careful guidance. We take pride in his remarkable potential to serve the world of IT.
Today, we open a new channel to closely watch your feedback. The survey is composed of 9 questions. We look forward to hearing from you.
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!
Microsoft All-In-One Script Framework is featured by script samples that address frequently asked IT requests in TechNet forums and Microsoft Support. In order to give IT Pros an easier, quicker and more enjoyable learning experience of our script samples, the team is partnering with Microsoft DPE Julie-Anne Arsenault, Chris Caldwell and Jana Butler, and a video creation team lead by Felix Wu and Jianhua Dong, to create 5 to 10 mins’ short HD demonstration videos for selected Windows 8 and Windows Server 2012 script samples. Thanks to the DPEs’ support, the videos are published on the well-known Microsoft Channel 9 community with a new homepage aggregating all our videos.
http://channel9.msdn.com/Blogs/OneScript
After watching the video, you can easily download and learn more details of the script sample by clicking its “Sample Download” link on the page. Here is one of the videos.
This is a continuous effort. Microsoft All-In-One Script Framework and the partner teams are committed to this. You can subscribe to the videos by clicking the “Subscribe to this blog” button in http://channel9.msdn.com/Blogs/OneScript. We hope to hear your feedback and suggestions and continuously improve the videos to better serve our customers.
Microsoft All-In-One Script Framework is an on-going effort in which the Microsoft team writes PowerShell/VBS/T-SQL script samples for IT Pros based on their feedback. The feedback is collected by the team from Microsoft's TechNet forums, Microsoft’s phone support incidents, as well as other social media and communities based on frequently asked IT tasks. If an IT task is, for example, asked in more than two TechNet forum threads, the team will consider the task as a potential script topic, and providing a script sample to demonstrate how to ease the task with automation scripts.
Since the Microsoft All-In-One Script Framework was launched in August, the team has collected over 350 script topics. More than 50 of these script ideas have been turned into the actual script samples published on TechNet Script Repository. In order to better prioritize the script topics and hear more from customers, All-In-One Script Framework launches the “You vote it; We write it” program today in partnership with TechNet Script Repository. In this program, the team is going to publicly post the collected script topics. The IT community can vote for these script topics. The higher the topic is voted, the higher priority will the team offer to write and publish the script sample.
Every week, the team will post a batch of script topics for the IT community to vote. You can follow it by subscribing to the "YouVoteWeWrite” RSS feed or visiting this page. You simply vote for your beloved or wanted script topics. The All-In-One Script Framework team will write the script sample for you, free of charge.
Here is the first batch of script topics for you to vote!
How to get the current automatic theme color in Windows 8?
Script to Monitor Scheduled Tasks on a server
O365: Set Calendar Permission in Office 365 Exchange Online
O365: Set OWA Signature in Office 365 Exchange Online
O365: Add Birthday or Anniversary Reminder in Office 365 Exchange Online
O365: Export Distribution Group Members in Office 365 Exchange Online
O365: Remove Duplicated Contacts in Office 365 Exchange Online
O365: Operate Connected Email Account
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.
--------------------------------------------------------------
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.
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.
Acknowledgement: Thanks Stephanie Lv for collecting the script idea. Thanks Sharp Wang for producing the script sample.
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.
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.
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.
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:
Acknowledgement: Thanks Jian Kang for collecting the script idea. Thanks Sharp Wang for producing the script sample.
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.
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.
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
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:
Acknowledgement: Thanks Bill Lu for collecting the script idea. Thanks Sharp Wang for producing the script sample.
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.
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.
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.
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:
Script of the Day
Script Download: The script is available for download from https://gallery.technet.microsoft.com//How-to-get-the-of-all-the-81859696. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This PowerShell script will demonstrate how to get the scripts of all the SQL Server Agent jobs.
To get all the job scripts, we need to perform the following steps: 1.Connect to SQL Server 2.Press F7 to open the Object Explorer Details 3.Select all the jobs and then right click on them 4.Select Script Job as->create job to->file But some people want to know if there is a simpler way to do it. Therefore here we provide them with a script so that they can get all the job scripts with one step.
You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery
Script Download: The script is available for download from https://gallery.technet.microsoft.com//How-to-attach-a-user-28a47521. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This PowerShell script will demonstrate how to attach a user database in SQL Server.
This script will demonstrate how to attach a user database in SQL Server. As some people asked how to do this in TechNet, it will be much more convenient if we provide a script for them.
Script Download: The script is available for download from https://gallery.technet.microsoft.com//How-to-sum-the-child-nodes-9430fb12. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This script is to sum the child nodes for a parent node in a SQL Server table.
As some people asked how to get the sum of total child nodes for a parent node, this script will demonstrate how to do this by creating a sample table.
Script Download: The script is available for download from https://gallery.technet.microsoft.com//How-to-detach-all-user-2ac10717. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This script is to detach all user databases in a SQL Server instance.
As some people asked how to detach all user databases in a SQL Server instance, this script can be used to achieve this goal when there is no session in any user database.
Script Download: The script is available for download from https://gallery.technet.microsoft.com//How-to-check-if-a-SQL-6ba95335. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This script is to check if a SQL Server is running on a physical or virtual machine.
As some people asked how to check if a SQL Server is running on a physical or virtual machine, this script will provide some help.