• [Script Of Dec. 31] How to grant permissions to a user-defined role in a SQL Server database

    Dec.
    31
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-grant-permissions-1f1b46e5.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This T-SQL script will demo how to grant permissions to a user-defined role and assign the role to some of the users in a specified database.​

    As some customers want to know how to grant some permissions to some users, it is better to create a user-defined role and grant it to the users who need the role permission. In this script, users will get all the permission from login except the permission of deleting rows in a table.

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

  • [Script Of Dec. 30] How to change the collation for all databases in a SQL Server instance

    Dec.
    30
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-change-the-9e7c7eeb.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This T-SQL script will demo how to change the collation of all databases in a SQL Server instance to that of the server.

    There are some people asking how to change the database collation for all databases. This script will provide some help in this respect.

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

  • [Script Of Dec. 29] How to retrieve all the stored procedures in a specified database

    Dec.
    29
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-retrieve-all-the-cc002c3c.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This PowerShell script will help us get the codes of stored procedures in a specified database.

    A lot of people asked for methods to get the codes of stored procedures in a specified database. Some people want to save the codes so that they can run these codes in other databases.

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

  • [Script Of Dec. 27] How to set default printer using VBScript

    Dec.
    27
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-set-default-printer-00dbc561.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This VBScript shows how to set default printer in Windows.

    In real world, we usually have multiple printers in our company environment. IT admins want to user regularly use specified printer, they have to let user to pick one as default printer.

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

  • [Script Of Dec. 26] How to set default printer using PowerShell

    Dec.
    26
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-set-default-printer-cf89670b.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This PowerShell script shows how to set default printer in Windows.

    In real world, we usually have multiple printers in our company environment. IT admins want to user regularly use specified printer, they have to let user to pick one as default printer.

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