Collection of scripts for my own use
Use at your own risk
- getUsersEmailFromUserNameInTextFile.ps1 - Get Usernames from text file and output email, department and other properties to CSV file (text file with 1 username per newline).
- addComputers.ps1 - Add computers from CSV file to Logon Workstations for every user in an OU.
- Get users who expires on a Date.ps1 - Check which users expires on a certain date in the future.
- Get-Uptime.ps1 - Get local computer uptime.
- GetUserLastLogon.ps1 - Get users last logon time and last password change time.
- GetProfilesModifiedWithin.ps1 - Get names of top folders where any subfiles/folders have been written to within last XX days.
- resetUserFolderPermissions.ps1 - Recursively reset owner to user (based on folder name).
- controlServicesOnMultipleMachines.ps1 - Template for controlling multiple services on multiple servers. Needs editing based on what you want to do.
- getRemoteServersMemory.ps1 - Get memory usage and stats for multiple machines (WMI TCP 135+highports + 445 required)
- checkAllUserProfilesForCertainFolderFiles.ps1 - Script to find if certain folder in user profile share contains files or is empty. For multiple users.
- MachinesWithoutLogonOver30Days.ps1 - Find Desktop VDIs which have not been used over 30 days
- MigrateMyDocumentsWithPermissions.ps1 - Move only one profile subfolder for multiple users from one share to another, keep permissions
- controlServicesOnMultipleMachines.ps1 - Edit services on multiple machines
- findBrokenSIDCitrix.ps1 - Find and list broken SID in Citrix Studio Applications
- AddGroupToApplicationsInDeliveryGroup.ps1 - Add AD user or group to all applications in delivery group
- GetApplicationsFromDesktopGroup-Report.ps1 - Export a CSV with all applications from delivery group
- AddCategoryToApplicationsInDeliveryGroup.ps1 - Add "Application category" to all applications in delivery group
- MonitorDeliveryGroupLoad.ps1 - Log the average index load of all delivery groups which name does not contain "test". Send logs to event viewer.
- Duplicate applications move them to another delivery group and add text to application name.ps1.ps1 - Duplicate applications, move them to another delivery group and append text to application name
- removeUserProfileBackups.ps1 - Remove all profile folders based on pattern ex. (username.old)
- removeUserProfilesLastWrite90Days.ps1 - Remove all profile folders older than amount of days
- getApplicationsWithMultipleDeliveryGroups.ps1 - Get all applications from a delivery group, check if each applications has multiple different delivery groups (including the applications app groups tied to delivery groups)
- RemoveMultipleDeliveryGroupsFromApplicationWithAppGroup.ps1 - Get all applications from a delivery group, check if each applications has both an App Group and Delivery groups. Uncomment Remove-BrokerApplication to remove the delivery groups from the applications found.