• You vote it; we write it! - Microsoft All-In-One Script Framework

    youvoteitwewriteit

    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!

     

    Windows 8 and Windows Server 2012 Script Topics

    How to get the current automatic theme color in Windows 8?

    Script to Monitor Scheduled Tasks on a server

     

    Office 365 Script Topics

    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

  • Launching "Script of the Day" - Learn an amazing IT script sample every 24 hours

     

    image image
    image image

    Every day is an opportunity to learn something or discover something new.  Learn one IT script sample every day; Be an IT master in a year!

    Microsoft All-In-One Script Framework offers "Script of the Day".  "Script of the Day" introduces one amazing script sample every 24 hours that demonstrates the frequently asked IT tasks.  If you are curious about and passionate for learning something new, follow the "Script of the Day” RSS feed or visit the "Script of the Day" homepage, and share your feedback with us onescript@microsoft.com.

     

    image  Subscribe to the RSS Feed: http://blogs.technet.com/b/onescript/rss.aspx?tags=ScriptOfTheDay 

     

  • Register the "OneCode & OneScript" session at MVP Global Summit November 2013

    The yearly Microsoft MVP Global Summit will lift its curtain on Nov 17th in Bellevue, WA.  This year, we have prepared three new apps and many new samples in response to MVPs’ feedbacks last year.  If you are attending this year’s Microsoft MVP Global Summit, you will have the privilege to kiss or bite their development team Smile 

    • Sample Browser Windows Phone app – with 6000+ MSDN code samples which will be at your fingertips anytime and anywhere.
    • Script Explorer for PowerShell ISE – with 8000+ script sample which will be at your fingertips when you are writing scripts in PowerShell ISE.
    • PowerShell checkin policy for TFS – automatically checks your PowerShell script code against best practices of PowerShell.

     

    Interested?  Please open your Schedule Builder for the MVP Summit 2013, and register for the event called “OneCode & OneScript” on Nov 17th.  We look forward to seeing you and learning your feedback.

     

    image

  • Microsoft All-In-One Script Framework Sample Release on December 11th

    We have released 100 script samples!  There is customer evidence behind every script sample.  The team closely monitors the entire TechNet forum platform, and customers’ support calls to Microsoft, and create automation script to ease those frequently asked IT tasks.   We wish that the samples will save your time.

    Today, Microsoft All-In-One Script Framework is updated with over 30 new script samples.   In this blog, we introduce 14 of them, including 3 Windows 8 script samples; 1 Windows Server 2012 sample, 2 Office 365 ones, 1 Lync sample, 3 Office samples, and 4 SharePoint scripts.  The scripts are written for solving frequently asked IT tasks that our team observed in the TechNet forums and Microsoft Support Incidents.  Many customers are asking about these IT scenarios.

     

    Windows 8 Script Samples

    image

    Create a Shutdown/Restart/Logoff Windows 8 Tile for the Start menu (PowerShell)

    Download: CreateWindowsTile.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Create-a-ShutdownRestartLog-37c8111d

    This script sample has been the most popular script on TechNet Script Repository.

    image

    Description: This PowerShell script shows how to create a Shutdown, Restart or Logoff Windows 8 tile for the Start menu.

    User Scenarios: In Windows 8, without a Start button, properly shutting down or rebooting Windows can be a bit of a chore. Many users want to shut down or reboot Windows in just one click. This script enables users to click on a tile to shut down, reboot or log off Windows on the Start menu.

    Acknowledgement: Thanks Anders Wang for the script idea and composing the script sample.  Thanks Nishant Kumar Singh for reviewing the sample to ensure its quality.

     

    Script to create a Windows 8 Switch User Tile for the Start menu (PowerShell)

    Download: CreateSwitchUserWindowsTile.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Script-to-create-a-Windows-2b03ac8c

    image

    Description: This PowerShell Script shows how to create a Windows 8 Switch User tile for the Start menu.

    User Scenarios: Properly switching users in Windows 8 without a Start button can be a bit of a chore. Many users may want to switch users in just one click. This script enables users to click a tile to switch user on the Start menu.

    Acknowledgement: Thanks Anders Wang for the script idea and composing the script sample.

     

    Script to create a Windows 8 Hibernation Tile for the Start menu (PowerShell)

    Download: CreateHibernationWindowsTile.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Script-to-create-a-ce24bd63

    image

    Description: This PowerShell Script shows how to create a Windows 8 Hibernation tile for the Start menu.

    User Scenarios: Properly hibernating Windows 8 without a Start button can be a bit of a chore. Many users may want to hibernate Windows in just one click. This script enables users to click a tile to hibernate Windows on the Start menu.

    Acknowledgement: Thanks Anders Wang for the script idea and composing the script sample.

     

    Windows Server 2012 Script Samples

     

    Switch between Server Core to Server GUI in Windows Server 2012

    Download: SwitchGUIServerCORE.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Switch-between-Windows-9680265d

    Description: This script sample can be used to switch a full installation of a Server Graphic User Interface (GUI) mode to Server Core mode in Windows Server 2012. Additionally, this script enables you to convert Server Core mode to Server GUI mode.

    User Scenarios: After you setup Windows Server 2012, IT administrators may have to convert Server 2012 to Server Core mode for some security reasons.  Also, it is more convenient for administrators to change some configurations when using GUI mode.  To perform this action, use the following script sample.

    Acknowledgement: Thanks Edward Qi for collecting the script idea and composing the script sample.   Thanks Christopher Norris for ensuring its quality.

     

    Office 365 Script Samples

    image

    Configuring a Windows PowerShell Profile for Office 365 Exchange Online

    Download: SetOffice365PowerShellProfile .zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Configuring-a-Windows-faecf7cb

    Description: This script can configure a Windows PowerShell profile for Office 365 Exchange Online. It appends the Connect-OSCExchangeOnline and Disconnect-OSCExchangeOnline functions to your Windows PowerShell profile. Afterward, you can use these two functions directly without remembering New-PSSession and its parameters.

    User Scenarios: Currently, Office 365 Exchange Online administrators use the New-PSSession function to connect Windows PowerShell to Office 365. Some administrators feel that it is difficult to remember all the parameters clearly. It is better to use a Windows PowerShell profile to store the two functions and help administrators use Office 365 more easily.

    Acknowledgement: Thanks Dan Rowley for submitting the script idea and ensuring the script quality. Thanks Greg Gu for composing the script sample.

     

    Add Birthday or Anniversary Reminders in Office 365 Exchange Online

    Download: AddOSCEXOAppointment.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Add-Birthday-or-Anniversary-e111b73d

    Description: This script creates birthday or anniversary reminders for your contacts. This script also enables you to import a comma-separated values (CSV) file for creating the reminders. Additionally, you can use this script to search a contact folder to find contacts that have birthdays and anniversaries, and then create the reminders.

    User Scenarios: Microsoft Outlook has a feature that enables you to “Add a birthday or anniversary for a contact.” However, this feature is not available in the Outlook Web App (OWA). Therefore, in order to add birthday or anniversary reminders in OWA, you must find a workaround.

    Acknowledgement: Thanks Greg Gu for submitting the script idea, and composing the sample.  Thanks David Los (PM from Exchange Online) for ensuring its quality.

     

    Lync Script Samples

    image

    Find Users with Specific Features Enabled in Microsoft Lync Server 2010

    Download: SearchOSCCSUser.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/ScriptFind-Users-with-fa3d97ea

    Description: This script finds users with specific features enabled in Microsoft Lync Server 2010. Features of following policies which defined in user scope are supported by this script.

    • Voice Policy
    • Conferencing Policy
    • Pin Policy
    • ExternalAccess Policy
    • Location Policy
    • Client Policy
    • ClientVersion Policy
    • Presence Policy
    • Mobility Policy
    • Archiving Policy

    User Scenarios: Microsoft Lync Server 2010 provides a lot of policies to allow IT administrators to control the features which could be used by end users. Currently, if administrators want to know the list of users who are allowed to use some features, they have to find these policies by using Where-Object cmdlet first. After that they need to prepare a filter script manually by using the policy names. It’s a time consuming job if there are a lot of policies in the organization. Also some administrators want to maintain this kind of list for compliance purpose.

    Acknowledgement: Thanks Kelly Huang  for submitting the script idea. Thanks Greg Gu for writing the script sample. Thanks Christopher Tart for reviewing it and ensuring its quality.

     

    Office Script Samples

    image

    Remove Notes Pages in PowerPoint (PowerShell)

    Download: RemoveNotesInPowerPoint.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Remove-Notes-Pages-in-e5d722da

    Description: This PowerShell script will remove all the notes pages form specified PowerPoint files.

    User Scenarios: In PowerPoint, people often use the notes function to record additional information. When these documents are shared, you may want to remove notes before sharing the document. Instead of removing the notes one by one, you can remove all the notes using the script.

    Acknowledgement: Thanks Cristin Yan for submitting the script topic.  Thanks Anders Wang for composing the sample.  Thanks Shiv Khare for sharing his expertise to review it before the sample is published.

     

    Convert PowerPoint Presentation to Word Document (PowerShell)

    Download: ConvertPowerPointToWordDocument.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Convert-PowerPoint-d65f3a82

    Description: This PowerShell script sample illustrates how to convert PowerPoint presentations to Word documents. Additionally, script will maintain the original format, layout for presentation and reduce the output file size. Supported version is PowerPoint 2010.

    User Scenarios: Converting PowerPoint presentations to Word documents is a frequently asked question in many public forums.

    Acknowledgement: Thanks Zhiliang Zhou for collecting the script idea. Thanks Pranav Wagh for sharing his expertise in Office to ensure the sample quality.  Thanks Anders Wang for writing the sample.

     

    Modify Picture Compression Resolution Settings in PowerPoint 2007 (PowerShell)

    Download: ModifyPictureCompressionResolutionSetting.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Modify-Picture-Compression-e669d72e

    Description: This PowerShell script demo illustrates how to modify picture compression resolution settings in PowerPoint 2007.

    User Scenarios: This question is asked by users in the TechNet forum. They just want to pre-configure picture compression in PowerPoint 2007.

    Acknowledgement: Thanks Zhiliang Zhou for the script idea.  Thanks Anders Wang for writing the sample.  Thanks Pranav Wagh for ensuring its quality.

     

    SharePoint Script Samples

    image

     

    Manage Managed Metadata Terms in Microsoft SharePoint Server 2010

    Download: ManageTaxonomy.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Manage-Managed-Metadata-9c42efef

    Description: This script can manage managed metadata terms in Microsoft SharePoint Server 2010. You can use this script to get terms, add terms or remove terms.

    User Scenarios: In a real world, a lot of people ask the possibility of managing managed metadata terms by using Windows PowerShell. Since administrators need to manage lot of terms, they really need to find a script to reduce their workload.

    Acknowledgement: Thanks Simon Huang for the script idea. Thanks Greg Gu for writing the sample. Thanks Stephen Woodard for review it.

     

    Start a SharePoint Designer Workflow on Multiple List Items

    Download: StartWorkflow.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Start-a-Workflow-on-120bffe5

    Description: This script can start a SharePoint Designer workflow on Multiple List Items in Microsoft SharePoint Server 2010.

    User Scenarios: In a real world, you may need to start a workflow on multiple list items. It will be a heavy task if you do it manually, so you are looking for a script to complete this task.

    Acknowledgement: Thanks Simon Huang for the script idea. Thanks Greg Gu for writing the sample. Thanks Stephen Woodard for review it.

     

    List Unused Content Databases using PowerShell

    Download: ListUnusedContentDatabases.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/List-Unused-Content-c078e894

    Description: This script can be used to list your unused SharePoint content databases. It can also be used to list used content databases or all content databases.

    User Scenarios: By default, we can use Get-SPContentDatabase to retrieve SharePoint content databases. But this can only list the database that’s status is Ready. The content database cannot be listed if its status is Offline.

    Acknowledgement: Thanks Wenxuan Fan for the script idea. Thanks Bing Zhao for writing the sample. Thanks Sojesh Sreelayam for review it.

     

    Set User Profile Picture in Microsoft SharePoint Server 2010

    Download: SetOSCSPUserPicture.zip
    Details: http://gallery.technet.microsoft.com/scriptcenter/Set-User-Profile-Picture-1cdbe171

    Description: This script changes user profile picture in Microsoft SharePoint Server 2010. It finds user profile pictures from specified picture library. After finding the pictures, it uses User Profile Manager to change PictureUrl property for each user who has user profile.

    User Scenarios: Under some circumstances, administrators may manage user pictures manually without enabling User Profile Synchronization Service. It indicates that the pictures will not be imported from external systems. They need to find a way to help HR specialist to import user profile picture for each user.

    Acknowledgement: Thanks Wenxuan Fan for the script idea. Thanks Greg Gu for writing the sample. Thanks Shaleen Thapa for review it.

  • Microsoft All-In-One Script Framework Sample Release on August 1st

    This is the first release of script samples in Microsoft All-In-One Script Framework.  We bring to you two Office 365 automation script samples, three Windows Server / Windows Client scripts, and three Exchange Server 2010 script samples.   All of these scripts are based on frequently asked IT tasks that our team collected in TechNet forums and Microsoft Support Incidents.  Many customers are asking about these scenarios, so we expect that the script samples can save more time for our worldwide IT Pros.

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

    New Office 365 Script Samples

    Script to Modify Office 365 Mailbox Permissions (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Script-to-Modify-Office-55e2147e 

    Description: This script could be used to modify Office 365 mailbox permissions. You can use this script to add or remove mailbox permissions. This script will try to connect Windows PowerShell to Office 365 automatically if the connection is not established.

    User Scenarios: In a real world, IT Administrators may want to modify mailbox permissions due to variety of reasons. If an organization has thousands of mailboxes, it’s impossible to modify permissions for these mailboxes one by one. IT administrators do need a script to complete this task.

    Acknowledgement:  Thanks Greg Gu for composing the script.  Thanks Dan Rowley (Microsoft Senior Support Escalation Engineer) for submitting the script topic and reviewing the script sample.

     

    Script to Get Office 365 Mailbox Folder Permissions (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Script-to-Get-Office-365-60e262dc

    Description: This script could be used to get Office 365 mailbox folder permissions. It will try to connect Windows PowerShell to Office 365 automatically if the connection is not established.

    User Scenarios: In a real world, IT Administrators may want to get mailbox folder permissions due to variety of reasons. If an organization has thousands of mailboxes, it’s impossible to get permissions from these mailboxes one by one. IT administrators need a script to complete this task.

    Acknowledgement:  Thanks Greg Gu for composing the script.  Thanks Dan Rowley (Microsoft Senior Support Escalation Engineer) for submitting the script topic and reviewing the script sample.

     

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

    New Windows Server / Windows Client Script Samples

    image

     

    Find user logon duration (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Find-user-logon-duration-667b8c48

    Description: This script could be used to collect user logon duration from multiple computers. You can also use the data to generate a report. The user logon duration calculation is based on the general algorithm, Logon duration = Logoff date time - Logon date time. This script considers event 4647 as a logoff event and use it for calculating the logon duration.

    User Scenarios: In a real world, IT Administrators may need to collect user logon duration from multiple computers. User logon duration data can be useful when IT Administrators are troubleshooting some issues.

    Acknowledgement:  Thanks Shuhao Liu for submitting the script idea.  Thanks Greg Gu for composing the script.  Thanks David Everett (Microsoft Senior Support Escalation Engineer) for reviewing the script sample.

     

    Script to fix issues described in KB947222 (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Script-to-fix-issues-ab9a639d

    Description: This Windows PowerShell script will modify the file permission, and fix fix issues described in KB947222.

    User Scenarios: When user redirect the Documents folders to network share, the folders name changes back to My Documents as shown in the following figure. This issue can be fixed by denying Read permission to the administrator for the Desktop.ini files on the server. But the customers need to perform steps one by one. It would be great if we have a script to automate this task.

    image

    Acknowledgement:  Thanks Shaon Shan for submitting the script idea.  Thanks Anders Wang for composing the script.  Thanks Gary Mudgett (Microsoft Support Escalation Engineer) for reviewing the script sample.

     

    Prepopulate a batch of user passwords to RODC (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Prepopulate-a-batch-of-34e6d0dc

    Description: This Windows PowerShell script will prepopulate a batch of user passwords to a specified Read-only Domain Controller. It will leverage the capability of the native command, repadmin. The script will also strictly check the parameters for avoiding any potential human error.

    image

    User Scenarios: Currently, IT Professionals can only prepopulate user password for one account each time.  If IT Professionals have to prepopulate 200 or more user passwords within a very short period of time, the job will turn out to be very stressful and tedious.

    Acknowledgement:  Thanks Arthur Li for submitting the script idea.  Thanks Greg Gu for composing the script.  Thanks Justin Turner (Microsoft Senior Support Escalation Engineer) for reviewing the script sample.

     

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

    New Exchange Server Script Samples

    image

     

    Get Mailbox and Mailbox Database Statistics in Microsoft Exchange 2010 (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Get-Mailbox-and-Mailbox-96915f45

    Description: This script could be used to get mailbox and mailbox database statistics in Microsoft Exchange 2010. You can use this script to get different properties based on your needs.

    User Scenarios:  In a real world, IT administrators may want to get mailbox and mailbox database statistics for their production environment. In this way, they can closely monitor mailbox size growth and the database growth. They can also use this script for change verification after modifying some properties of mailboxes and mailbox databases.

    Acknowledgement:  Thanks Zifeng Wang for submitting the script idea.  Thanks Greg Gu for composing the script.  Thanks Mike Hendrickson (Microsoft Senior Escalation Engineer) for reviewing the script sample.

     

    Send Welcome Mail to Each Newly Created Mailbox in Microsoft Exchange 2010 (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Send-Welcome-Mail-to-Each-4fff4a93

    Description: This script could be used to send welcome mail for each newly created mailbox in Microsoft Exchange 2010. This script allows you to use an .html file as a template. You can use placeholders in this template file. This script allows you to replace these placeholders when the script is being executed.

    User Scenarios:  In a real world, IT administrators are always required by human resource department to send welcome mail to each new employee. A welcome mail to a new employee who has accepted your job offer confirms the employee's decision to accept the position. It will save the new employee some feelings of insecurity and avoids misunderstandings.

    Acknowledgement:  Thanks Tiger Li for submitting the script idea.  Thanks Greg Gu for composing the script.  Thanks Mike Hendrickson (Microsoft Senior Escalation Engineer) for reviewing the script sample.

     

    Collect Event Logs from Microsoft Exchange 2010 Servers (PowerShell)

    http://gallery.technet.microsoft.com/scriptcenter/Collect-Event-Logs-from-99633908

    Description: This script could be used to collect warning and error events which generated by Microsoft Exchange Server 2010. You can collect these events by Exchange server role.

    User Scenarios:  In a real world, IT Administrators need to collect warning and error events for troubleshooting and monitoring the health of Microsoft Exchange 2010. It will be a time-consuming task in a large scale deployment.

    Acknowledgement:  Thanks Tiger Li for submitting the script idea.  Thanks Greg Gu for composing the script.  Thanks Mike Hendrickson (Microsoft Senior Escalation Engineer) for reviewing the script sample.

     

     

    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.