PowerShell Scripts

Some PS1 Scripts here...


Some smaller scripts:

PS: Create Hashes

  This script will create checksum files for individual files or one file that contains all chacksums of a given path (including subfolders) Supported algorithms are MD5 SHA1, SHA256, SHA512. (SHA256 and SHA512 depend on the OS version you run the script on)
>> read more

PS: Create-Mailbox Folder Permission Report

  This script creates a html or csv file based report. Each folder within a given mailbox gets displayed within a tree view (html version). If there are permissions set to this specific folder they get displayed below the foldername.
>> read more

PS: Find-DuplicatesFromHash

  This script analyzes SHA hash files to find duplicates in a given folder structure.
>> read more

PS: Get service state on all servers

  This script crawls all server operating systems in the currend ADDS environment and tries to find out whether the W3C Publishing server is installaed and then reads the service state.
>> read more

PS: Get-ADEnvironment

  This script quickly creates an overview of you ADDS environment. It shows up Forest and domain functional levels, FSMO role holders and domaincontrollers assigned to an ADDS site.
>> read more

PS: Get-FileMetaInformation

  This script returns either all available meta information of a given file. Or it returns the value of a specific meta entry of the given file.
>> read more

PS: Manage AdminSDHolder Accounts

  This script walks through all users within an active directory domain and checks whether the user is or was direct or indirect member of a protected group within AD DS. Afterwards it verifies if the user is still in this protected state or if the flag is orphaned. With this analysis you have to options to just enable inherited permissions for all protected user or you can disable protection for users that have an orphaned protection flag set.
>> read more

PS: Notify User Password Expires

  This script sends out mail notification to users when their password is about to expire. It provides a html based message to the users where you can place company specific information to reset password. If a used has no mail attribute specified an alternate admin recipient can be specified that receives notifications for those accounts so at least an admin is informed. The script can be used with parameters however it is easier to modify the parameters inside the script and copy it if there are different settings required. Please run this script in test mode (without enabled parameter SendMailEnabled) to verify the users for the first run...
>> read more

PS: Start-Archive

  This script can archive files and folders to zip / 7z files. Before archiving the files it can create hashes on the files so the integrity can be verified afterwards. (7z executable is required).
>> read more

PS: Start-HVVEEAMZip

  This script creates and maintains VEEAM Zip Backups of virtual machines hosted on a single Hyper-V server. It is useful for test environments and fully functional with the VEEAM Free edition. You have the ability to do some versioning of your backed up machines as the script takes care of a retention period. Also it uses the VEEAM backup encryption to encrypt the backups. To ensure data consistency a sha512 checksum is created of each created backup file. The script is designed to backup all machines that are in the state "Running" in Hyper-V For machines that are set up to non-production checkpoints it shuts down the VM before the backup. It creates a folder structure for each backup taken. By default this structure uses the format yyyyMMdd below the base folder.
>> read more

PS: Store Credential

  This script stores credentials you enter as a encrypted file. This file can only be used by the same account, that created the file.
>> read more

PS: Trim File

  This is a quick script to remove the last bytes from a given file.
>> read more

PS: Verify Hashes

  This script can verify checksum files. In the default mode it scans a given path for hash files and verifies them. But also combined files with a lot of hashes can be verified.
>> read more