• [Script of May 10] Get logins, databases users/roles and object level permission (T-SQL)

    Script Download: LoginUserRolePermission.zip
    http://gallery.technet.microsoft.com/scriptcenter/Get-logins-databases-816f66b2/

    This script contains three code parts, one to get the result of server level logins and related roles, one to get the result of user databases’ users and related roles, one to get the result of object level permission of specific database.

    This script can be used to get the following results:

    • Server level logins and related roles
    • User databases users and related roles
    • Object level permission of specific database

     

    image image
    image

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

  • [Script of May 9] Script to remove Internet Explorer in Windows 7 (VBScript)

    Script Download: RemoveInternetExplorer(VBScript).zip
    http://gallery.technet.microsoft.com/scriptcenter/Script-to-remove-Internet-10785136/

    This VBScript demo shows how to remove Internet Explorer in Windows 7.

    In some situations, customers need to uninstall Internet Explorer 9 to fix crash issue, but they cannot manually uninstall Internet Explorer successfully sometimes. 

    image image
    image

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

  • [Script of May 8] Display what OU the objects belong to (PowerShell)

    Script Download: ADAccountBelongsTo.zip
    http://gallery.technet.microsoft.com/scriptcenter/Display-what-OU-the-5e9e19e0/

    This PowerShell Script shows what OU the objects belong to. 

    Many users have ever asked is there any way to list what OU the objects belong to. If we provide a script can do it, obviously this could be done by scripting.​  

    image image
    image

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

  • [Script of May 7] Delete duplicate m-1 rows in a table whose first n columns are the same (T-SQL)

    Script Download: Deleteduplicaterows.zip
    http://gallery.technet.microsoft.com/scriptcenter/Delete-duplicate-m-1-rows-ab1c9525

    This T-SQL script sample shows how to delete some duplicate rows in a table whose first 3 columns are the same and keep only one row. You can write a script according to your request by referencing this script.

    Some people ask for a script to delete duplicate rows and keep only one row in a table. This T-SQL script sample will show you by creating a new table TestTable to imitate your table and a temporary table #TempTable. All the duplicate data will be stored in the temporary table. After executed, it will generate 2 tables, one to show you the duplicate data and a table to show the final result. 

    image image
    image

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

  • [Script of May 6] Check SQL Server a specified database index fragmentation percentage (SQL)

    Script Download: IndexFragmentation.zip
    http://gallery.technet.microsoft.com/scriptcenter/Check-SQL-Server-a-a5758043

    This T-SQL sample script illustrates how to check index fragmentation of a specified database in SQL Server.

    This script can be used for checking index fragmentation percentage of tables in SQL Server user databases. You can specify the database name and fragmentation percent, after you run the script, you will get the result.

     

    image image
    image

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