This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Generic Backup Script Template. | |
| .DESCRIPTION | |
| This script serves as a template for creating backup procedures. It provides a framework for logging, | |
| error handling, file compression, and email notifications. Customize the script by adding your specific | |
| backup logic in the designated areas. | |
| .PARAMETER LogFolder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Transfers members from one Active Directory group to another. | |
| .DESCRIPTION | |
| This script transfers a specified number of members from one Active Directory group to another. | |
| It can be used to stage the move of users from one system to another, facilitating gradual migrations | |
| or testing of new environments with a subset of users. | |
| The script performs the following actions: | |
| 1. Transfers specified number of members from a source group to a destination group. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| This script initializes a global log file path and provides a function to log messages with different severity levels (Message, Warning, Error). | |
| .DESCRIPTION | |
| The script defines a global variable for the log file path, which is created based on the script's root path or a custom path if provided. | |
| It includes a Log-Message function to log messages to the file and display them in the console with appropriate colors. | |
| The script logs the start time and the end time along with the total execution time. | |
| .PARAMETER LogFilePath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| DNS Backup Script. | |
| .DESCRIPTION | |
| This script connects to a specified DNS server, retrieves DNS zone and forwarder information, exports the zones and forwarders to files, | |
| compresses the files, and performs cleanup operations. It logs all actions and sends an email notification if an error occurs. | |
| .PARAMETER LogFilePath | |
| The path to the log file where script actions and messages will be recorded. If run from ISE script pane with "Run selection", log file will be saved to C:\Temp\Backup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import SCCM module | |
| Import-Module 'C:\Program Files (x86)\Microsoft Endpoint Manager\AdminConsole\bin\ConfigurationManager.psd1' | |
| # Define the Site Code | |
| $SiteCode = "" | |
| # Define the path to the CSV file | |
| $csvPath = "" | |
| # Define the collection ID to which devices will be added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import SCCM module | |
| Import-Module 'C:\Program Files (x86)\Microsoft Endpoint Manager\AdminConsole\bin\ConfigurationManager.psd1' | |
| # Define the Site Code | |
| $SiteCode = "" | |
| # Define the path to the CSV file | |
| $csvPath = "" | |
| # Define the collection ID to which users will be added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| This script initializes a global log file path and provides a function to log messages with different severity levels (Message, Warning, Error). | |
| .DESCRIPTION | |
| The script defines a global variable for the log file path, which is created based on the script's root path or a custom path if provided. | |
| It includes a Log-Message function to log messages to the file and display them in the console with appropriate colors. | |
| The script logs the start time and the end time along with the total execution time. | |
| .PARAMETER LogFilePath |