├── .github └── workflows │ ├── linter.yml │ └── psanalyzer-codecheck.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── PureStoragePowerShellToolkit.psd1 ├── PureStoragePowerShellToolkit.psm1 ├── README.md ├── en-us ├── PureStoragePowerShellToolkit.psm1-Help.md ├── PureStoragePowerShellToolkit.psm1-Help.xml └── about_PureStoragePowerShellToolkit1.Help.txt └── settings.json /.github/workflows/linter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ########################### 3 | ########################### 4 | ## Linter GitHub Actions ## 5 | ########################### 6 | ########################### 7 | name: Lint Code Base 8 | 9 | # 10 | # Documentation: 11 | # https://help.github.com/en/articles/workflow-syntax-for-github-actions 12 | # 13 | 14 | ############################# 15 | # Start the job on all push # 16 | ############################# 17 | on: 18 | push: 19 | branches-ignore: [master] 20 | # Remove the line above to run when pushing to master 21 | pull_request: 22 | branches: [dev] 23 | 24 | ############### 25 | # Set the Job # 26 | ############### 27 | jobs: 28 | build: 29 | # Name the Job 30 | name: Lint Code Base 31 | # Set the agent to run on 32 | runs-on: ubuntu-latest 33 | 34 | ################## 35 | # Load all steps # 36 | ################## 37 | steps: 38 | ########################## 39 | # Checkout the code base # 40 | ########################## 41 | - name: Checkout Code 42 | uses: actions/checkout@v2 43 | with: 44 | # Full git history is needed to get a proper list of changed files within `super-linter` 45 | fetch-depth: 0 46 | 47 | ################################ 48 | # Run Linter against code base # 49 | ################################ 50 | - name: Lint Code Base 51 | uses: github/super-linter@v4 52 | env: 53 | VALIDATE_ALL_CODEBASE: false 54 | DEFAULT_BRANCH: dev 55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 | -------------------------------------------------------------------------------- /.github/workflows/psanalyzer-codecheck.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | # 6 | # https://github.com/microsoft/action-psscriptanalyzer 7 | # For more information on PSScriptAnalyzer in general, see 8 | # https://github.com/PowerShell/PSScriptAnalyzer 9 | 10 | name: PSScriptAnalyzer 11 | 12 | on: 13 | push: 14 | branches: [ dev ] 15 | pull_request: 16 | branches: [ dev ] 17 | schedule: 18 | - cron: '35 21 * * 0' 19 | 20 | jobs: 21 | build: 22 | name: PSScriptAnalyzer 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v2 26 | 27 | - name: Run PSScriptAnalyzer 28 | uses: microsoft/psscriptanalyzer-action@2044ae068e37d0161fa2127de04c19633882f061 29 | with: 30 | # Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options. 31 | # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. 32 | path: .\ 33 | recurse: true 34 | # Include your own basic security rules. Removing this option will run all the rules 35 | includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText", "PSAvoidEmptyCatchBlock", "PSAvoidUsingComputerNameHardcoded"' 36 | output: results.sarif 37 | 38 | # Upload the SARIF file generated in the previous step 39 | - name: Upload SARIF results file 40 | uses: github/codeql-action/upload-sarif@v1 41 | with: 42 | sarif_file: results.sarif 43 | 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | @@ -0,0 +1,216 @@ 2 | ################# 3 | ## Eclipse 4 | ################# 5 | 6 | *.pydevproject 7 | .project 8 | .metadata 9 | bin/ 10 | tmp/ 11 | *.tmp 12 | *.bak 13 | *.swp 14 | *~.nib 15 | local.properties 16 | .classpath 17 | .settings/ 18 | .loadpath 19 | 20 | # External tool builders 21 | .externalToolBuilders/ 22 | 23 | # Locally stored "Eclipse launch configurations" 24 | *.launch 25 | 26 | # CDT-specific 27 | .cproject 28 | 29 | # PDT-specific 30 | .buildpath 31 | 32 | 33 | ################# 34 | ## Visual Studio 35 | ################# 36 | 37 | ## Ignore Visual Studio temporary files, build results, and 38 | ## files generated by popular Visual Studio add-ons. 39 | 40 | # User-specific files 41 | *.suo 42 | *.user 43 | *.sln.docstates 44 | 45 | # Build results 46 | 47 | [Dd]ebug/ 48 | [Rr]elease/ 49 | x64/ 50 | build/ 51 | [Bb]in/ 52 | [Oo]bj/ 53 | 54 | # MSTest test Results 55 | [Tt]est[Rr]esult*/ 56 | [Bb]uild[Ll]og.* 57 | 58 | *_i.c 59 | *_p.c 60 | *.ilk 61 | *.meta 62 | *.obj 63 | *.pch 64 | *.pdb 65 | *.pgc 66 | *.pgd 67 | *.rsp 68 | *.sbr 69 | *.tlb 70 | *.tli 71 | *.tlh 72 | *.tmp 73 | *.tmp_proj 74 | *.log 75 | *.vspscc 76 | *.vssscc 77 | .builds 78 | *.pidb 79 | *.log 80 | *.scc 81 | 82 | # Visual C++ cache files 83 | ipch/ 84 | *.aps 85 | *.ncb 86 | *.opensdf 87 | *.sdf 88 | *.cachefile 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | 102 | # TeamCity is a build add-in 103 | _TeamCity* 104 | 105 | # DotCover is a Code Coverage Tool 106 | *.dotCover 107 | 108 | # NCrunch 109 | *.ncrunch* 110 | .*crunch*.local.xml 111 | 112 | # Installshield output folder 113 | [Ee]xpress/ 114 | 115 | # DocProject is a documentation generator add-in 116 | DocProject/buildhelp/ 117 | DocProject/Help/*.HxT 118 | DocProject/Help/*.HxC 119 | DocProject/Help/*.hhc 120 | DocProject/Help/*.hhk 121 | DocProject/Help/*.hhp 122 | DocProject/Help/Html2 123 | DocProject/Help/html 124 | 125 | # Click-Once directory 126 | publish/ 127 | 128 | # Publish Web Output 129 | *.Publish.xml 130 | *.pubxml 131 | *.publishproj 132 | 133 | # NuGet Packages Directory 134 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 135 | #packages/ 136 | 137 | # Windows Azure Build Output 138 | csx 139 | *.build.csdef 140 | 141 | # Windows Store app package directory 142 | AppPackages/ 143 | 144 | # Others 145 | sql/ 146 | *.Cache 147 | ClientBin/ 148 | [Ss]tyle[Cc]op.* 149 | ~$* 150 | *~ 151 | *.dbmdl 152 | *.[Pp]ublish.xml 153 | *.pfx 154 | *.publishsettings 155 | 156 | # RIA/Silverlight projects 157 | Generated_Code/ 158 | 159 | # Backup & report files from converting an old project file to a newer 160 | # Visual Studio version. Backup files are not needed, because we have git ;-) 161 | _UpgradeReport_Files/ 162 | Backup*/ 163 | UpgradeLog*.XML 164 | UpgradeLog*.htm 165 | 166 | # SQL Server files 167 | App_Data/*.mdf 168 | App_Data/*.ldf 169 | 170 | ############# 171 | ## Windows detritus 172 | ############# 173 | 174 | # Windows image file caches 175 | Thumbs.db 176 | ehthumbs.db 177 | 178 | # Folder config file 179 | Desktop.ini 180 | 181 | # Recycle Bin used on file shares 182 | $RECYCLE.BIN/ 183 | 184 | # Mac crap 185 | .DS_Store 186 | 187 | 188 | ############# 189 | ## Python 190 | ############# 191 | 192 | *.py[cod] 193 | 194 | # Packages 195 | *.egg 196 | *.egg-info 197 | dist/ 198 | build/ 199 | eggs/ 200 | parts/ 201 | var/ 202 | sdist/ 203 | develop-eggs/ 204 | .installed.cfg 205 | 206 | # Installer logs 207 | pip-log.txt 208 | 209 | # Unit test / coverage reports 210 | .coverage 211 | .tox 212 | 213 | #Translations 214 | *.mo 215 | 216 | #Mr Developer 217 | .mr.developer.cfg 218 | /Junk/*.* 219 | .vscode/settings.json 220 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Pure Storage PowerShell Toolkit 2 | 3 | # Revision 2.0.4.0 4 | 5 | 04-18-2022 6 | 7 | - Added cmdlet New-FlashArrayExcelReport 8 | 9 | # Revision 2.0.3.3 10 | 11 | 03-08-2022 12 | 13 | - Added cmdlet Restore-PfaPGroupVolumeSnapshots 14 | 15 | # Revision 2.0.3.2 16 | 17 | 10-20-2021 18 | 19 | - Corrected folder create in Get-WindowsDiagnosticInfo function 20 | 21 | # Revision 2.0.3.1 22 | 23 | 9-27-2021 24 | 25 | - typo in psd1 file fixed 26 | - Fixed Get-MPIODiskLBPolicy and Set-MPIODiskLBPolicy cmdlets to use correct execution and parameters with mpclaim.exe. 27 | - Added helper function to check for SDK v2 module. 28 | - NOTE: Purity API versions 2.0 and 2.1 require authentication via OAuth. The logic is not yet included to authenticate 29 | using this method, so only Token authentication can happen at this time with any cmdlets that require the SDKv2. 30 | The logic to allow OAuth will be added to a future revision. 31 | - Added Get-FlashArrayConnectDetails cmdlet. Thanks to JD Wallace. 32 | - Formatting changes 33 | 34 | # Revision 2.0.2.0 35 | 36 | 8-23-2021 37 | 38 | - Added cmdlets: 39 | Get-WindowsDiagnosticInfo, Get-FlashArrayRASession, Get-FlashArrayQuickCapacityStats, New-FlashArrayPGroupVolumes, Get-FlashArrayVolumeGrowth 40 | Changed cmdlets: Show-FlashArrayPGroupsConfig to proper verb of Get-FlashArrayPGroupsConfig 41 | Changed cmdlets: 'Pfa' prefixed cmdlets to 'FlashArray' for clarity with SDK v1 cmdlet naming as well as future FlashBlade cmdlets: 42 | Get-PfaSerialNumbers to Get-FlashArraySerialNumbers 43 | New-PfaDbSnapshot to New-FlashArrayDbSnapshot 44 | Invoke-PfaDbRefresh to Invoke-FlashArrayDbRefresh 45 | 46 | # Revision 2.0.1.0 47 | 48 | 7-28-2021 49 | 50 | - Merged Pure Storage DBAToolkit functions 51 | - Cleaned up typos in Help 52 | 53 | # Revision 2.0.0.0 54 | 55 | Release version: 2.0.0.0 56 | Release date: 7.13.2021 57 | 58 | - Refactoring and cleanup of version 1911.0 coding. 59 | - Additional helper functions added for SDK module check/load, admin-level check, Hyper-V checks, and FlashArray login. 60 | - Adding of the global $Creds variable to make single array authentication easier. 61 | \*\* Create the $Creds variable by issuing a $Creds = Get-Credential command. 62 | - 13 new cmdlets added (see list below). 63 | - 2 cmdlets removed. 64 | - Help fully updated. 65 | 66 | ## Known Issues 67 | 68 | Cmdlet Get-FlashArraySpace - Code is returning a "ParseExact" error message for each object returned, but it does return valid data. Under investigation. 69 | 70 | Cmdlet Get-FlashArrayDisconnectedVolumes - Code returning error for 'hash.Add' function. These can be ignored. Under investigation. 71 | 72 | ## Cmdlets included 73 | 74 | - Get-AllHostVolumeInfo 75 | - Set-WindowsPowerScheme 76 | - Get-HostBusAdapter 77 | - Register-HostVolumes 78 | - Unregister-HostVolumes 79 | - Get-QuickFixEngineering 80 | - Test-WindowsBestPractices 81 | - New-VolumeShadowCopy 82 | - Get-VolumeShadowCopy 83 | - New-FlashArrayCapacityReport 84 | - Update-DriveInformation 85 | - Sync-FlashArrayHosts 86 | - Get-FlashArraySerialNumbers 87 | - New-HypervClusterVolumeReport 88 | - Set-TlsVersions 89 | - Get-MPIODiskLBPolicy 90 | - Set-MPIODiskLBPolicy 91 | - Get-FlashArrayStaleSnapshots 92 | - Get-FlashArrayDisconnectedVolumes 93 | - Get-FlashArrayArraySpace 94 | - Get-FlashArrayPgroupsConfig 95 | - Remove-FlashArrayPendingDeletes 96 | - Get-FlashArrayConfig 97 | - Get-FlashArraySerialNumbers 98 | - Get-FlashArrayHierarchy 99 | - New-FlashArrayDbSnapshot 100 | - Invoke-DynamicDataMasking 101 | - Invoke-StaticDataMasking 102 | - Invoke-FlashArrayDbRefresh 103 | - Get-WindowsDiagnosticInfo 104 | - Get-FlashArrayRASession 105 | - Get-FlashArrayQuickCapacityStats 106 | - New-FlashArrayPGroupVolumes 107 | - Get-FlashArrayVolumeGrowth 108 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /PureStoragePowerShellToolkit.psd1: -------------------------------------------------------------------------------- 1 | <# 2 | =========================================================================== 3 | Created by: FlashArray Integrations and Evangelism Team @ Pure Storage 4 | Organization: Pure Storage, Inc. 5 | Filename: PureStoragePowerShellToolkit.psd1 6 | Copyright: (c) 2022 Pure Storage, Inc. 7 | Module Name: PureStoragePowerShellToolkit 8 | Description: PowerShell Script Module Manifest (.psd1) 9 | ------------------------------------------------------------------------- 10 | Disclaimer 11 | The sample script and documentation are provided AS IS and are not supported by 12 | the author or the author's employer, unless otherwise agreed in writing. You bear 13 | all risk relating to the use or performance of the sample script and documentation. 14 | The author and the author's employer disclaim all express or implied warranties 15 | (including, without limitation, any warranties of merchantability, title, infringement 16 | or fitness for a particular purpose). In no event shall the author, the author's employer 17 | or anyone else involved in the creation, production, or delivery of the scripts be liable 18 | for any damages whatsoever arising out of the use or performance of the sample script and 19 | documentation (including, without limitation, damages for loss of business profits, 20 | business interruption, loss of business information, or other pecuniary loss), even if 21 | such person has been advised of the possibility of such damages. 22 | =========================================================================== 23 | #> 24 | 25 | @{ 26 | 27 | # Script module or binary module file associated with this manifest. 28 | RootModule = 'PureStoragePowerShellToolkit.psm1' 29 | 30 | # Version number of this module. 31 | 32 | ModuleVersion = '2.0.4.0' 33 | 34 | # Supported PSEditions 35 | #CompatiblePSEditions = @("Desktop", "Core") 36 | 37 | # ID used to uniquely identify this module 38 | GUID = 'e7b43c4e-8e89-4e4f-9172-18d19107ada9' 39 | 40 | # Author of this module 41 | Author = 'Pure Storage' 42 | 43 | # Company or vendor of this module 44 | CompanyName = 'Pure Storage, Inc.' 45 | 46 | # Copyright statement for this module 47 | Copyright = '(c) 2022 Pure Storage, Inc. All rights reserved.' 48 | 49 | # Description of the functionality provided by this module 50 | Description = 'PowerShell Toolkit for Pure Storage Flasharray and Initiators.' 51 | 52 | # Minimum version of the Windows PowerShell engine required by this module 53 | PowerShellVersion = '5.1' 54 | 55 | # Name of the Windows PowerShell host required by this module 56 | PowerShellHostName = '' 57 | 58 | # Minimum version of the Windows PowerShell host required by this module 59 | PowerShellHostVersion = '' 60 | 61 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. 62 | DotNetFrameworkVersion = '4.5' 63 | 64 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. 65 | CLRVersion = '' 66 | 67 | # Processor architecture (None, X86, Amd64) required by this module 68 | ProcessorArchitecture = '' 69 | 70 | # Modules that must be imported into the global environment prior to importing this module 71 | RequiredModules = @() 72 | 73 | # Assemblies that must be loaded prior to importing this module 74 | RequiredAssemblies = @() 75 | 76 | # Script files (.ps1) that are run in the caller's environment prior to importing this module. 77 | ScriptsToProcess = @() 78 | 79 | # Type files (.ps1xml) to be loaded when importing this module 80 | TypesToProcess = @() 81 | 82 | # Format files (.ps1xml) to be loaded when importing this module 83 | FormatsToProcess = @() 84 | 85 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess 86 | #NestedModules = @('Show-ModuleLoadBanner.ps1') 87 | 88 | # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. 89 | FunctionsToExport = @( 90 | 'Get-AllHostVolumeInfo', 91 | 'Set-WindowsPowerScheme', 92 | 'Get-HostBusAdapter', 93 | 'Register-HostVolumes', 94 | 'Unregister-HostVolumes', 95 | 'Get-QuickFixEngineering', 96 | 'Test-WindowsBestPractices', 97 | 'New-VolumeShadowCopy', 98 | 'Get-VolumeShadowCopy', 99 | 'New-FlashArrayCapacityReport', 100 | 'Update-DriveInformation', 101 | 'Sync-FlashArrayHosts', 102 | 'Get-FlashArraySerialNumbers', 103 | 'New-HypervClusterVolumeReport', 104 | 'Set-TlsVersions', 105 | 'Get-MPIODiskLBPolicy', 106 | 'Set-MPIODiskLBPolicy', 107 | 'Get-FlashArrayStaleSnapshots', 108 | 'Get-FlashArrayDisconnectedVolumes', 109 | 'Get-FlashArrayArraySpace', 110 | 'Get-FlashArrayPgroupsConfig', 111 | 'Remove-FlashArrayPendingDeletes', 112 | 'Get-FlashArrayConfig', 113 | 'Get-FlashArraySerialNumbers', 114 | 'Get-FlashArrayHierarchy', 115 | 'New-FlashArrayDbSnapshot', 116 | 'Invoke-DynamicDataMasking', 117 | 'Invoke-StaticDataMasking', 118 | 'Invoke-FlashArrayDbRefresh', 119 | 'Get-WindowsDiagnosticInfo', 120 | 'Get-FlashArrayRASession', 121 | 'Get-FlashArrayQuickCapacityStats', 122 | 'New-FlashArrayPGroupVolumes', 123 | 'Get-FlashArrayVolumeGrowth', 124 | 'Get-FlashArrayConnectDetails', 125 | 'Restore-PfaPGroupVolumeSnapshots', 126 | 'New-FlashArrayExcelReport' 127 | ) 128 | 129 | # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. 130 | CmdletsToExport = @() 131 | 132 | # Variables to export from this module 133 | VariablesToExport = @() 134 | 135 | # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. 136 | AliasesToExport = @() 137 | 138 | # DSC resources to export from this module 139 | DscResourcesToExport = @() 140 | 141 | # List of all modules packaged with this module 142 | ModuleList = @() 143 | 144 | # List of all files packaged with this module 145 | FileList = @() 146 | 147 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. 148 | PrivateData = @{ 149 | 150 | PSData = @{ 151 | 152 | # Tags applied to this module. These help with module discovery in online galleries. 153 | Tags = @('PureStorage', 'PowerShell', 'FlashArray') 154 | 155 | # A URL to the license for this module. 156 | LicenseUri = "https://github.com/PureStorage-OpenConnect/PowerShell-Toolkit/blob/dev/LICENSE" 157 | 158 | # A URL to the main website for this project. 159 | ProjectUri = "https://github.com/PureStorage-OpenConnect/PowerShell-Toolkit" 160 | 161 | # A URL to an icon representing this module. 162 | IconUri = "https://github.com/PureStorage-OpenConnect/PowerShell-Toolkit/blob/dev/Installer/icon.ico" 163 | 164 | # ReleaseNotes of this module 165 | ReleaseNotes = "https://github.com/PureStorage-OpenConnect/powershell-toolkit/dev/main/CHANGELOG.md" 166 | 167 | # External dependent modules of this module 168 | # ExternalModuleDependencies = '' 169 | 170 | # If true, the LicenseUrl points to an end-user license (not just a source license) which requires the user agreement before use. 171 | # RequireLicenseAcceptance = "" 172 | 173 | # Indicates this is a pre-release/testing version of the module. 174 | #Prerelease = 'True' 175 | 176 | } # End of PSData hashtable 177 | 178 | } # End of PrivateData hashtable 179 | 180 | # HelpInfo URI of this module 181 | HelpInfoURI = 'https://github.com/PureStorage-OpenConnect/powershell-toolkit' 182 | 183 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. 184 | DefaultCommandPrefix = '' 185 | 186 | } 187 | 188 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pure Storage PowerShell Toolkit 2.0 2 | 3 | ![GitHub all releases](https://img.shields.io/github/downloads/PureStorage-Connect/PowerShellSDK/total?color=orange&label=GitHub%20downloads&logo=powershell&style=plastic) ![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PureStoragePowerShellSDK?color=orange&label=PSGallery%20downloads&logo=powershell&style=plastic) 4 | [![PSScriptAnalyzer](https://github.com/PureStorage-OpenConnect/powershell-toolkit/actions/workflows/psanalyzer-codecheck.yml/badge.svg?branch=dev)](https://github.com/PureStorage-OpenConnect/powershell-toolkit/actions/workflows/psanalyzer-codecheck.yml) 5 | 6 | The Pure Storage PowerShell Toolkit 2.0 has been **deprecated** and replaced with the [new Toolkit 3.0 release](https://github.com/PureStorage-OpenConnect/powershell-toolkit-3). 7 | 8 | All Toolkit 2.0 issues will be triaged and moved to the new Toolkit 3.0 issues as appropriate. 9 | 10 | 11 | -------------------------------------------------------------------------------- /en-us/PureStoragePowerShellToolkit.psm1-Help.md: -------------------------------------------------------------------------------- 1 | # Get-AllHostVolumeInfo 2 | 3 | ## SYNOPSIS 4 | Retrieves Host Volume information from FlashArray. 5 | 6 | ## SYNTAX 7 | 8 | ### Set 1 9 | ``` 10 | Get-AllHostVolumeInfo [-EndPoint] [] 11 | ``` 12 | 13 | ## DESCRIPTION 14 | Retrieves Host Volume information including volumes attributes from a FlashArray. 15 | 16 | ## EXAMPLES 17 | 18 | ### -------------------------- EXAMPLE 1 -------------------------- 19 | PS C:\\\> 20 | ```powershell 21 | Get-HostVolumeinfo -EndPoint myarray.mydomain.com 22 | ``` 23 | 24 | Retrieves Host Volume information from the FlashArray myarray.mydomain.com. 25 | 26 | ## PARAMETERS 27 | 28 | ### EndPoint 29 | 30 | 31 | ```yaml 32 | Type: String 33 | Parameter Sets: Set 1 34 | Aliases: 35 | 36 | Required: true 37 | Position: 0 38 | Default Value: 39 | Pipeline Input: false 40 | ``` 41 | 42 | ### \ 43 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 44 | 45 | ## INPUTS 46 | 47 | ### EndPoint IP or FQDN required 48 | 49 | 50 | ## OUTPUTS 51 | 52 | ### Outputs Host volume information 53 | 54 | 55 | ## NOTES 56 | 57 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 58 | 59 | ## RELATED LINKS 60 | 61 | 62 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 63 | 64 | 65 | 66 | # Get-FlashArrayConfig 67 | 68 | ## SYNOPSIS 69 | Retrieves and outputs to a file the configuration of the FlashArray. 70 | 71 | ## SYNTAX 72 | 73 | ### Set 1 74 | ``` 75 | Get-FlashArrayConfig [-EndPoint] [-OutFile ] [-ArrayName ] [] 76 | ``` 77 | 78 | ## DESCRIPTION 79 | This cmdlet will run Purity CLI commands to retrieve the base configuration of a FlashArray and output it to a file. This file is formatted for the CLI, not necessarily human-readable. 80 | 81 | ## EXAMPLES 82 | 83 | ### -------------------------- EXAMPLE 1 -------------------------- 84 | PS C:\\\> 85 | ```powershell 86 | Get-FlashArray -EndPoint myArray -ArrayName Array100 87 | ``` 88 | 89 | Retrieves the configuration for a FlashArray and stores it in the current path as Array100_config.txt. 90 | 91 | ## PARAMETERS 92 | 93 | ### EndPoint 94 | Required. FQDN or IP address of the FlashArray. 95 | 96 | ```yaml 97 | Type: String 98 | Parameter Sets: Set 1 99 | Aliases: 100 | 101 | Required: true 102 | Position: 0 103 | Default Value: 104 | Pipeline Input: false 105 | ``` 106 | 107 | ### OutFile 108 | Optional. The file path and filename that will contain the output. if not specified, the default is the current folder\\Array_Config.txt. 109 | 110 | ```yaml 111 | Type: String 112 | Parameter Sets: Set 1 113 | Aliases: 114 | 115 | Required: false 116 | Position: named 117 | Default Value: Array_Config.txt 118 | Pipeline Input: false 119 | ``` 120 | 121 | ### ArrayName 122 | Optional. The FlashArray name to use in the output. Defaults to $EndPoint. 123 | 124 | ```yaml 125 | Type: String 126 | Parameter Sets: Set 1 127 | Aliases: 128 | 129 | Required: false 130 | Position: named 131 | Default Value: 132 | Pipeline Input: false 133 | ``` 134 | 135 | ### \ 136 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 137 | 138 | ## INPUTS 139 | 140 | ### None 141 | 142 | 143 | ## OUTPUTS 144 | 145 | ### Configuration file. 146 | 147 | 148 | ## NOTES 149 | 150 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 151 | 152 | ## RELATED LINKS 153 | 154 | 155 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 156 | 157 | 158 | 159 | # Get-FlashArrayDisconnectedVolumes 160 | 161 | ## SYNOPSIS 162 | Retrieves disconnected volume information for a FlashArray. 163 | 164 | ## SYNTAX 165 | 166 | ### Set 1 167 | ``` 168 | Get-FlashArrayDisconnectedVolumes [-EndPoint] [] 169 | ``` 170 | 171 | ## DESCRIPTION 172 | This cmdlet will retrieve information for volumes that are ina disconnected state for a FlashArray. 173 | 174 | ## EXAMPLES 175 | 176 | ### -------------------------- EXAMPLE 1 -------------------------- 177 | PS C:\\\> 178 | ```powershell 179 | Get-FlashArrayDisconnectedVolumes -EndPoint myArray 180 | ``` 181 | 182 | ## PARAMETERS 183 | 184 | ### EndPoint 185 | 186 | 187 | ```yaml 188 | Type: String 189 | Parameter Sets: Set 1 190 | Aliases: 191 | 192 | Required: true 193 | Position: 0 194 | Default Value: 195 | Pipeline Input: false 196 | ``` 197 | 198 | ### \ 199 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 200 | 201 | ## INPUTS 202 | 203 | ### None 204 | 205 | 206 | ## OUTPUTS 207 | 208 | ### Disconnected volume information is displayed. 209 | 210 | 211 | ## NOTES 212 | 213 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 214 | 215 | ## RELATED LINKS 216 | 217 | 218 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 219 | 220 | 221 | 222 | # Get-FlashArrayHierarchy 223 | 224 | ## SYNOPSIS 225 | Displays array hierarchy in relation to hosts and/or volumes. 226 | 227 | ## SYNTAX 228 | 229 | ### Set 1 230 | ``` 231 | Get-FlashArrayHierarchy [-EndPoint] [] 232 | ``` 233 | 234 | ## DESCRIPTION 235 | This cmdlet will display the hierarchy from a FlashArray of hosts and volumes. The output is to the console in text. 236 | 237 | ## EXAMPLES 238 | 239 | ### -------------------------- EXAMPLE 1 -------------------------- 240 | PS C:\\\> 241 | ```powershell 242 | Get-FlashArrayHierarchy -EndPoint myArray 243 | ``` 244 | 245 | ## PARAMETERS 246 | 247 | ### EndPoint 248 | 249 | 250 | ```yaml 251 | Type: String 252 | Parameter Sets: Set 1 253 | Aliases: 254 | 255 | Required: true 256 | Position: 0 257 | Default Value: 258 | Pipeline Input: false 259 | ``` 260 | 261 | ### \ 262 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 263 | 264 | ## INPUTS 265 | 266 | ### None 267 | 268 | 269 | ## OUTPUTS 270 | 271 | ### FlashArray host and/or volume hierarchy. 272 | 273 | 274 | ## NOTES 275 | 276 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 277 | 278 | ## RELATED LINKS 279 | 280 | 281 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 282 | 283 | 284 | 285 | # Get-FlashArrayPgroupsConfig 286 | 287 | ## SYNOPSIS 288 | Retrieves Protection Group (PGroup) information for the FlashArray. 289 | 290 | ## SYNTAX 291 | 292 | ### Set 1 293 | ``` 294 | Get-FlashArrayPgroupsConfig [-EndPoint] [] 295 | ``` 296 | 297 | ## DESCRIPTION 298 | Retrieves Protection Group (PGroup) information for the FlashArray. 299 | 300 | ## EXAMPLES 301 | 302 | ### -------------------------- EXAMPLE 1 -------------------------- 303 | PS C:\\\> 304 | ```powershell 305 | Get-FlashArrayPgroupsConfig -EndPoint myArrayg 306 | ``` 307 | 308 | ## PARAMETERS 309 | 310 | ### EndPoint 311 | 312 | 313 | ```yaml 314 | Type: String 315 | Parameter Sets: Set 1 316 | Aliases: 317 | 318 | Required: true 319 | Position: 0 320 | Default Value: 321 | Pipeline Input: false 322 | ``` 323 | 324 | ### \ 325 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 326 | 327 | ## INPUTS 328 | 329 | ### None 330 | 331 | 332 | ## OUTPUTS 333 | 334 | ### Protection Group information is displayed. 335 | 336 | 337 | ## NOTES 338 | 339 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 340 | 341 | ## RELATED LINKS 342 | 343 | 344 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 345 | 346 | 347 | 348 | # Get-FlashArrayQuickCapacityStats 349 | 350 | ## SYNOPSIS 351 | Quick way to retrieve FlashArray capacity statistics. 352 | 353 | ## SYNTAX 354 | 355 | ### Set 1 356 | ``` 357 | Get-FlashArrayQuickCapacityStats [-Names] [] 358 | ``` 359 | 360 | ## DESCRIPTION 361 | Retrieves high level capcity statistics from a FlashArray. 362 | 363 | ## EXAMPLES 364 | 365 | ### -------------------------- EXAMPLE 1 -------------------------- 366 | PS C:\\\> 367 | ```powershell 368 | Get-FlashArrayQuickCapacityStats -Names 'array1, array2' 369 | ``` 370 | 371 | Retrieves capacity statistic information from FlashArray's array1 and array2. 372 | 373 | ## PARAMETERS 374 | 375 | ### Names 376 | 377 | 378 | ```yaml 379 | Type: String 380 | Parameter Sets: Set 1 381 | Aliases: 382 | 383 | Required: true 384 | Position: 0 385 | Default Value: 386 | Pipeline Input: false 387 | ``` 388 | 389 | ### \ 390 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 391 | 392 | ## INPUTS 393 | 394 | ### Single or multiple FlashArray IP addresses or FQDNs. 395 | 396 | 397 | ## OUTPUTS 398 | 399 | ### Outputs array capacity information 400 | 401 | 402 | ## NOTES 403 | 404 | The arrays supplied in the "Names" parameter must use the same credentials for access. 405 | 406 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 407 | 408 | ## RELATED LINKS 409 | 410 | 411 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 412 | 413 | 414 | 415 | # Get-FlashArrayRASession 416 | 417 | ## SYNOPSIS 418 | Retrieves Remote Assist status from a FlashArray. 419 | 420 | ## SYNTAX 421 | 422 | ### Set 1 423 | ``` 424 | Get-FlashArrayRASession [-EndPoint] [] 425 | ``` 426 | 427 | ## DESCRIPTION 428 | Retrieves Remote Assist status from a FlashArray as disabled or enabled in a loop every 30 seconds until stopped. 429 | 430 | ## EXAMPLES 431 | 432 | ### -------------------------- EXAMPLE 1 -------------------------- 433 | PS C:\\\> 434 | ```powershell 435 | Get-FlashArrayRASession -EndPoint myarray.mydomain.com 436 | ``` 437 | 438 | Retrieves the current Remote Assist status and continues check status every 30 seconds until stopped. 439 | 440 | ## PARAMETERS 441 | 442 | ### EndPoint 443 | 444 | 445 | ```yaml 446 | Type: String 447 | Parameter Sets: Set 1 448 | Aliases: 449 | 450 | Required: true 451 | Position: 0 452 | Default Value: 453 | Pipeline Input: false 454 | ``` 455 | 456 | ### \ 457 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 458 | 459 | ## INPUTS 460 | 461 | ### EndPoint IP or FQDN required. 462 | 463 | 464 | ## OUTPUTS 465 | 466 | ### Outputs Remote Assst status. 467 | 468 | 469 | ## NOTES 470 | 471 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 472 | 473 | ## RELATED LINKS 474 | 475 | 476 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 477 | 478 | 479 | 480 | # Get-FlashArraySerialNumbers 481 | 482 | ## SYNOPSIS 483 | Retrieves FlashArray volume serial numbers connected to the host. 484 | 485 | ## SYNTAX 486 | 487 | ### Set 1 488 | ``` 489 | Get-FlashArraySerialNumbers 490 | ``` 491 | 492 | ## DESCRIPTION 493 | Cmdlet queries WMI on the localhost to retrieve the disks that are associated to Pure FlashArrays. 494 | 495 | ## EXAMPLES 496 | 497 | ### -------------------------- EXAMPLE 1 -------------------------- 498 | PS C:\\\> 499 | ```powershell 500 | Get-FlashArraySerialNumbers 501 | ``` 502 | 503 | Returns serial number information on Pure FlashArray disk devices connected to the host. 504 | 505 | ## PARAMETERS 506 | 507 | ## INPUTS 508 | 509 | ### EndPoint IP or FQDN required. 510 | 511 | 512 | ## OUTPUTS 513 | 514 | ### Outputs serial numbers of FlashArrays devices. 515 | 516 | 517 | ## NOTES 518 | 519 | ## RELATED LINKS 520 | 521 | 522 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 523 | 524 | 525 | 526 | # Get-FlashArrayStaleSnapshots 527 | 528 | ## SYNOPSIS 529 | Retrieves aged snapshots and allows for Deletion and Eradication of such snapshots. 530 | 531 | ## SYNTAX 532 | 533 | ### Set 1 534 | ``` 535 | Get-FlashArrayStaleSnapshots [-EndPoint] -SnapAgeThreshold [-Delete] [-Eradicate] [-Confirm] [] 536 | ``` 537 | 538 | ## DESCRIPTION 539 | This cmdlet will retrieve all snapshots that are beyond the specified SnapAgeThreshold. It allows for the parameters of Delete and Eradicate, and if set to $true, it will delete and eradicate the snapshots returned. It allows for the parameter of Confirm, and if set to $true, it will prompt before deletion and/or eradication of the snapshots. 540 | Snapshots must be deleted before they can be eradicated. 541 | 542 | ## EXAMPLES 543 | 544 | ### -------------------------- EXAMPLE 1 -------------------------- 545 | PS C:\\\> 546 | ```powershell 547 | Get-FlashArrayStaleSnapshots -EndPoint myArray -SnapAgeThreshold 30 548 | ``` 549 | 550 | Returns all snapshots that are older than 30 days from the current date. 551 | 552 | ### -------------------------- EXAMPLE 2 -------------------------- 553 | PS C:\\\> 554 | ```powershell 555 | Get-FlashArrayStaleSnapshots -EndPoint myArray -SnapAgeThreshold 30 -Delete:$true -Eradicate:$true -Confirm:$false 556 | ``` 557 | 558 | Returns all snapshots that are older than 30 days from the current date, deletes and eradicates them without confirmation. 559 | 560 | ## PARAMETERS 561 | 562 | ### EndPoint 563 | Required. Endpoint is the FlashArray IP or FQDN. 564 | 565 | ```yaml 566 | Type: String 567 | Parameter Sets: Set 1 568 | Aliases: 569 | 570 | Required: true 571 | Position: 0 572 | Default Value: 573 | Pipeline Input: false 574 | ``` 575 | 576 | ### SnapAgeThreshold 577 | Required. SnapAgeThreshold is the number of days from the current date. Delete. Confirm, and Eradicate are optional. 578 | 579 | ```yaml 580 | Type: String 581 | Parameter Sets: Set 1 582 | Aliases: 583 | 584 | Required: true 585 | Position: named 586 | Default Value: 587 | Pipeline Input: false 588 | ``` 589 | 590 | ### Delete 591 | Optional. If set to $true, delete the snapshots. 592 | 593 | ```yaml 594 | Type: SwitchParameter 595 | Parameter Sets: Set 1 596 | Aliases: 597 | 598 | Required: false 599 | Position: named 600 | Default Value: False 601 | Pipeline Input: false 602 | ``` 603 | 604 | ### Eradicate 605 | Optional. If set to $true, eradicate the deleted snapshots (snapshot must be flagged as deleted). 606 | 607 | ```yaml 608 | Type: SwitchParameter 609 | Parameter Sets: Set 1 610 | Aliases: 611 | 612 | Required: false 613 | Position: named 614 | Default Value: False 615 | Pipeline Input: false 616 | ``` 617 | 618 | ### Confirm 619 | Optional. If set to $true, provide user confirmation for Deletion or Eradication of the snapshots. 620 | 621 | ```yaml 622 | Type: SwitchParameter 623 | Parameter Sets: Set 1 624 | Aliases: 625 | 626 | Required: false 627 | Position: named 628 | Default Value: False 629 | Pipeline Input: false 630 | ``` 631 | 632 | ### \ 633 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 634 | 635 | ## INPUTS 636 | 637 | ## OUTPUTS 638 | 639 | ### Returns a listing of snapshots that are beyond the specified threshold and displays final results. 640 | 641 | 642 | ## NOTES 643 | 644 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 645 | 646 | ## RELATED LINKS 647 | 648 | 649 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 650 | 651 | 652 | 653 | # Get-FlashArrayVolumeGrowth 654 | 655 | ## SYNOPSIS 656 | Retrieves volume growth information over past X days at X percentage of growth. 657 | 658 | ## SYNTAX 659 | 660 | ### Set 1 661 | ``` 662 | Get-FlashArrayVolumeGrowth [-Arrays] [-MinimumVolumeAgeInDays] [-TimeFrameToCompareWith] [-GrowthPercentThreshold] [[-DoNotReportGrowthOfLessThan] ] [[-DoNotReportVolSmallerThan] ] [-csv] [-html] [] 663 | ``` 664 | 665 | ## DESCRIPTION 666 | Retrieves volume growth in GB from a FlashArray for volumes that grew in past X amount of days at X percentage of growth. 667 | 668 | ## EXAMPLES 669 | 670 | ### -------------------------- EXAMPLE 1 -------------------------- 671 | PS C:\\\> 672 | ```powershell 673 | Get-FlashArrayVolumeGrowth -Arrays array1,array2 -GrowthPercentThreshold '10' -MinimumVolumeAgeInDays '1' -TimeFrameToCompareWith '7d' -DoNotReportGrowthOfLessThan '1' -DoNotReportVolSmallerThan '1GB' -csv 674 | ``` 675 | 676 | Retrieve volume capacity report for array 1 and array2 comparing volumes over the last 7 days that: 677 | - volumes that are not smaller than 1GB in size 678 | - must have growth of less than 1GB 679 | - that are at least 1 day old 680 | - have grown at least 10% 681 | - output the report to a CSV delimited file 682 | 683 | ## PARAMETERS 684 | 685 | ### Arrays 686 | Required. An IP address or FQDN of the FlashArray(s). Multiple arrys can be specified, seperated by commas. Only use single-quotes or no quotes around the arrays parameter object. Ex. -Arrays array1,array2,array3 --or-- -Arrays 'array1,array2,array3' 687 | 688 | ```yaml 689 | Type: String[] 690 | Parameter Sets: Set 1 691 | Aliases: 692 | 693 | Required: true 694 | Position: 0 695 | Default Value: 696 | Pipeline Input: false 697 | ``` 698 | 699 | ### MinimumVolumeAgeInDays 700 | Optional. The minimum age in days that a volume must be to report on it. If not specified, defaults to 1 day. 701 | 702 | ```yaml 703 | Type: String 704 | Parameter Sets: Set 1 705 | Aliases: 706 | 707 | Required: true 708 | Position: 1 709 | Default Value: 1 710 | Pipeline Input: false 711 | ``` 712 | 713 | ### TimeFrameToCompareWith 714 | Required. The timeframe to compare the volume size against. Accepts '1h', '3h', '24h', '7d', '30d', '90d', '1y'. 715 | 716 | ```yaml 717 | Type: String 718 | Parameter Sets: Set 1 719 | Aliases: 720 | 721 | Required: true 722 | Position: 2 723 | Default Value: 724 | Pipeline Input: false 725 | ``` 726 | 727 | ### GrowthPercentThreshold 728 | Optional. The minimum percentage of volume growth to report on. Specified as a numerical value from 1-99. If not specified, defaults to '1'. 729 | 730 | ```yaml 731 | Type: String 732 | Parameter Sets: Set 1 733 | Aliases: 734 | 735 | Required: true 736 | Position: 3 737 | Default Value: 1 738 | Pipeline Input: false 739 | ``` 740 | 741 | ### DoNotReportGrowthOfLessThan 742 | Optional. If growth in size, in Gigabytes, over the specified period is lower than this value, it will not be reported. Specified as a numerical value. If not specified, defaults to '1'. 743 | 744 | ```yaml 745 | Type: String 746 | Parameter Sets: Set 1 747 | Aliases: 748 | 749 | Required: false 750 | Position: 4 751 | Default Value: 1 752 | Pipeline Input: false 753 | ``` 754 | 755 | ### DoNotReportVolSmallerThan 756 | Optional. Volumes that are smaller than this size in Gigabytes will not be reported on. Specified as a numerical value + GB. If not specified, defaults to '1GB'. 757 | 758 | ```yaml 759 | Type: String 760 | Parameter Sets: Set 1 761 | Aliases: 762 | 763 | Required: false 764 | Position: 5 765 | Default Value: 1GB 766 | Pipeline Input: false 767 | ``` 768 | 769 | ### csv 770 | Optional. Switch. If present, produces a csv comma-delimited file of the output in the current folder named FlashArrayVolumeGrowthReport.csv. 771 | 772 | ```yaml 773 | Type: SwitchParameter 774 | Parameter Sets: Set 1 775 | Aliases: 776 | 777 | Required: false 778 | Position: named 779 | Default Value: False 780 | Pipeline Input: false 781 | ``` 782 | 783 | ### html 784 | Optional. Switch. If present, produces a HTML of the output in the current folder named FlashArrayVolumeGrowthReport.html. 785 | 786 | ```yaml 787 | Type: SwitchParameter 788 | Parameter Sets: Set 1 789 | Aliases: 790 | 791 | Required: false 792 | Position: named 793 | Default Value: False 794 | Pipeline Input: false 795 | ``` 796 | 797 | ### \ 798 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 799 | 800 | ## INPUTS 801 | 802 | ### Specified inputs to calculate volumes reported on. 803 | 804 | 805 | ## OUTPUTS 806 | 807 | ### Volume capacity information to the console, and also to a CSV and/or HTML formatted report (if specified). 808 | 809 | 810 | ## NOTES 811 | 812 | All arrays specified must use th same credential login. 813 | 814 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 815 | 816 | ## RELATED LINKS 817 | 818 | 819 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 820 | 821 | 822 | 823 | # Get-HostBusAdapter 824 | 825 | ## SYNOPSIS 826 | Retrieves host Bus Adapater (HBA) information. 827 | 828 | ## SYNTAX 829 | 830 | ### Set 1 831 | ``` 832 | Get-HostBusAdapter [[-ComputerName] ] [] 833 | ``` 834 | 835 | ## DESCRIPTION 836 | Retrieves host Bus Adapater (HBA) information for the host. 837 | 838 | ## EXAMPLES 839 | 840 | ### -------------------------- EXAMPLE 1 -------------------------- 841 | PS C:\\\> 842 | ```powershell 843 | Get-HostBusAdapter -ComputerName myComputer 844 | ``` 845 | 846 | ## PARAMETERS 847 | 848 | ### ComputerName 849 | 850 | 851 | ```yaml 852 | Type: String 853 | Parameter Sets: Set 1 854 | Aliases: 855 | 856 | Required: false 857 | Position: 0 858 | Default Value: 859 | Pipeline Input: false 860 | ``` 861 | 862 | ### \ 863 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 864 | 865 | ## INPUTS 866 | 867 | ### Computer name is optional. 868 | 869 | 870 | ## OUTPUTS 871 | 872 | ### Host Bus Adapter information. 873 | 874 | 875 | ## NOTES 876 | 877 | ## RELATED LINKS 878 | 879 | 880 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 881 | 882 | 883 | 884 | # Get-MPIODiskLBPolicy 885 | 886 | ## SYNOPSIS 887 | Retrieves the current MPIO Load Balancing policy for Pure FlashArray disk(s). 888 | 889 | ## SYNTAX 890 | 891 | ### Set 1 892 | ``` 893 | Get-MPIODiskLBPolicy [[-DiskId] ] [[-OutFile] ] [] 894 | ``` 895 | 896 | ## DESCRIPTION 897 | This cmdlet will retrieve the current MPIO Load Balancing policy for connected Pure FlashArrays disk(s) using the mpclaim.exe utlity. 898 | 899 | ## EXAMPLES 900 | 901 | ### -------------------------- EXAMPLE 1 -------------------------- 902 | PS C:\\\> 903 | ```powershell 904 | Get-MPIODiskLBPolicy -DiskID 1 905 | ``` 906 | 907 | Returns the current MPIO LB policy for disk ID 1. 908 | 909 | ## PARAMETERS 910 | 911 | ### DiskId 912 | Optional. If specified, retrieves only the policy for the that disk ID. Otherwise, returns all disks. 913 | DiskID is the 'Number' identifier of the disk from the cmdlet 'Get-Disk'. 914 | 915 | ```yaml 916 | Type: String 917 | Parameter Sets: Set 1 918 | Aliases: 919 | 920 | Required: false 921 | Position: 0 922 | Default Value: 923 | Pipeline Input: false 924 | ``` 925 | 926 | ### OutFile 927 | Optional. File name to output results to. Defaults to %TEMP%\\MPIOLBPolicy.txt 928 | 929 | ```yaml 930 | Type: String 931 | Parameter Sets: Set 1 932 | Aliases: 933 | 934 | Required: false 935 | Position: 1 936 | Default Value: "$env:Temp\output.txt" 937 | Pipeline Input: false 938 | ``` 939 | 940 | ### \ 941 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 942 | 943 | ## INPUTS 944 | 945 | ### None 946 | 947 | 948 | ## OUTPUTS 949 | 950 | ### Outputs $OutFile contents. 951 | 952 | 953 | ## NOTES 954 | 955 | ## RELATED LINKS 956 | 957 | 958 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 959 | 960 | 961 | 962 | # Get-QuickFixEngineering 963 | 964 | ## SYNOPSIS 965 | Retrieves all the Windows OS QFE patches applied. 966 | 967 | ## SYNTAX 968 | 969 | ### Set 1 970 | ``` 971 | Get-QuickFixEngineering 972 | ``` 973 | 974 | ## DESCRIPTION 975 | Retrieves all the Windows OS QFE patches applied. 976 | 977 | ## EXAMPLES 978 | 979 | ### -------------------------- EXAMPLE 1 -------------------------- 980 | PS C:\\\> 981 | ```powershell 982 | Get-QuickFixEngineering 983 | ``` 984 | 985 | ## PARAMETERS 986 | 987 | ## INPUTS 988 | 989 | ### None 990 | 991 | 992 | ## OUTPUTS 993 | 994 | ### Outputs a listing of QFE patches applied. 995 | 996 | 997 | ## NOTES 998 | 999 | ## RELATED LINKS 1000 | 1001 | 1002 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1003 | 1004 | 1005 | 1006 | # Get-VolumeShadowCopy 1007 | 1008 | ## SYNOPSIS 1009 | Retrieves the volume shadow copy informaion using the Diskhadow command. 1010 | 1011 | ## SYNTAX 1012 | 1013 | ### Set 1 1014 | ``` 1015 | Get-VolumeShadowCopy [[-ScriptName] ] [-MetadataFile] [-ShadowCopyAlias] [-ExposeAs] [[-VerboseMode] ] [] 1016 | ``` 1017 | 1018 | ## DESCRIPTION 1019 | 1020 | 1021 | ## EXAMPLES 1022 | 1023 | ### -------------------------- EXAMPLE 1 -------------------------- 1024 | PS C:\\\> 1025 | ```powershell 1026 | Get-VolumeShadowCopy -MetadataFile myFile.cab -ShadowCopyAlias MyAlias -ExposeAs MyShadowCopy 1027 | ``` 1028 | 1029 | Exposes the MyAias shadow copy as drive latter G: using the myFie.cab metadata file. 1030 | 1031 | ## PARAMETERS 1032 | 1033 | ### ScriptName 1034 | Optional. Script text file name created to pass to the Diskshadow command. defaults to 'PUREVSS-SNAP'. 1035 | 1036 | ```yaml 1037 | Type: String 1038 | Parameter Sets: Set 1 1039 | Aliases: 1040 | 1041 | Required: false 1042 | Position: 0 1043 | Default Value: PUREVSS-SNAP 1044 | Pipeline Input: false 1045 | ``` 1046 | 1047 | ### MetadataFile 1048 | Required. Full filename for the metadata .cab file. It must exist in the current working folder. 1049 | 1050 | ```yaml 1051 | Type: String 1052 | Parameter Sets: Set 1 1053 | Aliases: 1054 | 1055 | Required: true 1056 | Position: 1 1057 | Default Value: 1058 | Pipeline Input: false 1059 | ``` 1060 | 1061 | ### ShadowCopyAlias 1062 | Required. Name of the shadow copy alias. 1063 | 1064 | ```yaml 1065 | Type: String 1066 | Parameter Sets: Set 1 1067 | Aliases: 1068 | 1069 | Required: true 1070 | Position: 2 1071 | Default Value: 1072 | Pipeline Input: false 1073 | ``` 1074 | 1075 | ### ExposeAs 1076 | Required. Drive letter, share, or mount point to expose the shadow copy. 1077 | 1078 | ```yaml 1079 | Type: String 1080 | Parameter Sets: Set 1 1081 | Aliases: 1082 | 1083 | Required: true 1084 | Position: 3 1085 | Default Value: 1086 | Pipeline Input: false 1087 | ``` 1088 | 1089 | ### VerboseMode 1090 | Optional. "On" or "Off". If set to 'off', verbose mode for the Diskshadow command is disabled. Default is 'On'. 1091 | 1092 | ```yaml 1093 | Type: String 1094 | Parameter Sets: Set 1 1095 | Aliases: 1096 | 1097 | Required: false 1098 | Position: 4 1099 | Default Value: On 1100 | Accepted Values: On 1101 | Off 1102 | Pipeline Input: false 1103 | ``` 1104 | 1105 | ### \ 1106 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1107 | 1108 | ## INPUTS 1109 | 1110 | ### None 1111 | 1112 | 1113 | ## OUTPUTS 1114 | 1115 | ### None 1116 | 1117 | 1118 | ## NOTES 1119 | 1120 | See https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow for more information on the Diskshadow utility. 1121 | 1122 | ## RELATED LINKS 1123 | 1124 | 1125 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1126 | 1127 | 1128 | 1129 | # Get-WindowsDiagnosticInfo 1130 | 1131 | ## SYNOPSIS 1132 | Gathers Windows operating system, hardware, and software information, including logs for diagnostics. This cmdlet requires Administrative permissions. 1133 | 1134 | ## SYNTAX 1135 | 1136 | ### Set 1 1137 | ``` 1138 | Get-WindowsDiagnosticInfo [-Cluster] [-Compress] [] 1139 | ``` 1140 | 1141 | ## DESCRIPTION 1142 | This script will collect detailed information on the Windows operating system, hardware and software components, and collect event logs in .evtx and .csv formats. It will optionally collect WSFC logs and optionally compress all gathered files intoa .zip file for easy distribution. 1143 | This script will place all of the files in a parent folder in the root of the C:\\ drive that is named after the computer NetBios name($env:computername). 1144 | Each section of information gathered will have it's own child folder in that parent folder. 1145 | 1146 | ## EXAMPLES 1147 | 1148 | ### -------------------------- EXAMPLE 1 -------------------------- 1149 | PS C:\\\> 1150 | ```powershell 1151 | Get-WindowsDiagnosticInfo.ps1 -Cluster 1152 | ``` 1153 | 1154 | Retrieves all of the operating system, hardware, software, event log, and WSFC logs into the default folder. 1155 | 1156 | ### -------------------------- EXAMPLE 2 -------------------------- 1157 | PS C:\\\> 1158 | ```powershell 1159 | Get-WindowsDiagnosticInfo.ps1 -Compress 1160 | ``` 1161 | 1162 | Retrieves all of the operating system, hardware, software, event log, and compresses the parent folder into a zip file that will be created in the root of the C: drive. 1163 | 1164 | ## PARAMETERS 1165 | 1166 | ### Cluster 1167 | Optional. Collect Windows Server Failover Cluster (WSFC) logs. 1168 | 1169 | ```yaml 1170 | Type: SwitchParameter 1171 | Parameter Sets: Set 1 1172 | Aliases: 1173 | 1174 | Required: false 1175 | Position: named 1176 | Default Value: False 1177 | Pipeline Input: false 1178 | ``` 1179 | 1180 | ### Compress 1181 | Optional. Compress the folder that contains all the gathered data into a zip file. The file name will be the computername_diagnostics.zip. 1182 | 1183 | ```yaml 1184 | Type: SwitchParameter 1185 | Parameter Sets: Set 1 1186 | Aliases: 1187 | 1188 | Required: false 1189 | Position: named 1190 | Default Value: False 1191 | Pipeline Input: false 1192 | ``` 1193 | 1194 | ### \ 1195 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1196 | 1197 | ## INPUTS 1198 | 1199 | ### None 1200 | 1201 | 1202 | ## OUTPUTS 1203 | 1204 | ### Diagnostic outputs in txt and event log files. 1205 | Compressed zip file. 1206 | 1207 | 1208 | ## NOTES 1209 | 1210 | This cmdlet requires Administrative permissions. 1211 | 1212 | ## RELATED LINKS 1213 | 1214 | 1215 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1216 | 1217 | 1218 | 1219 | # Invoke-DynamicDataMasking 1220 | 1221 | ## SYNOPSIS 1222 | A PowerShell function to apply data masks to database columns using the SQL Server dynamic data masking feature. 1223 | 1224 | ## SYNTAX 1225 | 1226 | ### Set 1 1227 | ``` 1228 | Invoke-DynamicDataMasking [-SqlInstance] [-Database] [] 1229 | ``` 1230 | 1231 | ## DESCRIPTION 1232 | This function uses the information stored in the extended properties of a database: 1233 | sys.extended_properties.name = 'DATAMASK' to obtain the dynamic data masking function to apply 1234 | at column level. Columns of the following data type are currently supported: 1235 | 1236 | - int 1237 | - bigint 1238 | - char 1239 | - nchar 1240 | - varchar 1241 | - nvarchar 1242 | 1243 | Using the c_address column in the tpch customer table as an example, the DATAMASK extended property can be applied 1244 | to the column as follows: 1245 | 1246 | exec sp_addextendedproperty 1247 | @name = N'DATAMASK' 1248 | ,@value = N'(FUNCTION = 'partial(0, "XX", 20)'' 1249 | ,@level0type = N'Schema', @level0name = 'dbo' 1250 | ,@level1type = N'Table', @level1name = 'customer' 1251 | ,@level2type = N'Column', @level2name = 'c_address' 1252 | GO 1253 | 1254 | ## EXAMPLES 1255 | 1256 | ### -------------------------- EXAMPLE 1 -------------------------- 1257 | PS C:\\\> 1258 | ```powershell 1259 | Invoke-DynamicDataMasking -SqlInstance Z-STN-WIN2016-A\DEVOPSDEV -Database tpch-no-compression 1260 | ``` 1261 | 1262 | ## PARAMETERS 1263 | 1264 | ### SqlInstance 1265 | Required. The SQL Server instance of the database that data masking is to be applied to. 1266 | 1267 | ```yaml 1268 | Type: String 1269 | Parameter Sets: Set 1 1270 | Aliases: 1271 | 1272 | Required: true 1273 | Position: 0 1274 | Default Value: 1275 | Pipeline Input: false 1276 | ``` 1277 | 1278 | ### Database 1279 | Required. The database that data masking is to be applied to. 1280 | 1281 | ```yaml 1282 | Type: String 1283 | Parameter Sets: Set 1 1284 | Aliases: 1285 | 1286 | Required: true 1287 | Position: 1 1288 | Default Value: 1289 | Pipeline Input: false 1290 | ``` 1291 | 1292 | ### \ 1293 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1294 | 1295 | ## INPUTS 1296 | 1297 | ## OUTPUTS 1298 | 1299 | ## NOTES 1300 | 1301 | Note that it has dependencies on the dbatools and PureStoragePowerShellSDK modules which are installed as part of this module. 1302 | 1303 | ## RELATED LINKS 1304 | 1305 | 1306 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1307 | 1308 | 1309 | 1310 | # Invoke-FlashArrayDbRefresh 1311 | 1312 | ## SYNOPSIS 1313 | A PowerShell function to refresh one or more SQL Server databases (the destination) from either a snapshot or database. 1314 | 1315 | ## SYNTAX 1316 | 1317 | ### Set 1 1318 | ``` 1319 | Invoke-FlashArrayDbRefresh [-RefreshDatabase] [-RefreshSource] [-DestSqlInstances] [-Endpoint] [[-PollJobInterval] ] [[-StaticDataMaskFile] ] [-PromptForSnapshot] [-RefreshFromSnapshot] [-NoPsRemoting] [-ApplyDataMasks] [-ForceDestDbOffline] [] 1320 | ``` 1321 | 1322 | ## DESCRIPTION 1323 | A PowerShell function to refresh one or more SQL Server databases either from: 1324 | - a snapshot specified by its name 1325 | - a snapshot picked from a list associated with the volume the source database resides on 1326 | - a source database directly 1327 | 1328 | This function will detect and repair orpaned users in refreshed databases and optionally 1329 | apply data masking, based on either: 1330 | - the dynamic data masking functionality available in SQL Server version 2016 onwards, 1331 | - static data masking built into dbatools from version 0.9.725, refer to https://dbatools.io/mask/ 1332 | 1333 | ## EXAMPLES 1334 | 1335 | ### -------------------------- EXAMPLE 1 -------------------------- 1336 | PS C:\\\> 1337 | ```powershell 1338 | Invoke-FlashArrayDbRefresh -RefreshDatabase tpch-no-compression -RefreshSource z-sql2016-devops-prd -DestSqlInstance z-sql2016-devops-tst -Endpoint 10.225.112.10 ` 1339 | ``` 1340 | 1341 | -PromptForSnapshot 1342 | 1343 | Refresh a single database from a snapshot selected from a list of snapshots associated with the volume specified by the RefreshSource parameter. 1344 | 1345 | ### -------------------------- EXAMPLE 2 -------------------------- 1346 | PS C:\\\> 1347 | ```powershell 1348 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1349 | ``` 1350 | 1351 | Invoke-FlashArrayDbRefresh -RefreshDatabase tpch-no-compression -RefreshSource z-sql2016-devops-prd -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1352 | -PromptForSnapshot 1353 | 1354 | Refresh multiple databases from a snapshot selected from a list of snapshots associated with the volume specified by the RefreshSource parameter. 1355 | 1356 | ### -------------------------- EXAMPLE 3 -------------------------- 1357 | PS C:\\\> 1358 | ```powershell 1359 | Invoke-FlashArrayDbRefresh -RefreshDatabase tpch-no-compression -RefreshSource source-snap -DestSqlInstance z-sql2016-devops-tst -Endpoint 10.225.112.10 ` 1360 | ``` 1361 | 1362 | -RefreshFromSnapshot 1363 | 1364 | Refresh a single database using the snapshot specified by the RefreshSource parameter. 1365 | 1366 | ### -------------------------- EXAMPLE 4 -------------------------- 1367 | PS C:\\\> 1368 | ```powershell 1369 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1370 | ``` 1371 | 1372 | Invoke-FlashArrayDbRefresh -RefreshDatabase tpch-no-compression -RefreshSource source-snap -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1373 | -RefreshFromSnapshot 1374 | 1375 | Refresh multiple databases using the snapshot specified by the RefreshSource parameter. 1376 | 1377 | ### -------------------------- EXAMPLE 5 -------------------------- 1378 | PS C:\\\> 1379 | ```powershell 1380 | Invoke-FlashArrayDbRefresh -$RefreshDatabase tpch-no-compression -RefreshSource z-sql-prd -DestSqlInstance z-sql2016-devops-tst -Endpoint 10.225.112.10 1381 | ``` 1382 | 1383 | Refresh a single database from the database specified by the SourceDatabase parameter residing on the instance specified by RefreshSource. 1384 | 1385 | ### -------------------------- EXAMPLE 6 -------------------------- 1386 | PS C:\\\> 1387 | ```powershell 1388 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1389 | ``` 1390 | 1391 | Invoke-FlashArrayDbRefresh -$RefreshDatabase tpch-no-compression -RefreshSource z-sql-prd -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1392 | 1393 | Refresh multiple databases from the database specified by the SourceDatabase parameter residing on the instance specified by RefreshSource. 1394 | 1395 | ### -------------------------- EXAMPLE 7 -------------------------- 1396 | PS C:\\\> 1397 | ```powershell 1398 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1399 | ``` 1400 | 1401 | Invoke-PfaDbRefresh -$RefreshDatabase tpch-no-compression -RefreshSource z-sql-prd -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1402 | -ApplyDataMasks 1403 | 1404 | Refresh multiple databases from the database specified by the SourceDatabase parameter residing on the instance specified by RefreshSource. 1405 | 1406 | ### -------------------------- EXAMPLE 8 -------------------------- 1407 | PS C:\\\> 1408 | ```powershell 1409 | $StaticDataMaskFile = "D:\apps\datamasks\z-sql-prd.tpch-no-compression.tables.json" 1410 | ``` 1411 | 1412 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1413 | Invoke-FlashArrayDbRefresh -$RefreshDatabase tpch-no-compression -RefreshSource z-sql-prd -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1414 | -StaticDataMaskFile $StaticDataMaskFile 1415 | 1416 | Refresh multiple databases from the database specified by the SourceDatabase parameter residing on the instance specified by RefreshSource and apply SQL Server dynamic data masking to each database. 1417 | 1418 | ### -------------------------- EXAMPLE 9 -------------------------- 1419 | PS C:\\\> 1420 | ```powershell 1421 | $StaticDataMaskFile = "D:\apps\datamasks\z-sql-prd.tpch-no-compression.tables.json" 1422 | ``` 1423 | 1424 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1425 | Invoke-FlashArrayDbRefresh -$RefreshDatabase tpch-no-compression -RefreshSource z-sql-prd -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1426 | -ForceDestDbOffline -StaticDataMaskFile $StaticDataMaskFile 1427 | 1428 | Refresh multiple databases from the database specified by the SourceDatabase parameter residing on the instance specified by RefreshSource and apply SQL Server dynamic data masking to each database. 1429 | All databases to be refreshed are forced offline prior to their underlying FlashArray volumes being overwritten. 1430 | 1431 | ### -------------------------- EXAMPLE 10 -------------------------- 1432 | PS C:\\\> 1433 | ```powershell 1434 | $StaticDataMaskFile = "D:\apps\datamasks\z-sql-prd.tpch-no-compression.tables.json" 1435 | ``` 1436 | 1437 | $Targets = @("z-sql2016-devops-tst", "z-sql2016-devops-dev") 1438 | Invoke-FlashArrayDbRefresh -$RefreshDatabase tpch-no-compression -RefreshSource z-sql-prd -DestSqlInstance $Targets -Endpoint 10.225.112.10 \` 1439 | -PollJobInterval 10 -ForceDestDbOffline -StaticDataMaskFile $StaticDataMaskFile 1440 | 1441 | Refresh multiple databases from the database specified by the SourceDatabase parameter residing on the instance specified by RefreshSource and apply SQL Server dynamic data masking to each database. 1442 | All databases to be refreshed are forced offline prior to their underlying FlashArray volumes being overwritten. Poll the status of the refresh jobs once every 10 seconds. 1443 | 1444 | ## PARAMETERS 1445 | 1446 | ### RefreshDatabase 1447 | Required. The name of the database to refresh, note that it is assumed that source and target database(s) are named the same. 1448 | 1449 | ```yaml 1450 | Type: String 1451 | Parameter Sets: Set 1 1452 | Aliases: 1453 | 1454 | Required: true 1455 | Position: 0 1456 | Default Value: 1457 | Pipeline Input: false 1458 | ``` 1459 | 1460 | ### RefreshSource 1461 | Required. If the RefreshFromSnapshot flag is specified, this parameter takes the name of a snapshot, otherwise this takes the 1462 | name of the source SQL Server instance. 1463 | 1464 | ```yaml 1465 | Type: String 1466 | Parameter Sets: Set 1 1467 | Aliases: 1468 | 1469 | Required: true 1470 | Position: 1 1471 | Default Value: 1472 | Pipeline Input: false 1473 | ``` 1474 | 1475 | ### DestSqlInstances 1476 | 1477 | 1478 | ```yaml 1479 | Type: String[] 1480 | Parameter Sets: Set 1 1481 | Aliases: 1482 | 1483 | Required: true 1484 | Position: 2 1485 | Default Value: 1486 | Pipeline Input: false 1487 | ``` 1488 | 1489 | ### Endpoint 1490 | Required. The IP address representing the FlashArray that the volumes for the source and refresh target databases reside on. 1491 | 1492 | ```yaml 1493 | Type: String 1494 | Parameter Sets: Set 1 1495 | Aliases: 1496 | 1497 | Required: true 1498 | Position: 3 1499 | Default Value: 1500 | Pipeline Input: false 1501 | ``` 1502 | 1503 | ### PollJobInterval 1504 | Optional. Interval at which background job status is poll, if this is ommited polling will not take place. Note that this parameter 1505 | is not applicable is the PromptForSnapshot switch is specified. 1506 | 1507 | ```yaml 1508 | Type: Int32 1509 | Parameter Sets: Set 1 1510 | Aliases: 1511 | 1512 | Required: false 1513 | Position: 4 1514 | Default Value: 0 1515 | Pipeline Input: false 1516 | ``` 1517 | 1518 | ### PromptForSnapshot 1519 | Optional. This is an optional flag that if specified will result in a list of snapshots being displayed for the database volume on 1520 | the FlashArray that the user can select one from. Despite the source of the refresh operation being an existing snapshot, 1521 | the source instance still has to be specified by the RefreshSource parameter in order that the function can determine 1522 | which FlashArray volume to list existing snapshots for. 1523 | 1524 | ```yaml 1525 | Type: SwitchParameter 1526 | Parameter Sets: Set 1 1527 | Aliases: 1528 | 1529 | Required: false 1530 | Position: named 1531 | Default Value: False 1532 | Pipeline Input: false 1533 | ``` 1534 | 1535 | ### RefreshFromSnapshot 1536 | Optional. This is an optional flag that if specified causes the function to expect the RefreshSource parameter to be supplied with 1537 | the name of an existing snapshot. 1538 | 1539 | ```yaml 1540 | Type: SwitchParameter 1541 | Parameter Sets: Set 1 1542 | Aliases: 1543 | 1544 | Required: false 1545 | Position: named 1546 | Default Value: False 1547 | Pipeline Input: false 1548 | ``` 1549 | 1550 | ### NoPsRemoting 1551 | Optional. The commands that off and online the windows volumes associated with the refresh target databases will use Invoke-Command 1552 | with powershell remoting unless this flag is specified. Certain tools that can invoke PowerShell, Ansible for example, do 1553 | not permit double-hop authentication unless CredSSP authentication is used. For security purposes Kerberos is recommended 1554 | over CredSSP, however this does not support double-hop authentication, in which case this flag should be specified. 1555 | 1556 | ```yaml 1557 | Type: SwitchParameter 1558 | Parameter Sets: Set 1 1559 | Aliases: 1560 | 1561 | Required: false 1562 | Position: named 1563 | Default Value: False 1564 | Pipeline Input: false 1565 | ``` 1566 | 1567 | ### ApplyDataMasks 1568 | Optional. Specifying this optional masks will cause data masks to be applied , as per the dynamic data masking feature first 1569 | introduced with SQL Server 2016, this results in this function invoking the Invoke-DynamicDataMasking function to be invoked. 1570 | For documentation on Invoke-DynamicDataMasking, use the command Get-Help Invoke-DynamicDataMasking -Detailed. 1571 | 1572 | ```yaml 1573 | Type: SwitchParameter 1574 | Parameter Sets: Set 1 1575 | Aliases: 1576 | 1577 | Required: false 1578 | Position: named 1579 | Default Value: False 1580 | Pipeline Input: false 1581 | ``` 1582 | 1583 | ### ForceDestDbOffline 1584 | Optional. Specifying this switch will cause refresh target databases for be forced offline via WITH ROLLBACK IMMEDIATE. 1585 | 1586 | ```yaml 1587 | Type: SwitchParameter 1588 | Parameter Sets: Set 1 1589 | Aliases: 1590 | 1591 | Required: false 1592 | Position: named 1593 | Default Value: False 1594 | Pipeline Input: false 1595 | ``` 1596 | 1597 | ### StaticDataMaskFile 1598 | Optional. If this parameter is present and has a file path associated with it, the data masking available in version 0.9.725 of the 1599 | dbatools module onwards will be applied to the refreshed database. The use of this is contigent on the data mask file 1600 | being created and populated in the first place as per this blog post: https://dbatools.io/mask/ . 1601 | 1602 | ```yaml 1603 | Type: String 1604 | Parameter Sets: Set 1 1605 | Aliases: 1606 | 1607 | Required: false 1608 | Position: 5 1609 | Default Value: 1610 | Pipeline Input: false 1611 | ``` 1612 | 1613 | ### \ 1614 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1615 | 1616 | ## INPUTS 1617 | 1618 | ## OUTPUTS 1619 | 1620 | ## NOTES 1621 | 1622 | FlashArray Credentials - A global variable $Creds may be used as described in the release notes for this module. If neither is specified, the module will prompt for credentials. 1623 | 1624 | Known Restrictions 1625 | ------------------ 1626 | 1. This function does not work for databases associated with failover cluster instances. 1627 | 2. This function cannot be used to seed secondary replicas in availability groups using databases in the primary replica. 1628 | 3. The function assumes that all database files and the transaction log reside on a single FlashArray volume. 1629 | 1630 | Note that it has dependencies on the dbatools and PureStoragePowerShellSDK modules which are installed by this module. 1631 | 1632 | ## RELATED LINKS 1633 | 1634 | 1635 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1636 | 1637 | 1638 | 1639 | # Invoke-StaticDataMasking 1640 | 1641 | ## SYNOPSIS 1642 | A PowerShell function to statically mask data in char, varchar and/or nvarchar columns using a MD5 hashing function. 1643 | 1644 | ## SYNTAX 1645 | 1646 | ### Set 1 1647 | ``` 1648 | Invoke-StaticDataMasking [-SqlInstance] [-Database] [-DataMaskFile] [] 1649 | ``` 1650 | 1651 | ## DESCRIPTION 1652 | This PowerShell function uses as input a JSON file created by calling the New-DbaDbMaskingConfig PowerShell function. 1653 | Data in the columns specified in this file which are of the type char, varchar or nvarchar are envrypted using a MD5 1654 | hash. 1655 | 1656 | ## EXAMPLES 1657 | 1658 | ### -------------------------- EXAMPLE 1 -------------------------- 1659 | PS C:\\\> 1660 | ```powershell 1661 | Invoke-StaticDataMasking -SqlInstance Z-STN-WIN2016-A\DEVOPSDEV -Database tpch-no-compression -DataMaskFile 'C:\Users\devops\Documents\tpch-no-compression.tables.json' 1662 | ``` 1663 | 1664 | ## PARAMETERS 1665 | 1666 | ### SqlInstance 1667 | Required. The SQL Server instance of the database that static data masking is to be applied to. 1668 | 1669 | ```yaml 1670 | Type: String 1671 | Parameter Sets: Set 1 1672 | Aliases: 1673 | 1674 | Required: true 1675 | Position: 0 1676 | Default Value: 1677 | Pipeline Input: false 1678 | ``` 1679 | 1680 | ### Database 1681 | Required. The database that static data masking is to be applied to. 1682 | 1683 | ```yaml 1684 | Type: String 1685 | Parameter Sets: Set 1 1686 | Aliases: 1687 | 1688 | Required: true 1689 | Position: 1 1690 | Default Value: 1691 | Pipeline Input: false 1692 | ``` 1693 | 1694 | ### DataMaskFile 1695 | Required. Absolute path to the JSON file generated by invoking New-DbaDbMaskingConfig. The file can be subsequently editted by 1696 | hand to suit the data masking requirements of this function's user. Currently, static data masking is only supported for columns with char, varchar, nvarchar, int and bigint data types. 1697 | 1698 | ```yaml 1699 | Type: String 1700 | Parameter Sets: Set 1 1701 | Aliases: 1702 | 1703 | Required: true 1704 | Position: 2 1705 | Default Value: 1706 | Pipeline Input: false 1707 | ``` 1708 | 1709 | ### \ 1710 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1711 | 1712 | ## INPUTS 1713 | 1714 | ## OUTPUTS 1715 | 1716 | ## NOTES 1717 | 1718 | Note that it has dependencies on the dbatools module which are installed with this module. 1719 | 1720 | ## RELATED LINKS 1721 | 1722 | 1723 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1724 | 1725 | 1726 | 1727 | # New-FlashArrayCapacityReport 1728 | 1729 | ## SYNOPSIS 1730 | Create a formatted report that contains FlashArray Capacity Information 1731 | 1732 | ## SYNTAX 1733 | 1734 | ### Set 1 1735 | ``` 1736 | New-FlashArrayCapacityReport [-EndPoint] [-OutFile ] [-HTMLFileName ] [-VolumeFilter ] [] 1737 | ``` 1738 | 1739 | ## DESCRIPTION 1740 | This cmdlet will retrieve volume and snapshot capacity information from the FlashArray and output it to a formatted report. 1741 | 1742 | ## EXAMPLES 1743 | 1744 | ### -------------------------- EXAMPLE 1 -------------------------- 1745 | PS C:\\\> 1746 | ```powershell 1747 | New-FlashArrayCapacityReport -EndPoint myArray 1748 | ``` 1749 | 1750 | Creates a capacity report named myArray_Capacity_Report.html in the current folder. 1751 | 1752 | ### -------------------------- EXAMPLE 2 -------------------------- 1753 | PS C:\\\> 1754 | ```powershell 1755 | New-FlashArrayCapacityReport -EndPoint myArray -OutFile C:\temp -HTMLFileName MyArrayReport.html -VolumeFilter 'Volume1*'. 1756 | ``` 1757 | 1758 | Creates a capacity report c:\\temp\\myArrayReport.html that includes volumes that contain the name 'Volume1\*'. 1759 | 1760 | ## PARAMETERS 1761 | 1762 | ### EndPoint 1763 | Required. FQDN or IP address of FlashArray. 1764 | 1765 | ```yaml 1766 | Type: String 1767 | Parameter Sets: Set 1 1768 | Aliases: 1769 | 1770 | Required: true 1771 | Position: 0 1772 | Default Value: 1773 | Pipeline Input: false 1774 | ``` 1775 | 1776 | ### OutFile 1777 | Optional. Full folder path for output report. Default is the current %TEMP% folder. 1778 | 1779 | ```yaml 1780 | Type: String 1781 | Parameter Sets: Set 1 1782 | Aliases: 1783 | 1784 | Required: false 1785 | Position: named 1786 | Default Value: "$env:Temp" 1787 | Pipeline Input: false 1788 | ``` 1789 | 1790 | ### HTMLFileName 1791 | Optional. File name of output report. Default is Array_Capacity_Report.html. 1792 | 1793 | ```yaml 1794 | Type: String 1795 | Parameter Sets: Set 1 1796 | Aliases: 1797 | 1798 | Required: false 1799 | Position: named 1800 | Default Value: Array_Capacity_Report.html 1801 | Pipeline Input: false 1802 | ``` 1803 | 1804 | ### VolumeFilter 1805 | Optional. Specific volumes to filter output on. Wildcards are accepted. By default, this is "\*" (all). 1806 | 1807 | ```yaml 1808 | Type: String 1809 | Parameter Sets: Set 1 1810 | Aliases: 1811 | 1812 | Required: false 1813 | Position: named 1814 | Default Value: * 1815 | Pipeline Input: false 1816 | ``` 1817 | 1818 | ### \ 1819 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1820 | 1821 | ## INPUTS 1822 | 1823 | ### None 1824 | 1825 | 1826 | ## OUTPUTS 1827 | 1828 | ### Formatted HTML report containing retrieved data and specified options. 1829 | 1830 | 1831 | ## NOTES 1832 | 1833 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 1834 | 1835 | ## RELATED LINKS 1836 | 1837 | 1838 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1839 | 1840 | 1841 | 1842 | # New-FlashArrayDbSnapshot 1843 | 1844 | ## SYNOPSIS 1845 | A PowerShell function to create a FlashArray snapshot of the volume that a database resides on. 1846 | 1847 | ## SYNTAX 1848 | 1849 | ### Set 1 1850 | ``` 1851 | New-FlashArrayDbSnapshot [-Database] [-SqlInstance] [-Endpoint] [] 1852 | ``` 1853 | 1854 | ## DESCRIPTION 1855 | A PowerShell function to create a FlashArray snapshot of the volume that a database resides on, based in the 1856 | values of the following parameters: 1857 | 1858 | ## EXAMPLES 1859 | 1860 | ### -------------------------- EXAMPLE 1 -------------------------- 1861 | PS C:\\\> 1862 | ```powershell 1863 | New-FlashArrayDbSnapshot -Database tpch-no-compression -SqlInstance z-sql2016-devops-prd -Endpoint 10.225.112.10 -Creds $Creds 1864 | ``` 1865 | 1866 | Create a snapshot of FlashArray volume that stores the tpch-no-compression database on the z-sql2016-devops-prd instance 1867 | 1868 | ## PARAMETERS 1869 | 1870 | ### Database 1871 | Required. The name of the database to refresh, note that it is assumed that source and target database(s) are named the same. 1872 | 1873 | ```yaml 1874 | Type: String 1875 | Parameter Sets: Set 1 1876 | Aliases: 1877 | 1878 | Required: true 1879 | Position: 0 1880 | Default Value: 1881 | Pipeline Input: false 1882 | ``` 1883 | 1884 | ### SqlInstance 1885 | Required. This can be one or multiple SQL Server instance(s) that host the database(s) to be refreshed, in the case that the 1886 | function is invoked to refresh databases across more than one instance, the list of target instances should be 1887 | spedcified as an array of strings, otherwise a single string representing the target instance will suffice. 1888 | 1889 | ```yaml 1890 | Type: String 1891 | Parameter Sets: Set 1 1892 | Aliases: 1893 | 1894 | Required: true 1895 | Position: 1 1896 | Default Value: 1897 | Pipeline Input: false 1898 | ``` 1899 | 1900 | ### Endpoint 1901 | Required. The IP address representing the FlashArray that the volumes for the source and refresh target databases reside on. 1902 | 1903 | ```yaml 1904 | Type: String 1905 | Parameter Sets: Set 1 1906 | Aliases: 1907 | 1908 | Required: true 1909 | Position: 2 1910 | Default Value: 1911 | Pipeline Input: false 1912 | ``` 1913 | 1914 | ### \ 1915 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 1916 | 1917 | ## INPUTS 1918 | 1919 | ## OUTPUTS 1920 | 1921 | ## NOTES 1922 | 1923 | FlashArray Credentials - A global variable $Creds may be used as described in the release notes for this module. If neither is specified, the module will prompt for credentials. 1924 | 1925 | Known Restrictions 1926 | ------------------ 1927 | 1. This function does not work for databases associated with failover cluster instances. 1928 | 2. This function cannot be used to seed secondary replicas in availability groups using databases in the primary replica. 1929 | 3. The function assumes that all database files and the transaction log reside on a single FlashArray volume. 1930 | 1931 | Note that it has dependencies on the dbatools and PureStoragePowerShellSDK modules which are installed as part of this module. 1932 | 1933 | ## RELATED LINKS 1934 | 1935 | 1936 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 1937 | 1938 | 1939 | 1940 | # New-FlashArrayPGroupVolumes 1941 | 1942 | ## SYNOPSIS 1943 | Creates volumes to a new FlashArray Protection Group (PGroup). 1944 | 1945 | ## SYNTAX 1946 | 1947 | ### Set 1 1948 | ``` 1949 | New-FlashArrayPGroupVolumes [-PGroupPrefix] [-VolumeSizeGB] [-NumberOfVolumes] [] 1950 | ``` 1951 | 1952 | ## DESCRIPTION 1953 | This cmdlet will allow for the creation of multiple volumes and adding the created volumes to a new Protection Group (PGroup). The new volume names will default to "$PGroupPrefix-vol1", "PGroupPrefix-vol2" etc. 1954 | 1955 | ## EXAMPLES 1956 | 1957 | ### -------------------------- EXAMPLE 1 -------------------------- 1958 | PS C:\\\> 1959 | ```powershell 1960 | New-FlashArrayPGroupVolumes -PGroupPrefix "database" -VolumeSizeGB "200" -NumberOfVolumes "3" 1961 | ``` 1962 | 1963 | Creates 3-200GB volumes, named "database-vol1", "database-vol2", and "database-vol3". Each volume is added to the new Protection Group "database-PGroup". 1964 | 1965 | ## PARAMETERS 1966 | 1967 | ### PGroupPrefix 1968 | Required. The name of the Protection Group prefix to add volumes to. This parameter specifies the prefix of the PGroup name. The suffix defaults to "-PGroup". Example: -PGroupPrefix "database". The full PGroup name will be "database-PGroup". 1969 | This PGroup will be created as new and must not already exist on the array. 1970 | This prefix will also be used to uniquely name the volumes as they are created. 1971 | 1972 | ```yaml 1973 | Type: String 1974 | Parameter Sets: Set 1 1975 | Aliases: 1976 | 1977 | Required: true 1978 | Position: 0 1979 | Default Value: 1980 | Pipeline Input: false 1981 | ``` 1982 | 1983 | ### VolumeSizeGB 1984 | Required. The size of the new volumes in Gigabytes (GB). 1985 | 1986 | ```yaml 1987 | Type: String 1988 | Parameter Sets: Set 1 1989 | Aliases: 1990 | 1991 | Required: true 1992 | Position: 1 1993 | Default Value: 1994 | Pipeline Input: false 1995 | ``` 1996 | 1997 | ### NumberOfVolumes 1998 | Required. The number of volumes that are to be created. Each volume will be named "vol" with an ascending number following (ie. vol1, vol2, etc.). Each volume name will also contain the $PGroupPrefix variable as the name prefix. 1999 | 2000 | ```yaml 2001 | Type: String 2002 | Parameter Sets: Set 1 2003 | Aliases: 2004 | 2005 | Required: true 2006 | Position: 2 2007 | Default Value: 2008 | Pipeline Input: false 2009 | ``` 2010 | 2011 | ### \ 2012 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2013 | 2014 | ## INPUTS 2015 | 2016 | ### None 2017 | 2018 | 2019 | ## OUTPUTS 2020 | 2021 | ### None 2022 | 2023 | 2024 | ## NOTES 2025 | 2026 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 2027 | 2028 | ## RELATED LINKS 2029 | 2030 | 2031 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2032 | 2033 | 2034 | 2035 | # New-HypervClusterVolumeReport 2036 | 2037 | ## SYNOPSIS 2038 | Creates a Excel report on volumes connected to a Hyper-V cluster. 2039 | 2040 | ## SYNTAX 2041 | 2042 | ### Set 1 2043 | ``` 2044 | New-HypervClusterVolumeReport [-EndPoint] [-VmCsvFileName ] [-WinCsvFileName ] [-PfaCsvFileName ] [-ExcelFile ] [] 2045 | ``` 2046 | 2047 | ## DESCRIPTION 2048 | This creates separate CSV files for VM, Windows Hosts, and FlashArray information that is part of a HyperV cluster. It then takes that output and places it into a an Excel workbook that contains sheets for each CSV file. 2049 | 2050 | ## EXAMPLES 2051 | 2052 | ### -------------------------- EXAMPLE 1 -------------------------- 2053 | PS C:\\\> 2054 | ```powershell 2055 | New-HypervClusterVolumeReport -EndPoint myarray -VmCsvName myVMs.csv -WinCsvName myWinHosts.csv -PfaCsvName myFlashArray.csv -ExcelFile myExcelFile 2056 | ``` 2057 | 2058 | This will create three separate CSV files with HyperV cluster information and incorporate them into a single Excel workbook. 2059 | 2060 | ## PARAMETERS 2061 | 2062 | ### EndPoint 2063 | 2064 | 2065 | ```yaml 2066 | Type: String 2067 | Parameter Sets: Set 1 2068 | Aliases: 2069 | 2070 | Required: true 2071 | Position: 0 2072 | Default Value: 2073 | Pipeline Input: false 2074 | ``` 2075 | 2076 | ### VmCsvFileName 2077 | Optional. Defaults to VMs.csv. 2078 | 2079 | ```yaml 2080 | Type: String 2081 | Parameter Sets: Set 1 2082 | Aliases: 2083 | 2084 | Required: false 2085 | Position: named 2086 | Default Value: VMs.csv 2087 | Pipeline Input: false 2088 | ``` 2089 | 2090 | ### WinCsvFileName 2091 | Optional. defaults to WindowsHosts.csv. 2092 | 2093 | ```yaml 2094 | Type: String 2095 | Parameter Sets: Set 1 2096 | Aliases: 2097 | 2098 | Required: false 2099 | Position: named 2100 | Default Value: WindowsHosts.csv 2101 | Pipeline Input: false 2102 | ``` 2103 | 2104 | ### PfaCsvFileName 2105 | Optional. defaults to FlashArrays.csv. 2106 | 2107 | ```yaml 2108 | Type: String 2109 | Parameter Sets: Set 1 2110 | Aliases: 2111 | 2112 | Required: false 2113 | Position: named 2114 | Default Value: FlashArrays.csv 2115 | Pipeline Input: false 2116 | ``` 2117 | 2118 | ### ExcelFile 2119 | Optional. defaults to HypervClusterReport.xlsx. 2120 | 2121 | ```yaml 2122 | Type: String 2123 | Parameter Sets: Set 1 2124 | Aliases: 2125 | 2126 | Required: false 2127 | Position: named 2128 | Default Value: HypervClusterReport.xlxs 2129 | Pipeline Input: false 2130 | ``` 2131 | 2132 | ### \ 2133 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2134 | 2135 | ## INPUTS 2136 | 2137 | ### Endpoint is mandatory. VM, Win, and PFA csv file names are optional. 2138 | 2139 | 2140 | ## OUTPUTS 2141 | 2142 | ### Outputs individual CSV files and creates an Excel workbook that is built using the required PowerShell module ImportExcel, created by Douglas Finke. 2143 | 2144 | 2145 | ## NOTES 2146 | 2147 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 2148 | 2149 | ## RELATED LINKS 2150 | 2151 | 2152 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2153 | 2154 | 2155 | 2156 | # New-VolumeShadowCopy 2157 | 2158 | ## SYNOPSIS 2159 | Creates a new volume shadow copy using Diskshadow. 2160 | 2161 | ## SYNTAX 2162 | 2163 | ### Set 1 2164 | ``` 2165 | New-VolumeShadowCopy [-Volume] [[-ScriptName] ] [-ShadowCopyAlias] [[-VerboseMode] ] [] 2166 | ``` 2167 | 2168 | ## DESCRIPTION 2169 | This cmdlet will create a new volume shadow copy using the Diskshadow command, passing the variables specified. 2170 | 2171 | ## EXAMPLES 2172 | 2173 | ### -------------------------- EXAMPLE 1 -------------------------- 2174 | PS C:\\\> 2175 | ```powershell 2176 | New-VolumeShadowCopy -Volume Volume01 -ShadowCopyAlias MyAlias 2177 | ``` 2178 | 2179 | Adds a new volume shadow copy of Volume01 using Diskshadow with an alias of 'MyAlias'. 2180 | 2181 | ## PARAMETERS 2182 | 2183 | ### Volume 2184 | Required. 2185 | 2186 | ```yaml 2187 | Type: String[] 2188 | Parameter Sets: Set 1 2189 | Aliases: 2190 | 2191 | Required: true 2192 | Position: 0 2193 | Default Value: 2194 | Pipeline Input: false 2195 | ``` 2196 | 2197 | ### ScriptName 2198 | Optional. Script text file name created to pass to the Diskshadow command. Pre-defined as 'PUREVSS-SNAP'. 2199 | 2200 | ```yaml 2201 | Type: String 2202 | Parameter Sets: Set 1 2203 | Aliases: 2204 | 2205 | Required: false 2206 | Position: 1 2207 | Default Value: PUREVSS-SNAP 2208 | Pipeline Input: false 2209 | ``` 2210 | 2211 | ### ShadowCopyAlias 2212 | Required. Name of the shadow copy alias. 2213 | 2214 | ```yaml 2215 | Type: String 2216 | Parameter Sets: Set 1 2217 | Aliases: 2218 | 2219 | Required: true 2220 | Position: 2 2221 | Default Value: 2222 | Pipeline Input: false 2223 | ``` 2224 | 2225 | ### VerboseMode 2226 | Optional. "On" or "Off". If set to 'off', verbose mode for the Diskshadow command is disabled. Default is 'on'. 2227 | 2228 | ```yaml 2229 | Type: String 2230 | Parameter Sets: Set 1 2231 | Aliases: 2232 | 2233 | Required: false 2234 | Position: 3 2235 | Default Value: On 2236 | Accepted Values: On 2237 | Off 2238 | Pipeline Input: false 2239 | ``` 2240 | 2241 | ### \ 2242 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2243 | 2244 | ## INPUTS 2245 | 2246 | ### None 2247 | 2248 | 2249 | ## OUTPUTS 2250 | 2251 | ### None 2252 | 2253 | 2254 | ## NOTES 2255 | 2256 | See https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow for more information on the Diskshadow utility. 2257 | 2258 | ## RELATED LINKS 2259 | 2260 | 2261 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2262 | 2263 | 2264 | 2265 | # Register-HostVolumes 2266 | 2267 | ## SYNOPSIS 2268 | Sets Pure FlashArray connected disks to online. 2269 | 2270 | ## SYNTAX 2271 | 2272 | ### Set 1 2273 | ``` 2274 | Register-HostVolumes [[-ComputerName] ] [] 2275 | ``` 2276 | 2277 | ## DESCRIPTION 2278 | This cmdlet will set any FlashArray volumes (disks) to online in Windows using the diskpart command. 2279 | 2280 | ## EXAMPLES 2281 | 2282 | ### -------------------------- EXAMPLE 1 -------------------------- 2283 | PS C:\\\> 2284 | ```powershell 2285 | Register-HostVolumes -ComputerName myComputer 2286 | ``` 2287 | 2288 | Sets all FlashArray disks for myComputer to online. 2289 | 2290 | ## PARAMETERS 2291 | 2292 | ### ComputerName 2293 | 2294 | 2295 | ```yaml 2296 | Type: String 2297 | Parameter Sets: Set 1 2298 | Aliases: 2299 | 2300 | Required: false 2301 | Position: 0 2302 | Default Value: 2303 | Pipeline Input: false 2304 | ``` 2305 | 2306 | ### \ 2307 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2308 | 2309 | ## INPUTS 2310 | 2311 | ### None 2312 | 2313 | 2314 | ## OUTPUTS 2315 | 2316 | ### None 2317 | 2318 | 2319 | ## NOTES 2320 | 2321 | ## RELATED LINKS 2322 | 2323 | 2324 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2325 | 2326 | 2327 | 2328 | # Remove-FlashArrayPendingDeletes 2329 | 2330 | ## SYNOPSIS 2331 | Reports on pending FlashArray Volume and Snapshots deletions and optionally Eradicates them. 2332 | 2333 | ## SYNTAX 2334 | 2335 | ### Set 1 2336 | ``` 2337 | Remove-FlashArrayPendingDeletes [-EndPoint] [] 2338 | ``` 2339 | 2340 | ## DESCRIPTION 2341 | This cmdlet will return information on any volumes or volume snapshots that are pending eradication after deletion and optionally prompt for eradication of those objects. The user will be prompted for confirmation. 2342 | 2343 | ## EXAMPLES 2344 | 2345 | ### -------------------------- EXAMPLE 1 -------------------------- 2346 | PS C:\\\> 2347 | ```powershell 2348 | Remove-FlashArrayPendingDelete -EndPoint myArray 2349 | ``` 2350 | 2351 | ## PARAMETERS 2352 | 2353 | ### EndPoint 2354 | 2355 | 2356 | ```yaml 2357 | Type: String 2358 | Parameter Sets: Set 1 2359 | Aliases: 2360 | 2361 | Required: true 2362 | Position: 0 2363 | Default Value: 2364 | Pipeline Input: false 2365 | ``` 2366 | 2367 | ### \ 2368 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2369 | 2370 | ## INPUTS 2371 | 2372 | ### None 2373 | 2374 | 2375 | ## OUTPUTS 2376 | 2377 | ### Volume and volume snapshots awaiting eradication. 2378 | 2379 | 2380 | ## NOTES 2381 | 2382 | This cmdlet can utilize the global $Creds variable for FlashArray authentication. Set the variable $Creds by using the command $Creds = Get-Credential. 2383 | 2384 | ## RELATED LINKS 2385 | 2386 | 2387 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2388 | 2389 | 2390 | 2391 | # Set-MPIODiskLBPolicy 2392 | 2393 | ## SYNOPSIS 2394 | Sets the MPIO Load Balancing policy for FlashArray disks. 2395 | 2396 | ## SYNTAX 2397 | 2398 | ### Set 1 2399 | ``` 2400 | Set-MPIODiskLBPolicy [-Policy] [] 2401 | ``` 2402 | 2403 | ## DESCRIPTION 2404 | This cmdlet will set the MPIO Load Balancing policy for all connected Pure FlashArrays disks to the desired setting using the mpclaim.exe utlity. 2405 | The default Windows OS setting is RR. 2406 | 2407 | ## EXAMPLES 2408 | 2409 | ### -------------------------- EXAMPLE 1 -------------------------- 2410 | PS C:\\\> 2411 | ```powershell 2412 | Set-MPIODiskLBPolicy -Policy LQD 2413 | ``` 2414 | 2415 | Sets the MPIO load balancing policy for all Pure disks to Least Queue Depth. 2416 | 2417 | ### -------------------------- EXAMPLE 2 -------------------------- 2418 | PS C:\\\> 2419 | ```powershell 2420 | Set-MPIODiskLBPolicy -Policy clear 2421 | ``` 2422 | 2423 | Clears the current MPIO policy for all Pure disks and sets to the default of RR. 2424 | 2425 | ## PARAMETERS 2426 | 2427 | ### Policy 2428 | 2429 | 2430 | ```yaml 2431 | Type: String 2432 | Parameter Sets: Set 1 2433 | Aliases: 2434 | 2435 | Required: true 2436 | Position: 0 2437 | Default Value: 2438 | Accepted Values: LQD 2439 | RR 2440 | clear 2441 | FO 2442 | RRWS 2443 | WP 2444 | LB 2445 | Pipeline Input: false 2446 | ``` 2447 | 2448 | ### \ 2449 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2450 | 2451 | ## INPUTS 2452 | 2453 | ### None 2454 | 2455 | 2456 | ## OUTPUTS 2457 | 2458 | ### None 2459 | 2460 | 2461 | ## NOTES 2462 | 2463 | ## RELATED LINKS 2464 | 2465 | 2466 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2467 | 2468 | 2469 | 2470 | # Set-TlsVersions 2471 | 2472 | ## SYNOPSIS 2473 | Sets the TLS Version in the local registry. 2474 | 2475 | ## SYNTAX 2476 | 2477 | ### Set 1 2478 | ``` 2479 | Set-TlsVersions [] 2480 | ``` 2481 | 2482 | ## DESCRIPTION 2483 | This cmdlet disables TLS version 1.0 and enables TLS Versions 1.1, 1.2, and 1.3 in the local registry. It will prompt for creating a backup of the registry before execution for recovery purposes. 2484 | 2485 | ## EXAMPLES 2486 | 2487 | ### -------------------------- EXAMPLE 1 -------------------------- 2488 | PS C:\\\> 2489 | ```powershell 2490 | Set-TlsVersions 2491 | ``` 2492 | 2493 | Prompts for creation of a registry backup, disables TLS version 1.0, and enables TLS versions 1.1, 1.2, and 1.3. 2494 | 2495 | ## PARAMETERS 2496 | 2497 | ### \ 2498 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2499 | 2500 | ## INPUTS 2501 | 2502 | ### None 2503 | 2504 | 2505 | ## OUTPUTS 2506 | 2507 | ### Backup of the registry before the changes are implemented. 2508 | 2509 | 2510 | ## NOTES 2511 | 2512 | ## RELATED LINKS 2513 | 2514 | 2515 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2516 | 2517 | 2518 | 2519 | # Set-WindowsPowerScheme 2520 | 2521 | ## SYNOPSIS 2522 | Cmdlet to set the Power scheme for the Windows OS to High Performance. 2523 | 2524 | ## SYNTAX 2525 | 2526 | ### Set 1 2527 | ``` 2528 | Set-WindowsPowerScheme [[-ComputerName] ] [] 2529 | ``` 2530 | 2531 | ## DESCRIPTION 2532 | Cmdlet to set the Power scheme for the Windows OS to High Performance. 2533 | 2534 | ## EXAMPLES 2535 | 2536 | ### -------------------------- EXAMPLE 1 -------------------------- 2537 | PS C:\\\> 2538 | ```powershell 2539 | Set-WindowsPowerScheme 2540 | ``` 2541 | 2542 | Retrieves the current Power Scheme setting, and if not set to High Performance, asks for confirmation to set it. 2543 | 2544 | ## PARAMETERS 2545 | 2546 | ### ComputerName 2547 | 2548 | 2549 | ```yaml 2550 | Type: String 2551 | Parameter Sets: Set 1 2552 | Aliases: 2553 | 2554 | Required: false 2555 | Position: 0 2556 | Default Value: 2557 | Pipeline Input: false 2558 | ``` 2559 | 2560 | ### \ 2561 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2562 | 2563 | ## INPUTS 2564 | 2565 | ### None 2566 | 2567 | 2568 | ## OUTPUTS 2569 | 2570 | ### Current power scheme and optional confirmation to alter the setting in the Windows registry. 2571 | 2572 | 2573 | ## NOTES 2574 | 2575 | ## RELATED LINKS 2576 | 2577 | 2578 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2579 | 2580 | 2581 | 2582 | # Sync-FlashArrayHosts 2583 | 2584 | ## SYNOPSIS 2585 | Synchronizes the hosts amd host protocols between two FlashArrays. 2586 | 2587 | ## SYNTAX 2588 | 2589 | ### Set 1 2590 | ``` 2591 | Sync-FlashArrayHosts [-SourceArray] [-TargetArray] -Protocol [] 2592 | ``` 2593 | 2594 | ## DESCRIPTION 2595 | This cmdlet will retrieve the current hosts from the Source array and create them on the target array. It will also add the FC (WWN) or iSCSI (iqn) settings for each host on the Target array. 2596 | 2597 | ## EXAMPLES 2598 | 2599 | ### -------------------------- EXAMPLE 1 -------------------------- 2600 | PS C:\\\> 2601 | ```powershell 2602 | Sync-FlashArraysHosts -SourceArray mySourceArray -TargetArray myTargetArray -Protocol FC 2603 | ``` 2604 | 2605 | Synchronizes the hosts and hosts FC WWNs from the mySourceArray to the myTargetArray. 2606 | 2607 | ## PARAMETERS 2608 | 2609 | ### SourceArray 2610 | Required. FQDN or IP address of the source FlashArray. 2611 | 2612 | ```yaml 2613 | Type: String 2614 | Parameter Sets: Set 1 2615 | Aliases: 2616 | 2617 | Required: true 2618 | Position: 0 2619 | Default Value: 2620 | Pipeline Input: false 2621 | ``` 2622 | 2623 | ### TargetArray 2624 | Required. FQDN or IP address of the source FlashArray. 2625 | 2626 | ```yaml 2627 | Type: String 2628 | Parameter Sets: Set 1 2629 | Aliases: 2630 | 2631 | Required: true 2632 | Position: 1 2633 | Default Value: 2634 | Pipeline Input: false 2635 | ``` 2636 | 2637 | ### Protocol 2638 | Required. 'FC' for Fibre Channel WWNs or 'iSCSI' for iSCSI IQNs. 2639 | 2640 | ```yaml 2641 | Type: String 2642 | Parameter Sets: Set 1 2643 | Aliases: 2644 | 2645 | Required: true 2646 | Position: named 2647 | Default Value: 2648 | Accepted Values: iSCSI 2649 | FC 2650 | Pipeline Input: false 2651 | ``` 2652 | 2653 | ### \ 2654 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2655 | 2656 | ## INPUTS 2657 | 2658 | ### None 2659 | 2660 | 2661 | ## OUTPUTS 2662 | 2663 | ### None 2664 | 2665 | 2666 | ## NOTES 2667 | 2668 | This cmdlet cannot utilize the global $Creds variable as it requires two logins to two separate arrays. 2669 | 2670 | ## RELATED LINKS 2671 | 2672 | 2673 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2674 | 2675 | 2676 | 2677 | # Test-WindowsBestPractices 2678 | 2679 | ## SYNOPSIS 2680 | Cmdlet used to retrieve hosts information, test and optionally configure MPIO (FC) and/or iSCSI settings in a Windows OS against FlashArray Best Practices. 2681 | 2682 | ## SYNTAX 2683 | 2684 | ### Set 1 2685 | ``` 2686 | Test-WindowsBestPractices [[-OutFile] ] [-EnableIscsiTests] [] 2687 | ``` 2688 | 2689 | ## DESCRIPTION 2690 | This cmdlet will retrieve the curretn host infromation, and iterate through several tests around MPIO (FC) and iSCSI OS settings and hardware, indicate whether they are adhearing to Pure Storage FlashArray Best Practices, and offer to alter the settings if applicable. 2691 | All tests can be bypassed with a negative user response when prompted, or simply by using Ctrl-C to break the process. 2692 | 2693 | ## EXAMPLES 2694 | 2695 | ### -------------------------- EXAMPLE 1 -------------------------- 2696 | PS C:\\\> 2697 | ```powershell 2698 | Test-WindowsBestPractices 2699 | ``` 2700 | 2701 | Run the cmdlet against the local machine running the MPIO tests and the log is located in the %TMP%\\Test-WindowsBestPractices.log file. 2702 | 2703 | ### -------------------------- EXAMPLE 2 -------------------------- 2704 | PS C:\\\> 2705 | ```powershell 2706 | Test-WindowsZBestPractices -EnableIscsiTests -OutFile "c:\temp\mylog.log" 2707 | ``` 2708 | 2709 | Run the cmdlet against the local machine, run the additional iSCSI tests, and create the log file at c:\\temp\\mylog.log. 2710 | 2711 | ## PARAMETERS 2712 | 2713 | ### OutFile 2714 | Optional. Specify the full filepath (ex. c:\\mylog.log) for logging. If not specified, the default file of %TMP%\\Test-WindowsBestPractices.log will be used. 2715 | 2716 | ```yaml 2717 | Type: String 2718 | Parameter Sets: Set 1 2719 | Aliases: 2720 | 2721 | Required: false 2722 | Position: 0 2723 | Default Value: "$env:Temp\Test-WindowsBestPractices.log" 2724 | Pipeline Input: false 2725 | ``` 2726 | 2727 | ### EnableIscsiTests 2728 | Optional. If this parameter is present, the cmdlet will run tests for iSCSI settings. 2729 | 2730 | ```yaml 2731 | Type: SwitchParameter 2732 | Parameter Sets: Set 1 2733 | Aliases: 2734 | 2735 | Required: false 2736 | Position: named 2737 | Default Value: False 2738 | Pipeline Input: false 2739 | ``` 2740 | 2741 | ### \ 2742 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2743 | 2744 | ## INPUTS 2745 | 2746 | ### Optional parameter for iSCSI testing. 2747 | 2748 | 2749 | ## OUTPUTS 2750 | 2751 | ### Output status and best practice options for every test. 2752 | 2753 | 2754 | ## NOTES 2755 | 2756 | ## RELATED LINKS 2757 | 2758 | 2759 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2760 | 2761 | 2762 | 2763 | # Unregister-HostVolumes 2764 | 2765 | ## SYNOPSIS 2766 | Sets Pure FlashArray connected disks to offline. 2767 | 2768 | ## SYNTAX 2769 | 2770 | ### Set 1 2771 | ``` 2772 | Unregister-HostVolumes [[-Computername] ] [] 2773 | ``` 2774 | 2775 | ## DESCRIPTION 2776 | This cmdlet will set any FlashArray volumes (disks) to offline in Windows using the diskpart command. 2777 | 2778 | ## EXAMPLES 2779 | 2780 | ### -------------------------- EXAMPLE 1 -------------------------- 2781 | PS C:\\\> 2782 | ```powershell 2783 | Unregister-HostVolumes -ComputerName myComputer 2784 | ``` 2785 | 2786 | Offlines all FlashArray disks from myComputer. 2787 | 2788 | ## PARAMETERS 2789 | 2790 | ### Computername 2791 | 2792 | 2793 | ```yaml 2794 | Type: String 2795 | Parameter Sets: Set 1 2796 | Aliases: 2797 | 2798 | Required: false 2799 | Position: 0 2800 | Default Value: 2801 | Pipeline Input: false 2802 | ``` 2803 | 2804 | ### \ 2805 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2806 | 2807 | ## INPUTS 2808 | 2809 | ### None 2810 | 2811 | 2812 | ## OUTPUTS 2813 | 2814 | ### None 2815 | 2816 | 2817 | ## NOTES 2818 | 2819 | ## RELATED LINKS 2820 | 2821 | 2822 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2823 | 2824 | 2825 | 2826 | # Update-DriveInformation 2827 | 2828 | ## SYNOPSIS 2829 | Updates drive letters and assigns a label. 2830 | 2831 | ## SYNTAX 2832 | 2833 | ### Set 1 2834 | ``` 2835 | Update-DriveInformation [-NewDriveLetter] [-CurrentDriveLetter] [[-NewDriveLabel] ] [] 2836 | ``` 2837 | 2838 | ## DESCRIPTION 2839 | Thsi cmdlet will update the current drive letter to the new drive letter, and assign a new drive label if specified. 2840 | 2841 | ## EXAMPLES 2842 | 2843 | ### -------------------------- EXAMPLE 1 -------------------------- 2844 | PS C:\\\> 2845 | ```powershell 2846 | Update-DriveInformation -NewDriveLetter S -CurrentDriveLetter M 2847 | ``` 2848 | 2849 | Updates the drive letter from M: to S: and labels S: to NewDrive. 2850 | 2851 | ## PARAMETERS 2852 | 2853 | ### NewDriveLetter 2854 | Required. Drive lettwre without the colon. 2855 | 2856 | ```yaml 2857 | Type: String 2858 | Parameter Sets: Set 1 2859 | Aliases: 2860 | 2861 | Required: true 2862 | Position: 0 2863 | Default Value: 2864 | Pipeline Input: false 2865 | ``` 2866 | 2867 | ### CurrentDriveLetter 2868 | Required. Drive lettwre without the colon. 2869 | 2870 | ```yaml 2871 | Type: String 2872 | Parameter Sets: Set 1 2873 | Aliases: 2874 | 2875 | Required: true 2876 | Position: 1 2877 | Default Value: 2878 | Pipeline Input: false 2879 | ``` 2880 | 2881 | ### NewDriveLabel 2882 | Optional. Drive label text. Defaults to "NewDrive". 2883 | 2884 | ```yaml 2885 | Type: String 2886 | Parameter Sets: Set 1 2887 | Aliases: 2888 | 2889 | Required: false 2890 | Position: 2 2891 | Default Value: NewDrive 2892 | Pipeline Input: false 2893 | ``` 2894 | 2895 | ### \ 2896 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). 2897 | 2898 | ## INPUTS 2899 | 2900 | ### None 2901 | 2902 | 2903 | ## OUTPUTS 2904 | 2905 | ### None 2906 | 2907 | 2908 | ## NOTES 2909 | 2910 | ## RELATED LINKS 2911 | 2912 | 2913 | *Generated by: PowerShell HelpWriter 2021 v2.3.50* 2914 | 2915 | -------------------------------------------------------------------------------- /en-us/about_PureStoragePowerShellToolkit1.Help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_PureStoragePowerShellToolkit1 3 | 4 | SHORT DESCRIPTION 5 | This is a short description of the file. 6 | 7 | LONG DESCRIPTION 8 | This is a long description of the file. 9 | 10 | NOTE 11 | This is a note. 12 | 13 | TROUBLESHOOTING NOTE 14 | 15 | 16 | 17 | EXAMPLES 18 | Place examples here. 19 | 20 | KEYWORDS 21 | 22 | 23 | 24 | SEE ALSO 25 | Place related topics here. -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "powershell-toolkit", 3 | "name": "PowerShell Toolkit", 4 | "filter": "microsoft devops", 5 | "image": "http://code.purestorage.com/images/5_Powershell-Toolkit.png", 6 | "featured": 0, 7 | "priority": 1 8 | } 9 | --------------------------------------------------------------------------------