• [Script of Jun. 2] How to export multiple Visio pages to png file(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 PowerShell script sample shows how to convert Visio page file to .png file.

    Many companies generate technical visuals in Microsoft Visio and would like to be able to share this information on their corporate sites. The problem, however, is that most users would not be able to view the visuals in this format. One of the ways of solving this problem is converting Visio diagrams to a more universal format like PNG.  But doing it manually would be time consuming, this sample can help us to batch convert Visio files, it would be very convenient.

    image image
     image

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

  • [Script of Jun. 3] 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.

    We can use Get-OSCNotEncryptedMasterKey to identify the database master key which is not encrypted by service master key. By default, this script uses Windows Authentication to connect to your SQL Server. If you want to use SQL Server Authentication, just uncomment some code in this script. 

    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 Jun. 4] How to remove disabled users from distribution lists

    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 shows how to remove disabled member from distribution group for Exchange 2010.

    Frequently, for some reason, some mailboxes will be disable, if they belong to a distribution list, it is better to remove those disabled users.

    image image
     image

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

  • [Script of Jun. 5] How to check and set Exchange Web Services message size limit to default

    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 is used to help administrator to get and set the EWS message size limit for Exchange 2010 and Exchange 2013.

    The message size limit is set in web.config in IIS. This script will modify the value in the web.config file.

    image image
     image

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

  • [Script of Jun. 6] How to remove all network printers on a computer

    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 remove all network printers on a computer.

    Remove all network printers is a frequently asked question in many public forums.

    image image
     image

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