//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// DATAPIPE WINDOWS POWERSHELL PSM //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CHANGE LOG: 1.2.3 - 10/2/2015 DPSetTimezone - Git Issue #83 - Corrected an issue where the timezone change fails but an error is not logged. DPAddAutoResumeNoLogon - Git Issue #84 - Corrected an issue where the autoresume account is unable to log on if the server is on a domain. 1.2.2 - 9/29/2015 DPHardenSSL - Git Issue #79 - Corrected an issue where errors were logged if IIS was not installed. DPInstallBES - Git Issue #80 - Corrected an issue where specified relays are overridden by relay auto discovery. DPSetTimezone - Git Issue #77 - Corrected an issue where the Pacific timezone was being rejected. 1.2.1 - 9/16/2015 - 9/25/2015 DPHardenSSL - Git Issue #75 - Corrected an issue where errors were logged if IIS was not installed. DPInstallSSHAgent - Git Issue #76 - Corrected an issue where errors were logged if the SSH agent was already installed. DPInstallBES - Git Issue #70 - Added the BES locations: Iceland and Virginia. DPInstallBES - Git Issue #71 - Added True and False as valid input to licensing fields. DPInstallBES - Git Issue #72 - Added code to create custom Datapipe reg keys BES uses (if not detected). DPAWSUpdateTools - Git Issue #73 - Corrected an issue where AWS tools would not install. DPInstallEM7 - Git issue #52 - Re-wrote the function to include a switch will allows you to use locally cached installers. DPInstallSSHAgent - Git issue #53 - Re-wrote the function to include a switch will allows you to use locally cached installers. DPSetPageFile - Git Issue #54 - Added code to automatically set the page file to 1.5x memory up to 80% of the C: drive (combined with the OS and existing files, etc). DPDisableRDPTimeouts - Git Issue #47 - New function, disabled RDP session and disconnected timeout limits. DPADJoinDomain - Git Issue #59 - Added code to allow you to specify the OU path as well as a new server name. DPInstallObserver - Git Issue #60 - Added code to hide list of files back up from the PS console, when Observer is detected as already installed. DPInstallObserver - Git Issue #51 - Re-wrote the function to include a switch will allows you to use locally cached installers. DPInstallBES - Git Issue #48 - Re-wrote the function to include a switch will allows you to use locally cached installers. DPInstallBES - Git Issue #62 - Added an option to include the BES field: BusinessUnit DPInstallNET452 - Git Issue #50 - Re-wrote the function to include a switch will allows you to use locally cached installers. DPInstallMPIO - Git Issue #49 - Re-wrote the function to include a switch will allows you to use locally cached installers. DPInstallWindowsUpdates - Git Issue #61 - Added code which will now display installing update x of y, y being the total # of updates. DPLicenseWindows - Git Issue #63 - New function. Licenses and activates Windows. DPDisableWindowsFW - GIT Issue #65 - Added options to disable individual FW profiles. DPDisableUnnecessaryServices - Git Issue #66 - Added options to disable individual services. DPSetTimezone - Git Issue #64 - Added all Windows timezones with their full name as an option. DPDisableOffload - Git Issue #67 - Added options to disable TCP and RSS individually. DPDisableRDPTimeouts - Git Issue #69 - Added options to disable idle and session timeouts individually. DPGetSG - New function. Returns AWS security group id from string name. Works without a default VPC unlike Get-EC2SecurityGroup DPAddSGRule - New function. Adds a security group rule to a security group by name. Can use cidr notation or open to another security group by name 1.2.0 - 7/8/2015 - 8/20/2015 DPInstallObserver - Resolved an issue where Oberserver was not detected (wrong service name). DPGeneratePassword - Resolved an issue where < and > inside the password could prevent autoresume. DPAD2012EnableRecyleBin - New function. Enables the AD recycle bin on 2012 and 2012 R2 forests. DPADIsCurrentUserDomainAdmin - New function. Determines if the current user is a domain administrator. DPAD2012SetupDumps - New function. Configures AD dumps (backups). DPInstallBES - Resolved an issue where an error would display if the BesClient was not present. DPSetFailureFlag - Changed message error level from info to error. DPWindowsPSM - Git Issue #3 - Merged Write-Host into DPLog and change output text color to match Info, Error, etc DPLOG - Added code to detect message error level. DPLOG - Added code to automatically write output to the host. DPLOG - Added a switch to disable writing output to the host. DPLOG - Added code to change color of the text outputted to the host based on the error level. DPAD2012SetupDumps - Git Issue #1 - Corrected a typo in message text. DPInstallEM7 - Git Issue #7 - Added code to silently continue when initially checking if SNMP is installed. DPInstallEM7 - Removed code which was adding an unnecessary reg key. DPInstallObserver - Git Issue #5 - Added code to silently continue when initially checking if Observer is installed. DPInstallNET35 - Git Issue #6 - Added code to silently continue when checking if .NET 3.5 is already installed nd if 2012/2012R2 hotfixes are installed. DPInstallObserver - Git Issue #12 - Added code to backup and uninstall Observer, then install the latest msi from Toolkit. DPInstallObserver - Git Issue #13 - Added code to edit easyAgent config file to use .NET 4.0 if 3.0 or 3.5 is not installed. DPInstallMPIO - Git Issue #11 - New function. Installs MPIO on 2008R2, 2012, 2012 R2. Options to add identifiers included. DPADLimitRPCPorts - Git Issue #8 - New function. Limits AD's RPC port range. DPInstallMPIO - Git Issue #14 - Added code to detect and install MPIO hotfixes. DPInstallNET35 - Git Issue #15 - Added code to remove the installers from C:\Windows\Temp. DPInstallNET452 - Git Issue #15 - Added code to remove the installers from C:\Windows\Temp. DPInstallObserver - Git Issue #15 - Added code to remove the installers from C:\Windows\Temp. DPInstallNET452 - Git Issue #16 - Changed the way the function confirms .NET was installed from the installation's exit code to a registry key check. DPInstallNET452 - Git Issue #17 - Added code to detect if .NET was already installed. DPWindowsPSM - Git Issue #18 - Added code to customize the PS title bar to read: "DP Windows PSM | Version :$Version | Date: $Date". DPInstallEM7 - Git Issue #25 - Corrected an issue where "/f" was added to the registry for collectors that were not specified. DPInstallEM7 - Git Issue #22 - Added code to detect if the server is 2012 R1/R2. If detected, management tools are also installed. This will be included in the 1.2.0 update. DPAddAutoResumeNoLogon - Git Issue #19 - Added code to detect security banner which prevents auto resume from working. The banner is backed up and removed. DPRemoveAutoResumeNoLogon - Git Issue #19 - Added code to detect if a backup of the security banner which prevents auto resume from working is present. The banner is then restored. DPDownloadFile - Git Issue #30 - New function. Downloads files for you. DPGetOSVersion - Git Issue #26 - New function. Provides OS version and architecture information, and sets a global function. DPGetPSVersion - Git Issue #29 - New function. Provides PS version information and sets a global function. DPConfirmInternet - Git Issue #28 - New function. Confirms internet access and sets a global function. DPWindowsPSM - Updated PSM banner to include OS, PS and internet access information. DPInstallEM7 - Git Issue #27 - Added code to install install KB2786454 (SNMP hotfix) along with SNMP. DPWindowsPSM - Justin added various SQL functions. DPDetectDotNet - Git Issue #38 - New function. Detects .NET versions installed and sets global variables. DPInstallSSHAgent - Git Issue #37 - New function. Installs the DP SSH Agent DPWindowsPSM - Updated PSM banner to include installed .NET versions. DPWindowsPSM - Removed SQL PSM commands DPListVolumes - Renamed to DPAWSListVolumes DPUpdateAWSTools - Renamed to DPAWSUpdateTools DynamicParam - Renamed New-to DPNewDynamicParam DPDownloadFile - Git Issue #39 - Added a new switch to DPDownloadFile (-UseDotNetDownloadMethod) which will use a .NET download string method rather than invoke-webrequest. DPConfirmInternet - Git Issue #39 - Added UseDotNetDownloadMethod switch when this function invokes DPDownloadFile. DPSetFailureFlag - Git Issue #41 - Added code to disable output to the PS host. DPClearFailureFlag - Git Issue #41 - Added code to disable output to the PS host. DPGeneratePassword - Git Issue #40 - Added a switch (-DisableOutput) which prevents the password from being written to the PS console. DPGeneratePassword - Git Issue #40 - Removed "Write-Host "PLEASE WAIT... GENERATING PASSWORD" DPDisableAutomaticOptimization - Git Issue #42 - New function. Disables disk optimization and auto defrag on 2012/2012 R2. DPInstallTelnetClient - Git Issue #44 - New function. Installs Windows telnet client on 2012/2012 R2. 1.1.9 - 6/2/2015 - 6/18/2015 ALL FUNCTIONS - Re-wrote the way failures are detected and handled. Failures will no longer cause your automation/orchestration script to close. The actual function only exits. Toolkit/Internet access checks - Resolved an issue with servers with egress filtering enabled. Changed all internet and toolkit access checks to download a temp file rather than test-connection. ServerManager Module - Server Manager does not exist on servers > 2008 R2, causing a console error. The module now checks the OS version before attempting to import the Server Manager PS module. DPDisableWindowsUpdateCheck - New function. Disabled the Windows Update notification. Windows 2003 +. DPAWSGetInstanceID - New function. Detects the AWS instance ID. Windows 2003 +. DPAWSGetInstanceType - New function. Detects the AWS instance type. Windows 2003 +. DPWindowsPSMAutoUpdate - New function. Allows the PSM to automatically update without user intervention. Windows 2008 +. DPGeneratePassword - New function. Generates random, complex passwords, with a random or specified lengthup to 60 characters long. DPCreateRandomPassword - Removed function. Replaced by DPGeneratePassword. DPCreateRandomString - Removed function. Replaced by DPGeneratePassword. DPClearFailureFlag - New function. Resets a flag set by functions when they failed. This function is used within other functions, not in the automation/orchestratio scripts. DPSetFailureFlag - New function. Sets a flag when functions fail. The function closes but not the automation script. To exit the script, detect the flag using DPDetectFailureAndExit. DPDetectFailureAndExit - New function. Detects the failure flag set by DPSetFailureFlag. Used within your automation scripts, it will exit the script if a failure was detected in the previous function. DPEditLocalUser - New function. Edits local users (change password, add to admins, set password expiration, etc) DPHardenSSL - New function. Hardens SSL, orders ciphers and sets Strict-Transport-Security in IIS if installed. DPInstallIIS - New function. Installs IIS. DPViewAutomationLog - New function. Opens the DPAutomation log in notepad (default) or the console. Option to specify alternate log location. DPPasswordHashMgr - New function. Encrypt or decrypt sensitive strings. 1.1.8 - 6/1/2015 DPAWSGetRegionName - Added AWS region - EU (Frankfurt) eu-central-1 DPAWSSetTimezone - Added timezone for eu-central-1 (W. Europe Standard Time) 1.1.7 - 5/12/2015 ServerManager - Added code to import the Server Manager PS module (resolves an issue with Add-Windows feature on 2008 R2 servers with Powershell 2.0. DPInstallEM7 - Added subfeatures when installing SNMP. - Changed code that pushes the required registry keys from Set-ItemProperty to REG ADD. - Corrected SNMP enable authentication traps registry key type (REG_DWORD). PSM Update Check - Changed download method from invoke-webrequest to a system object on 2008 R2 servers with Powershell 2.0 installed, to resolve a download issue. DPWindowsPSMReleaseNotes - Changed download method from invoke-webrequest to a system object on 2008 R2 servers with Powershell 2.0 installed, to resolve a download issue. DPWindowsPSMUpdate - Changed download method from invoke-webrequest to a system object on 2008 R2 servers with Powershell 2.0 installed, to resolve a download issue. DPInstallNET35 - Changed download method from invoke-webrequest to a system object on 2008 R2 servers with Powershell 2.0 installed, to resolve a download issue. DPInstallBES - Changed download method from invoke-webrequest to a system object on 2008 R2 servers with Powershell 2.0 installed, to resolve a download issue. - Removed code that downloads and locks the BES service. 1.1.2 - 10/16/14 DPAutomationStartEmail - Removed 2003 support. AWS SES is rejecting the mail message on PS 2 due to lack of port support. DPAutomationCompleteEmail - Removed 2003 support. AWS SES is rejecting the mail message on PS 2 due to lack of port support. DPAddLocalUser - Added this new function. DPSetLogSize - Added this new function. DPAWSGetEC2Tag - Added this new function. 1.1.1 - 10/15/14 DPInstallNET35 - Added code to detect 2 patches from MS that prevent 3.5 from installing on 2012/2012 R2. If detected a patch will be installed before installing 3.5. DPAutomationStartEmail - Sends an email from DPAutomation@datapipe.com at the beginning of your automation job, via AWS SES. DPAutomationCompleteEmail - Sends an email from DPAutomation@datapipe.com upon completion of your automation job, with the dpautomation log attached, via AWS SES. DPRenameAdminToDpadmin - Renames the local administrator account to dpadmin. 1.1.0 - 10/14/14 DPInstallEM7 - Added this new function (2008, 2008 R2, 2012, 2012 R2). DPAWSApplyInboundSGACLRules - Added this new function (Justin P wrote it). DPAWSUpdateEC2Tag - Justin removed the region parameter as it now gets it programmatically. 1.0.9 - 10/10/14 DPADInstallNew2012DC – Removed .NET 3.5 dependency/installation. DPADInstallNew2012Forest – Removed .NET 3.5 dependency/installation. DPDisableIEESC - Added this new function. DPDisableIPV6 - Added this new function. DPDisableUAC - Added this new function. DPDisableVolumeNotification - Added this new function. DPInstallNET35 - Added this new function. DPInstallObserver - Added this new function. DPSetHighPerformanceMode - Added this new function. 1.0.8 - 10/9/14 DPAddAutoResumeNoLogon - Resolved a random issue where certain character combinations in the DPAutoresume password caused the runonce key to fail. DPADLimitRPCPorts - Corrected typos in the help file. 1.0.7 - 10/8/14 DPSetTimezone – Added HKG as an accepted timezone code in the function’s validation. DPAWSUpdateEC2Tag – Added new function written by Justin. It allows you to create and update EC2 tags. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////