• [Script of May 9] Modify Mailbox Folder Permission in Microsoft Exchange 2010 (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 modify mailbox folder permission in Microsoft Exchange 2010. You can use this script to export mailbox folder permission of specified mailboxes. You can use this script to set the mailbox folder permission also.

    In a real world, IT administrators may need to know users’ mailbox folder permissions from time to time. This is because mailbox folder permissions may be misconfigured by users. With help of this script, IT administrators could review the permissions in a single untied view. If IT administrators find the permission of some mailboxes are not correct, they can also try to fix the permission for these mailboxes based on this file.

    image image
     image

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

  • [Script of May 13] How to get a user password expiration date in Active Directory (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 VBScript shows how to get a user password expiration date in Active Directory.

    Sometime users want to know when their password will expire. This script is to get the date without Active Directory Cmdlet.

    image image
     image

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

  • [Script of May 28] How to check if master key for master database is not encrypted

    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 can be used to detect if the database master key is not encrypted by Service Master Key.

    SQL Server uses a hierarchy of keys and certificates when a database is enabled for Transparent Database Encryption [TDE]. At the upper levels of the hierarchy, the Service Master Key [SMK] encrypts the Database Master Key [DMK] for the master database. The Database Master Key [DMK] encrypts and protects the Certificate and Database Encryption Key [DEK] involved in the encryption of the user database. After enabling a user database for TDE, you will be able to remove the SMK encryption of the DMK for the master database. If you restart the SQL Server at this point, the database startup will encounter error 15581 and prevent the database from starting up. In some situations, the LogWriter will hang with a wait_type of WRITE_LOG and prevent any transactions from committing in this database. Even though it is possible to remove the SMK encryption for the master database DMK, it is not recommended to do this. 

    image image
     image

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

  • [Script of May 8] Modify Distribution Group Members in Microsoft Exchange 2010 (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 modify distribution group members in Microsoft Exchange 2010. You need use a comma-separated values (CSV) file as input.

    In a real world, IT administrators always need to modify distribution group members due to variety of reasons, like acquisitions, break apart and department reorg. It will be a time-consuming job if IT administrators need to modify the distribution groups one by one.

    image image
     image

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

  • [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