• [Script of May 1] How to add drive partitioning conditions in SCCM 2012 SP1

    Script Download: 
    The script is available for download in Microsoft Script Browser for Windows PowerShell ISE. You need to install the Script Browser application first, and search for the script sample title.

    This scripts shows how to add drive partitioning conditions in System Center 2012 Configuration Manager SP1.

    Suppose you are a SCCM administrator of a large company, computers usually have different size of disks. You may want to standardize the size of operating system partition when deploying operating systems. You can achieve this goal by adding conditions to the Format and Partition Disk task sequence steps. But a task sequence, especially a MDT task sequence contains multiple steps that require you to add conditions; it’s not easy to edit the steps in task sequence editor. So you want to use a script to ease your work.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of May 2] How to check if system_health session has incorrect map keys in SQL Server 2012

    Script Download: 
    The script is available for download in Microsoft Script Browser for Windows PowerShell ISE. You need to install the Script Browser application first, and search for the script sample title.

    This PowerShell script will check if system_health session has incorrect map keys in SQL Server 2012.

    Every SQL Server instance has a default extended event session created with the name system_health. This session captures information about the wait_info and wait_info_external events. The current definition of the system_health session contains incorrect map_key specified for the wait_types of interest. Use the information from the knowledge base article to correct the extended event session definition.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of May 5] Prepopulate a batch of user passwords to RODC (VBScript)

    Script Download:  
    The script is available for download in Microsoft Script Browser for Windows PowerShell ISE. You need to install the Script Browser application first, and search for the script sample title.

    This 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.

    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.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of May 6] Find user logon duration (VBScript)

    Script Download:  
    The script is available for download in Microsoft Script Browser for Windows PowerShell ISE. You need to install the Script Browser application first, and search for the script sample title.

    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.

    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.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of May 7] Collect Event Logs from Microsoft Exchange 2010 Servers (PowerShell)

    Script Download:  
    The script is available for download in Microsoft Script Browser for Windows PowerShell ISE. You need to install the Script Browser application first, and search for the script sample title.

    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.

    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.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery