├── Archive ├── v1.1 │ ├── SolidFire PowerShell Tools Release Notes v1.1.pdf │ ├── SolidFire PowerShell Tools User Guide v1.1.pdf │ ├── SolidFire_PowerShell_1_1_0_37-install.msi │ └── SolidFire_PowerShell_1_1_0_37-install.msi.md5 ├── v1.2.1.1 │ ├── SolidFire PowerShell Tools Release Notes v1.2.1.1.pdf │ └── SolidFire PowerShell Tools User Guide_v1.2.pdf ├── v1.2 │ ├── SolidFire PowerShell Tools Release Notes_v1.2.pdf │ ├── SolidFire PowerShell Tools User Guide_v1.2.pdf │ ├── SolidFire_PowerShell_1_2_0_37-install.msi │ └── SolidFire_PowerShell_1_2_0_37-install.msi.md5 ├── v1.3.1.4 │ ├── NetApp_SolidFire_PowerShell_Tools_v1_3_1_4_Release_Notes.pdf │ ├── NetApp_SolidFire_PowerShell_Tools_v1_3_1_4_User_Guide.pdf │ ├── SolidFire_PowerShell_1_3_1_4-install.msi │ └── SolidFire_PowerShell_1_3_1_4-install.msi.md5 ├── v1.3 │ ├── NetApp_SolidFire_PowerShell_Tools_Release_Notes_v1.3.pdf │ ├── NetApp_SolidFire_PowerShell_Tools_User_Guide_v1.3.pdf │ └── SolidFire_PowerShell_1_3_0_124-install.msi ├── v1.4 │ ├── NetApp_SolidFire_PowerShell_Tools_v1.4_Release_Notes.pdf │ ├── NetApp_SolidFire_PowerShell_Tools_v1.4_User_Guide.pdf │ ├── SolidFire_PowerShell_1_4_0_98-install.msi │ └── SolidFire_PowerShell_1_4_0_98-install.msi.md5 ├── v1.5.1 │ ├── NetApp_SolidFire_PowerShell_Tools_v1.5.1_Release_Notes.pdf │ └── NetApp_SolidFire_PowerShell_Tools_v1.5.1_User_Guide.pdf ├── v1.5 │ ├── NetApp_SolidFire_PowerShell_Tools _v1.5_Release_Notes.pdf │ ├── NetApp_SolidFire_PowerShell_Tools_v1.5_User_Guide.pdf │ └── SolidFire_PowerShell_1_5_0_119-install.msi ├── v1.6 │ ├── ElementPowerShell_1.6_ReleaseNotes.pdf │ └── ElementPowerShell_1.6_UserGuide.pdf └── v1.7 │ ├── NetApp_Element_PowerShell_Release_Notes_1.7.pdf │ └── NetApp_Element_PowerShell_User_Guide_1.7.pdf ├── Getting Started ├── Getting Started 2015 - Section 1.1 - Introduction.ps1 ├── Getting Started 2015 - Section 1.2 - Creating SolidFire Objects.ps1 ├── Getting Started 2015 - Section 1.3 - Modifying SolidFire Objects.ps1 ├── Getting Started 2015 - Section 2 - Creating New Datastores.ps1 ├── Getting Started 2015 - Section 3 - Reporting.ps1 └── ReadMe.txt ├── LICENSE ├── Microsoft ├── 1-basic-network(local)-v1.ps1 ├── 2-Install-Feature(multiple).ps1 ├── 3-iSCSIConfiguration-v2.ps1 ├── 4-CreateSFVolumes.ps1 ├── 5-AddNewIscsiTargets.ps1 ├── 6-AddClusterStorage.ps1 ├── HyperV-2012R2 │ ├── .DS_Store │ └── ConfigGuide │ │ ├── 1-basic-network(local)-v1.ps1 │ │ ├── 2-Install-Feature(multiple).ps1 │ │ ├── 3-iSCSIConfiguration-v2.ps1 │ │ ├── 4-CreateSFVolumes.ps1 │ │ ├── 5-AddNewIscsiTargets.ps1 │ │ ├── 6-AddClusterStorage.ps1 │ │ └── hyperv-ips.csv ├── README.md └── hyperv-ips.csv ├── README.md ├── Reporting ├── Get-VolumeAccessGroup-Each-Volume-Is-In └── sf-efficiency.ps1 ├── SPBM ├── Get-SFSpbmPolicyName.ps1 ├── Get-SFVolumeFromDatastore.ps1 ├── Get-SFVolumeQoSfromSPBMPolicy.ps1 ├── New-SFMultiVolume.ps1 ├── New-SFVolumeFromSPBMPolicy.ps1 ├── New-SPBMPolicyFromDatastore.ps1 ├── New-SPBMPolicyFromSFWorkload.ps1 ├── New-TagFromSFWorkload.ps1 ├── ReadMe.txt ├── Set-SFVolumeAttribute.ps1 ├── Set-SFWorkloadTagToDatastore.ps1 └── SolidFire-SPBM.psm1 ├── Sample Scripts - Assigning Volume Attributes.ps1 ├── Sample Scripts - Nodes.ps1 ├── Sample Scripts - Volume Access Groups.ps1 ├── Sample Scripts - Volumes.ps1 ├── SolidFire-Function-Template.ps1 ├── VMware ├── Add-SolidFire-Volume-To-VMware.ps1 ├── ESXi-Host-to-VolumeAccessGroup-Mapping.ps1 ├── Get-SFVMwareBestPractices.ps1 ├── New-TenantOrCluster.ps1 ├── PowerActions │ ├── Get-Volume-Access-Group-PowerAction.ps1 │ ├── Get-iSCSI-Adapter-Queue-Depth-PowerAction.ps1 │ ├── Set-QoS-on-Datastore-PowerAction.ps1 │ ├── Set-SFVolumeAttribute-PowerAction.ps1 │ └── SolidFire-VMware-Best-Practices-PowerAction.ps1 ├── Remove-SolidFire-Volume-From-VMware.ps1 ├── Set-SFVMwareBestPractices.ps1 ├── SolidFire-VMware-Best-Practices.ps1 └── VVols │ ├── D3 - Migrate-VMsToVvols.ps1 │ ├── D4 - Set-MultipleVvolPolicies.ps1 │ ├── New-VvolSPBMPolicy-NoTags.ps1 │ └── New-VvolSPBMPolicy.ps1 ├── docs ├── NetApp_Element_PowerShell_12.3_Release_Notes.pdf ├── NetApp_Element_PowerShell_12.3_User_Guide.pdf ├── linux │ ├── README.md │ ├── linux-logo-small.png │ └── linux12.3.md ├── mac │ ├── README.md │ ├── Readme12.3.md │ └── apple-logo-small.png ├── product.png ├── readme.txt └── windows │ ├── PowerShell12.3.md │ ├── README.md │ ├── windows-logo-small.png │ └── windows10-logo-small.png └── packages ├── Initialize-SFEnvironment.ps1 ├── SolidFire.Core.psd1 ├── SolidFire.SDK.dll ├── SolidFire.dll └── SolidFire.dll-help.xml /Archive/v1.1/SolidFire PowerShell Tools Release Notes v1.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.1/SolidFire PowerShell Tools Release Notes v1.1.pdf -------------------------------------------------------------------------------- /Archive/v1.1/SolidFire PowerShell Tools User Guide v1.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.1/SolidFire PowerShell Tools User Guide v1.1.pdf -------------------------------------------------------------------------------- /Archive/v1.1/SolidFire_PowerShell_1_1_0_37-install.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.1/SolidFire_PowerShell_1_1_0_37-install.msi -------------------------------------------------------------------------------- /Archive/v1.1/SolidFire_PowerShell_1_1_0_37-install.msi.md5: -------------------------------------------------------------------------------- 1 | 25d159f4de43457910949823c92c5fa3 SolidFire_PowerShell_1_1_0_37-install.msi 2 | -------------------------------------------------------------------------------- /Archive/v1.2.1.1/SolidFire PowerShell Tools Release Notes v1.2.1.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.2.1.1/SolidFire PowerShell Tools Release Notes v1.2.1.1.pdf -------------------------------------------------------------------------------- /Archive/v1.2.1.1/SolidFire PowerShell Tools User Guide_v1.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.2.1.1/SolidFire PowerShell Tools User Guide_v1.2.pdf -------------------------------------------------------------------------------- /Archive/v1.2/SolidFire PowerShell Tools Release Notes_v1.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.2/SolidFire PowerShell Tools Release Notes_v1.2.pdf -------------------------------------------------------------------------------- /Archive/v1.2/SolidFire PowerShell Tools User Guide_v1.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.2/SolidFire PowerShell Tools User Guide_v1.2.pdf -------------------------------------------------------------------------------- /Archive/v1.2/SolidFire_PowerShell_1_2_0_37-install.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.2/SolidFire_PowerShell_1_2_0_37-install.msi -------------------------------------------------------------------------------- /Archive/v1.2/SolidFire_PowerShell_1_2_0_37-install.msi.md5: -------------------------------------------------------------------------------- 1 | 8332b16ea57f945ea043198dad3083fe SolidFire_PowerShell_1_2_0_37-install.msi 2 | -------------------------------------------------------------------------------- /Archive/v1.3.1.4/NetApp_SolidFire_PowerShell_Tools_v1_3_1_4_Release_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.3.1.4/NetApp_SolidFire_PowerShell_Tools_v1_3_1_4_Release_Notes.pdf -------------------------------------------------------------------------------- /Archive/v1.3.1.4/NetApp_SolidFire_PowerShell_Tools_v1_3_1_4_User_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.3.1.4/NetApp_SolidFire_PowerShell_Tools_v1_3_1_4_User_Guide.pdf -------------------------------------------------------------------------------- /Archive/v1.3.1.4/SolidFire_PowerShell_1_3_1_4-install.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.3.1.4/SolidFire_PowerShell_1_3_1_4-install.msi -------------------------------------------------------------------------------- /Archive/v1.3.1.4/SolidFire_PowerShell_1_3_1_4-install.msi.md5: -------------------------------------------------------------------------------- 1 | f6711d29680db8f296b1c7af53364041 SolidFire_PowerShell_1_3_1_4-install.msi 2 | -------------------------------------------------------------------------------- /Archive/v1.3/NetApp_SolidFire_PowerShell_Tools_Release_Notes_v1.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.3/NetApp_SolidFire_PowerShell_Tools_Release_Notes_v1.3.pdf -------------------------------------------------------------------------------- /Archive/v1.3/NetApp_SolidFire_PowerShell_Tools_User_Guide_v1.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.3/NetApp_SolidFire_PowerShell_Tools_User_Guide_v1.3.pdf -------------------------------------------------------------------------------- /Archive/v1.3/SolidFire_PowerShell_1_3_0_124-install.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.3/SolidFire_PowerShell_1_3_0_124-install.msi -------------------------------------------------------------------------------- /Archive/v1.4/NetApp_SolidFire_PowerShell_Tools_v1.4_Release_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.4/NetApp_SolidFire_PowerShell_Tools_v1.4_Release_Notes.pdf -------------------------------------------------------------------------------- /Archive/v1.4/NetApp_SolidFire_PowerShell_Tools_v1.4_User_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.4/NetApp_SolidFire_PowerShell_Tools_v1.4_User_Guide.pdf -------------------------------------------------------------------------------- /Archive/v1.4/SolidFire_PowerShell_1_4_0_98-install.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.4/SolidFire_PowerShell_1_4_0_98-install.msi -------------------------------------------------------------------------------- /Archive/v1.4/SolidFire_PowerShell_1_4_0_98-install.msi.md5: -------------------------------------------------------------------------------- 1 | b48c716bae5ab1ce83c25c04795e6dcd SolidFire_PowerShell_1_4_0_98-install.msi 2 | -------------------------------------------------------------------------------- /Archive/v1.5.1/NetApp_SolidFire_PowerShell_Tools_v1.5.1_Release_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.5.1/NetApp_SolidFire_PowerShell_Tools_v1.5.1_Release_Notes.pdf -------------------------------------------------------------------------------- /Archive/v1.5.1/NetApp_SolidFire_PowerShell_Tools_v1.5.1_User_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.5.1/NetApp_SolidFire_PowerShell_Tools_v1.5.1_User_Guide.pdf -------------------------------------------------------------------------------- /Archive/v1.5/NetApp_SolidFire_PowerShell_Tools _v1.5_Release_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.5/NetApp_SolidFire_PowerShell_Tools _v1.5_Release_Notes.pdf -------------------------------------------------------------------------------- /Archive/v1.5/NetApp_SolidFire_PowerShell_Tools_v1.5_User_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.5/NetApp_SolidFire_PowerShell_Tools_v1.5_User_Guide.pdf -------------------------------------------------------------------------------- /Archive/v1.5/SolidFire_PowerShell_1_5_0_119-install.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.5/SolidFire_PowerShell_1_5_0_119-install.msi -------------------------------------------------------------------------------- /Archive/v1.6/ElementPowerShell_1.6_ReleaseNotes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.6/ElementPowerShell_1.6_ReleaseNotes.pdf -------------------------------------------------------------------------------- /Archive/v1.6/ElementPowerShell_1.6_UserGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.6/ElementPowerShell_1.6_UserGuide.pdf -------------------------------------------------------------------------------- /Archive/v1.7/NetApp_Element_PowerShell_Release_Notes_1.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.7/NetApp_Element_PowerShell_Release_Notes_1.7.pdf -------------------------------------------------------------------------------- /Archive/v1.7/NetApp_Element_PowerShell_User_Guide_1.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Archive/v1.7/NetApp_Element_PowerShell_User_Guide_1.7.pdf -------------------------------------------------------------------------------- /Getting Started/Getting Started 2015 - Section 1.1 - Introduction.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | This script is part of a series of scripts that were provided for instructional purposes. 3 | Examples in this document should not be considered complete in part or in whole and used for instructional purposes. 4 | 5 | ==================================================================== 6 | | Disclaimer: | 7 | | This script is written as best effort and provides no warranty | 8 | | expressed or implied. Please contact SolidFire support if you | 9 | | have questions about this script before running or modifying. | 10 | ==================================================================== 11 | 12 | #> 13 | 14 | # Using the break in case you accidentally run the entire file 15 | break 16 | 17 | <# 18 | ############################## 19 | Part 2.1.1 - Loading and Checking the Module 20 | ############################## 21 | #> 22 | 23 | # Checking if module is loaded. 24 | Get-Module 25 | Get-Module SolidFire 26 | 27 | 28 | # Remove Module and validate removal 29 | Remove-Module SolidFire 30 | Get-Module 31 | 32 | 33 | <# Import Module 34 | The SolidFire module will be placed in one of the default module directories during install. 35 | 36 | Directories can be located with $env:PSModulePath 37 | 38 | If you want to import the module on a different system you can use the following 39 | Import-Module "path\to\module\SolidFire.dll" 40 | #> 41 | Import-Module SolidFire 42 | Get-Module SolidFire 43 | 44 | # Identify Module installation path 45 | (Get-Module SolidFire).path 46 | 47 | 48 | <# 49 | ############################## 50 | Part 2.1.2 - Using Get-Help 51 | ############################## 52 | #> 53 | 54 | # Get-Help provides documentation for how each cmdlet works and can be used. 55 | 56 | # Check available cmdlets 57 | Get-Command -Module SolidFire 58 | (Get-Command -Module SolidFire).count 59 | 60 | # Get-SFCommand works only when loading the SolidFire Tools for PowerShell session via install. 61 | 62 | # There are more than 60 cmdlets in the initial beta release! More will be in 1.0 63 | 64 | # Finding the cmdlet you need 65 | Get-Command *volume* -Module SolidFire 66 | Get-Command -Module SolidFire -Verb Get -Noun *volume* 67 | 68 | # Accessing Help 69 | Get-Help Get-SFVolume 70 | Get-Help Get-SFVolume -Examples 71 | Get-Help Get-SFVolume -Full 72 | 73 | 74 | <# 75 | ############################## 76 | Part 2.1.2 - Connecting to SolidFire 77 | ############################## 78 | #> 79 | 80 | # Connect to SolidFire Node/Cluster 81 | 82 | 83 | # Lab Group 1 84 | Connect-SFCluster -Target 192.168.0.100 -UserName -Password 85 | 86 | # Connect-SFCluster also supports stored credentials. 87 | 88 | $sfcred = Get-Credential 89 | Connect-SFCluster -Target 192.168.0.100 -Credential $sfcred 90 | 91 | # Connect to a node 92 | Connect-SFCluster -Target 192.168.1.101 -Credential $sfcred -Node 93 | 94 | # Check the connection 95 | $SFConnection 96 | 97 | <# 98 | ??????????????????????????? 99 | What other ways can you initiate a connection to SolidFire cluster 100 | Hint: Use Get-Help 101 | ??????????????????????????? 102 | #> 103 | -------------------------------------------------------------------------------- /Getting Started/Getting Started 2015 - Section 1.2 - Creating SolidFire Objects.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | This script is part of a series of scripts that were provided for instructional purposes. 3 | Examples in this document should not be considered complete in part or in whole and used for instructional purposes. 4 | 5 | ==================================================================== 6 | | Disclaimer: | 7 | | This script is written as best effort and provides no warranty | 8 | | expressed or implied. Please contact SolidFire support if you | 9 | | have questions about this script before running or modifying. | 10 | ==================================================================== 11 | 12 | #> 13 | 14 | # Using the break in case you accidentally run the entire file 15 | break 16 | 17 | 18 | <# 19 | ############################## 20 | Part 2.2.1 - Create an Account 21 | ############################## 22 | #> 23 | 24 | 25 | New-SFAccount -UserName SELab01 26 | 27 | <# 28 | ############################## 29 | Part 2.2.2 - Create Volumes 30 | ############################## 31 | #> 32 | 33 | $account = Get-SFAccount SELab01 34 | 35 | # Create volume with default QoS 36 | New-SFVolume -Name SELab01-01 -AccountID $account.AccountID -Enable512e:$true -TotalSize 10 -GB 37 | 38 | # Create volume with custom QoS 39 | New-SFVolume -Name SELab01-02 -AccountID $account.AccountID -Enable512e:$true -TotalSize 10 -GB -MinIOPS 500 -MaxIOPS 1000 -BurstIOPS 2000 40 | 41 | $volumes = Get-SFVolume SELab01* 42 | 43 | 44 | <# 45 | ############################## 46 | Part 2.2.3 - Create a Volume Access Group 47 | ############################## 48 | #> 49 | 50 | # We will add volumes and initiators in the next section. 51 | New-SFVolumeAccessGroup -Name SELab01 52 | -------------------------------------------------------------------------------- /Getting Started/Getting Started 2015 - Section 1.3 - Modifying SolidFire Objects.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | This script is part of a series of scripts that were provided for instructional purposes. 3 | Examples in this document should not be considered complete in part or in whole and used for instructional purposes. 4 | 5 | ==================================================================== 6 | | Disclaimer: | 7 | | This script is written as best effort and provides no warranty | 8 | | expressed or implied. Please contact SolidFire support if you | 9 | | have questions about this script before running or modifying. | 10 | ==================================================================== 11 | 12 | #> 13 | 14 | # Using the break in case you accidentally run the entire file 15 | break 16 | 17 | 18 | <# 19 | ############################## 20 | Part 2.3.1.1 - Change CHAP Secrets for Account 21 | ############################## 22 | #> 23 | 24 | 25 | $accountID = (Get-SFAccount SELab01).AccountID 26 | # Change the CHAP Secrets 27 | # NOTE: You will be asked to confirm this action 28 | Set-SFAccount -AccountID $accountID -InitiatorSecret selab01initiator -TargetSecret selab01target 29 | 30 | # Note: You can disable confirmation by adding -Confirm:$false 31 | 32 | 33 | <# 34 | ############################## 35 | Part 2.3.2.1 - Change QoS on Multiple Volumes 36 | ############################## 37 | #> 38 | 39 | $account = Get-SFAccount SELab01 40 | $volumes = Get-SFVolume SELab01-0* 41 | $volumes | %{Set-SFVolume -VolumeID $_.VolumeID -MinIOPS 1500 -MaxIOPS 3000 -BurstIOPS 5000} 42 | 43 | 44 | $volumes = Get-SFVolume SELab01-0* 45 | # Why do we collect the information again? 46 | 47 | # Query results 48 | $volumes | Select VolumeName, @{N='MinIOPS';E={$_.QoS.MinIOPS}}, @{N='MaxIOPS';E={$_.QoS.MaxIOPS}}, @{N='BurstIOPS';E={$_.QoS.BurstIOPS}} 49 | 50 | # Look at ONLY the QoS values 51 | $volumes | Select -ExpandProperty QoS 52 | 53 | # Look at ONLY the QoS curve 54 | $volumes | select -ExpandProperty QoS | Select -ExpandProperty Curve 55 | 56 | 57 | <# 58 | ############################## 59 | Part 2.3.2.2 - Change Volume Capacity 60 | ############################## 61 | #> 62 | 63 | # Skip this subsection. This one is currently broken with a reported bug. 64 | 65 | #$volumes | Set-SFVolume -TotalSize 12 -GB 66 | 67 | #Get-SFVolume | Select VolumeName, VolumeID, TotalSize 68 | 69 | 70 | <# 71 | ############################## 72 | Part 2.3.3.1 - Add Initiators to Volume Access Group 73 | ############################## 74 | #> 75 | 76 | # We'll tackle this with live data in the next section 77 | $iqns = "iqn.1998-01.com.vmware.iscsi:name1","iqn.1998-01.com.vmware.iscsi:name2","iqn.1998-01.com.vmware.iscsi:name3" 78 | $vid = (Get-SFVolumeAccessGroup SELab01).VolumeAccessGroupID 79 | 80 | $iqns | Add-SFInitiatorToVolumeAccessGroup -VolumeAccessGroupID $vid 81 | 82 | 83 | <# 84 | ############################## 85 | Part 2.3.3.2 - Add Volumes to Volume Access Group 86 | ############################## 87 | #> 88 | 89 | $volumes | Add-SFVolumeToVolumeAccessGroup -VolumeAccessGroupID $vid 90 | 91 | <# 92 | ############################## 93 | Part 2.3.3.3 - Remove Initiators from Volume Access Group 94 | ############################## 95 | #> 96 | 97 | # We'll remove the fictitious list of host IQNs as clean up. 98 | $iqns = "iqn.1998-01.com.vmware.iscsi:name1","iqn.1998-01.com.vmware.iscsi:name2","iqn.1998-01.com.vmware.iscsi:name3" 99 | $vid = (Get-SFVolumeAccessGroup SELab01).VolumeAccessGroupID 100 | 101 | $iqns | Remove-SFInitiatorFromVolumeAccessGroup -VolumeAccessGroupID $vid 102 | 103 | 104 | <# 105 | ############################## 106 | Part 2.3.3.4 - Remove Volume from Volume Access Group 107 | ############################## 108 | #> 109 | 110 | # Let's remove the volumes to demonstrate the capability. 111 | $volumes | Remove-SFVolumeFromVolumeAccessGroup -VolumeAccessGroupID $vid 112 | 113 | Get-SFVolumeAccessGroup 114 | 115 | <# 116 | ############################## 117 | Part 2.3.3.5 - Put the volumes back 118 | 119 | See if you can remember how to put the volumes back in the 120 | volume access group...without peeking at previous example. 121 | 122 | 123 | ############################## 124 | #> 125 | 126 | 127 | -------------------------------------------------------------------------------- /Getting Started/Getting Started 2015 - Section 2 - Creating New Datastores.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | This script is part of a series of scripts that were provided for instructional purposes. 3 | Examples in this document should not be considered complete in part or in whole and used for instructional purposes. 4 | 5 | ==================================================================== 6 | | Disclaimer: | 7 | | This script is written as best effort and provides no warranty | 8 | | expressed or implied. Please contact SolidFire support if you | 9 | | have questions about this script before running or modifying. | 10 | ==================================================================== 11 | 12 | #> 13 | 14 | # Using the break in case you accidentally run the entire file 15 | break 16 | 17 | # Use PowerCLI for these steps. 18 | # Get User Credentials for vCenter Server 19 | $vcenter = "view-vcenter.vdi.sf.local" 20 | 21 | Break 22 | Connect-VIServer -Server $vcenter -User -Password 23 | 24 | <# 25 | ############################## 26 | Prepare Volume Access Group for dynamic Discovery 27 | ############################## 28 | #> 29 | 30 | # Get Volumes 31 | $volumes = Get-SFVolume 32 | 33 | # Get list of ESXi host software initiator IQNs 34 | # Note: you should make sure you only collect the ESXi hosts you want to add to the Volume Access Group 35 | $IQNs = Get-VMHost | Select name,@{n="IQN";e={$_.ExtensionData.Config.StorageDevice.HostBusAdapter.IscsiName}} 36 | 37 | 38 | # Add IQNs to Volume Access Group 39 | $vid = (Get-SFVolumeAccessGroup SELab01).VolumeAccessGroupID 40 | $IQNs | %{Add-SFInitiatorToVolumeAccessGroup -VolumeAccessGroupID $vid -Initiators $_.IQN} 41 | 42 | # Note: % is PowerShell for forEach 43 | 44 | <# 45 | ############################## 46 | Adding iSCSI targets 47 | ############################## 48 | #> 49 | 50 | # Check Target to hosts - Before 51 | Write-Host "Showing iSCSI targets" -ForegroundColor Yellow 52 | Get-VMHost | Get-VMhostHba -Type IScsi | Get-IScsiHbaTarget 53 | 54 | 55 | # Collects cluster's SVIP dynamically 56 | $SVIP = (Get-SFClusterInfo).Svip 57 | 58 | # Add the target 59 | Get-VMhost | Get-VMHostHba -Type IScsi | New-IScsiHbaTarget -Address $SVIP -Port 3260 60 | 61 | 62 | <# 63 | ############################## 64 | Part 2.4.3 - Create Datastores in VMware 65 | ############################## 66 | #> 67 | # Check Target to hosts 68 | Write-Host "Showing ISCSI targets post Add" -ForegroundColor Yellow 69 | Get-VMHost | Get-VMhostHba -Type IScsi | Get-IScsiHbaTarget 70 | 71 | # Rescan HBAs 72 | Get-VMhost | Get-VMhostStorage -RescanAllHba -RescanVMFs 73 | 74 | 75 | <# 76 | ############################## 77 | Part 2.4.4 - Create Datastores in VMware 78 | ############################## 79 | #> 80 | 81 | # Create Datastore with a loop that matches the datastore name to the volume name. 82 | $vmhost = Get-VMhost | Select -First 1 83 | foreach($volume in $volumes){ 84 | $canonicalname = "naa." + $volume.Scsi_NAA_DeviceID 85 | New-Datastore -VMhost $vmhost -Name $volume.VolumeName -Path $canonicalname -Vmfs -FileSystemVersion 5 86 | } 87 | 88 | # Rescan HBAs 89 | Get-VMhost | Get-VMhostStorage -RescanAllHba -RescanVMFs 90 | 91 | <# Review the available datastores. 92 | Click on the ESXi Host 93 | Identify the new datastores under Resources frame 94 | or 95 | Click on Configuration tab 96 | Select Storage 97 | #> -------------------------------------------------------------------------------- /Getting Started/Getting Started 2015 - Section 3 - Reporting.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | This script is part of a series of scripts that were provided for instructional purposes. 3 | Examples in this document should not be considered complete in part or in whole and used for instructional purposes. 4 | 5 | ==================================================================== 6 | | Disclaimer: | 7 | | This script is written as best effort and provides no warranty | 8 | | expressed or implied. Please contact SolidFire support if you | 9 | | have questions about this script before running or modifying. | 10 | ==================================================================== 11 | 12 | #> 13 | 14 | # Using the break in case you accidentally run the entire file 15 | break 16 | 17 | 18 | <# 19 | ############################## 20 | Part 3.1.1 - List Accounts 21 | ############################## 22 | #> 23 | 24 | # Return a single SolidFire account. 25 | Get-SFAccount | Select -First 1 26 | 27 | # Return all SolidFire accounts and only display three properties. 28 | Get-SFAccount | Select UserName, TargetSecret, InitiatorSecret 29 | 30 | <# 31 | ############################## 32 | Part 3.1.2 - List Volumes 33 | ############################## 34 | #> 35 | 36 | Get-SFVolume | Select -First 1 37 | Get-SFVolume | Select VolumeID, Name, IQN, ScsiNAADeviceID, ScsiEUIDeviceID 38 | 39 | 40 | <# 41 | ############################## 42 | Part 3.1.3 - List Volume Access Groups 43 | ############################## 44 | #> 45 | 46 | # Returns all Volume Access Groups 47 | Get-SFVolumeAccessGroup 48 | 49 | # Returns name of all volumes that are part of a Volume Access Group 50 | Get-SFVolumeAccessGroup | select -ExpandProperty Volumes | Get-SFVolume | Select Name 51 | 52 | <# 53 | ############################## 54 | Part 3.2 - Identify IQNs 55 | ############################## 56 | #> 57 | 58 | # Volume IQNs 59 | Get-SFVolume | Select VolumeID, VolumeName, VolumeIQN, Scsi_NAA_DeviceID, Scsi_EUI_DeviceID 60 | 61 | # ESXi Hosts 62 | Get-VMHost | Select name,@{n="IQN";e={$_.ExtensionData.Config.StorageDevice.HostBusAdapter.IscsiName}} 63 | 64 | 65 | 66 | <# 67 | ############################## 68 | Part 3.3 - More Content - ESXi Host to VAG mapping 69 | ############################## 70 | #> 71 | 72 | # Take your browser to: 73 | # https://github.com/solidfire/PowerShell/tree/master/VMware 74 | 75 | 76 | 77 | <# 78 | ############################## 79 | Part 4 - More Content - Interesting commands not directly related to VMware 80 | ############################## 81 | #> 82 | # Cluster configuration, capacity 83 | Get-SFConfig 84 | Get-SFClusterCapacity 85 | # Volume efficiency, stats (latency, unaligned I/O) 86 | Get-SFVolumeEfficiency 87 | Get-SFVolumeStats | select VolumeID, AccountID, LatencyUSec | Sort-Object -descending -property LatencyUSec | Select-Object -first 5 88 | Get-SFVolumeStats | Select WriteLatencyUSec | Measure-Object -Average -Max -property WriteLatencyUSec 89 | Get-SFVolumeStats | where-Object {$_.UnalignedWrites -gt 100} | select-Object AccountID, VolumeID, UnalignedReads, UnalignedWrites | Sort-Object -descending -property UnalignedWrites, UnalignedReads 90 | -------------------------------------------------------------------------------- /Getting Started/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This directory contains several script files to provide a quick walkthrough of the SolidFire Tools for PowerShell module. 2 | You should be able to complete the entire series in less than an hour. 3 | 4 | Requirements 5 | Section 1 - SolidFire system to make calls against with access to add/remove objects like volumes and accounts. 6 | Section 2 - SolidFire system to make calls against with access to query information. 7 | Section 3 - SolidFire system to make calls against with access to add/remove objects like volumes and accounts. 8 | vSphere environment with a minimum of one ESXi host and vCenter server with administrator privileges on the ESXi host. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 SolidFire 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Microsoft/1-basic-network(local)-v1.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | Basic initial network configuration. Expects to be run from a host locally 3 | 4 | The CSV file is structured as follows 5 | 6 | hostname,ipmgmt,ipiscsi1,ipiscsi2,ipfailover,svip 7 | hyperv-01,172.27.40.9,172.27.41.9,172.27.41.19,172.27.50.9,172.27.41.220 8 | #> 9 | 10 | #pull in csv with network config 11 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 12 | $csv = Import-Csv -path $csvfile 13 | $temphost = hostname 14 | $thishost = $csv | where{$_.hostname -eq $temphost} 15 | 16 | New-NetLbfoTeam -Name 1G-Mgmt -TeamMembers NIC3,NIC4 -confirm:$false 17 | New-NetLbfoTeam -Name 10G-Net -TeamMembers NIC1,NIC2 -confirm:$false 18 | 19 | #Create new VMSwitch for Management Traffic 20 | New-VMSwitch -Name "Management" -NetAdapterName "1G-Mgmt" 21 | start-sleep -s 2 22 | 23 | #Set up management network 24 | New-NetIPAddress -InterfaceAlias "vEthernet (Management)" -IPAddress $thishost.ipmgmt -PrefixLength 24 -DefaultGateway 172.27.40.254 25 | Set-DnsClientServerAddress -InterfaceAlias "vEthernet (Management)" -ServerAddresses 172.27.100.13,172.27.100.14 26 | 27 | #Create VMSwitch for iSCSI and VM traffic 28 | New-VMSwitch -Name "XD-Logical-Switch" -NetAdapterName "10G-Net" -AllowManagementOS $false 29 | 30 | #Add iSCSI VMNetworkAdapters and set VLAN 31 | Add-VMNetworkAdapter -ManagementOS -Name "iSCSI1" -SwitchName "XD-Logical-Switch" 32 | Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "iSCSI1" -Access -VlanId 2001 33 | Add-VMNetworkAdapter -ManagementOS -Name "iSCSI2" -SwitchName "XD-Logical-Switch" 34 | Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "iSCSI2" -Access -VlanId 2001 35 | 36 | New-NetIPAddress -InterfaceAlias "vEthernet (iSCSI1)" -IPAddress $thishost.ipiscsi1 -PrefixLength 24 37 | New-NetIPAddress -InterfaceAlias "vEthernet (iSCSI2)" -IPAddress $thishost.ipiscsi2 -PrefixLength 24 38 | 39 | #Add Hyper-V Failover Network 40 | Add-VMNetworkAdapter -ManagementOS -Name "Failover" -SwitchName "XD-Logical-Switch" 41 | Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Failover" -Access -VlanId 2002 42 | New-NetIPAddress -InterfaceAlias "vEthernet (Failover)" -IPAddress $thishost.ipfailover -PrefixLength 24 43 | 44 | #Enable Jumbo Frames on 10g adapters 45 | #Have separate matches for vEth vs Eth due to slightly different property names 46 | $10gvNICs = Get-Netadapter | where Name -Match iSCSI 47 | $10gNICs = Get-NetAdapter | where InterfaceDescription -Match 10G 48 | Set-NetAdapterAdvancedProperty $10gNICs.Name -DisplayName "Jumbo Packet" -DisplayValue "9014 Bytes" 49 | Set-NetAdapterAdvancedProperty $10gNICs.Name -DisplayName "Large Send Offload V2 (IPV4)" -DisplayValue "Disabled" 50 | Set-NetAdapterAdvancedProperty $10gNICs.Name -DisplayName "Large Send Offload V2 (IPV6)" -DisplayValue "Disabled" 51 | Set-NetAdapterAdvancedProperty $10gvNICs.Name -DisplayName "Jumbo Packet" -DisplayValue "9014 Bytes" 52 | Set-NetAdapterAdvancedProperty $10gvNICs.Name -DisplayName "Large Send Offload Version 2 (IPV4)" -DisplayValue "Disabled" 53 | Set-NetAdapterAdvancedProperty $10gvNICs.Name -DisplayName "Large Send Offload Version 2 (IPV6)" -DisplayValue "Disabled" 54 | -------------------------------------------------------------------------------- /Microsoft/2-Install-Feature(multiple).ps1: -------------------------------------------------------------------------------- 1 | #Installs feature(s) on multiple hosts 2 | #pull in csv with server IP information 3 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 4 | $csv = Import-Csv -path $csvfile 5 | 6 | #Get credentials for Invoke-Command 7 | $creds = Get-Credential 8 | 9 | #Populate the servers and sort the array by the FQDN of the VMM hosts 10 | $servers = ($csv).hostname 11 | 12 | #List of features to install. If more than one, use comma separated list 13 | #Example for single feature $featurename = "GPMC" 14 | #Example for multiple features $featurename = "GPMC","Multipath-IO" 15 | $featurename = "GPMC","Failover-Clustering" 16 | 17 | #Iterate through all the servers in the $servers variable 18 | foreach ($server in $servers) { 19 | 20 | #For each feature, check if the feature is installed or not 21 | foreach ($feature in $featurename) { 22 | write-host "Checking for $feature on server $server" 23 | $check = Get-WindowsFeature -Name $feature -ComputerName $server 24 | 25 | if ($check.Installed -ne "True") { 26 | #Install the feature if not installed as well as management tools 27 | Write-Host "Windows feature $feature not installed on server $server. Installing $feature ..." -ForegroundColor Green 28 | Add-WindowsFeature $feature -ComputerName $server -IncludeManagementTools | Out-Null 29 | } 30 | else { 31 | Write-Host "Feature $feature is already installed on host $server" -ForegroundColor Gray 32 | } 33 | } 34 | } 35 | 36 | Write-Host "Script Complete. Please reboot all hosts before continuing configuration" -------------------------------------------------------------------------------- /Microsoft/3-iSCSIConfiguration-v2.ps1: -------------------------------------------------------------------------------- 1 | #Configures the iSCSI initiator on SCVMM managed hosts 2 | 3 | #pull in csv with server IP information 4 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 5 | $csv = Import-Csv -path $csvfile 6 | 7 | #Get credentials for Invoke-Command 8 | $creds = Get-Credential 9 | 10 | #Populate the servers and sort the array by the FQDN of the VMM hosts 11 | $servers = ($csv).hostname 12 | 13 | #Iterate through all the servers in the $servers variable 14 | foreach ($server in $servers) { 15 | 16 | Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 17 | 18 | #Import IscsiTarget module if not loaded 19 | if (Get-Module -ListAvailable -Name IscsiTarget) { 20 | Write-Host "IscsiTarget module loaded... Continuting" 21 | } else { 22 | Write-Host "IscsiTarget module not loaded. Loading..." 23 | Import-Module IscsiTarget 24 | } 25 | 26 | #Set name variables for Invoke-Command 27 | $temphost = hostname 28 | $thishost = $using:csv | where{$_.hostname -eq $temphost} 29 | 30 | #Message what server we are working on 31 | Write-Host "########################################" -ForegroundColor Green 32 | Write-Host "Beginning configuration of $using:server`r`n" -ForegroundColor Green 33 | 34 | #Get status of iSCSI service 35 | $iSCSIService = get-service msiscsi 36 | 37 | #Test to see if the msiscsi service is already running, if not, start it 38 | Write-Host "Checking status of iSCSI service" 39 | if ($iSCSIService.Status -eq "Stopped") { 40 | Write-Host "MSISCSI service not running. Starting service and setting startup type to 'automatic'" -ForegroundColor DarkGray 41 | $iSCSIService.Start() 42 | Start-Sleep -seconds 5 43 | Set-Service –Name MSiSCSI –StartupType Automatic 44 | } 45 | else { 46 | Write-Host "iSCSI service already running on host" $temphost -ForegroundColor DarkGray 47 | } 48 | 49 | #Enable iSCSI through the firewall 50 | $iscsiFw = Get-NetFirewallRule -DisplayGroup "iscsi Service" 51 | $iscsiFwIn = $iscsifw | Where-Object {$_.Name -eq "MsiScsi-In-TCP"} 52 | $iscsiFwOut = $iscsifw | Where-Object {$_.Name -eq "MsiScsi-Out-TCP"} 53 | 54 | #Check and enable inbound iSCSI traffic 55 | if ($iscsiFwIn.Enabled -eq "True") { 56 | Write-Host "MSiSCSI inbound connections already enabled" -ForegroundColor DarkGray 57 | } 58 | else { 59 | write-host "Updating firewall rules to allow inbound iSCSI traffic on host" $temphost -ForegroundColor DarkGray 60 | Set-NetFirewallRule -Name MsiScsi-In-TCP -Enabled True 61 | } 62 | 63 | #Check and enable inbound iSCSI traffic 64 | if ($iscsiFwOut.Enabled -eq "True") { 65 | Write-Host "MSiSCSI outbound connections already enabled" -ForegroundColor DarkGray 66 | } 67 | else { 68 | write-host "Updating firewall rules to allow outbound iSCSI traffic on host" $temphost -ForegroundColor DarkGray 69 | Set-NetFirewallRule -Name MsiScsi-Out-TCP -Enabled True 70 | } 71 | 72 | #Check to see if iSCSI Target Portal has already been configured 73 | #If so, skip, if not, configure it 74 | $isIscsiConfigured = (Get-IscsiTargetPortal).TargetPortalAddress 75 | if ($isIscsiConfigured) { 76 | Write-Host "iSCSI Target Portal" (Get-IscsiTargetPortal).TargetPortalAddress "has already been configured" -ForegroundColor DarkGray 77 | } 78 | else { 79 | Write-Host "Configuring the iSCSI Target Portal on host" $temphost -ForegroundColor DarkGray 80 | New-IscsiTargetPortal –TargetPortalAddress $thishost.svip 81 | 82 | <# 83 | Connect to each target with both vEth iSCSI interfaces 84 | Sleep command necessary for avoiding aborted connections that can happen 85 | when many concurrent connections are attempted 86 | #> 87 | Write-Host "Connecting to targets" -ForegroundColor DarkGray 88 | #$targets = Get-IscsiTarget 89 | $targets = Get-IscsiTarget | Where-Object {$_.IsConnected -ne "True"} 90 | foreach ($target in $targets) { 91 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi1 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 92 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi2 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 93 | Start-Sleep -s 1 94 | } 95 | 96 | #Set up MPIO to automatically claim devices 97 | # Enable the MPIO Feature, if not already done 98 | Write-Host "Enabling MPIO on server " $using:server -ForegroundColor DarkGray 99 |    Enable-WindowsOptionalFeature -Online -FeatureName MultipathIO 100 | 101 | # Enable automatic claiming of iSCSI devices for MPIO  102 | Write-Host "Enabling automatic claiming of MPIO devices for iSCSI" -ForegroundColor DarkGray 103 |    Enable-MSDSMAutomaticClaim -BusType iSCSI | Out-Null 104 | 105 | # Set the default load balance policy of all newly claimed devices to Round Robin  106 | # Might have to reboot to get it to work if you just enabled MPIO feature and didn't reboot 107 | #The "Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR" command will actually fail if the server 108 | #has not been rebooted after enabling MPIO 109 | Write-Host "Setting default load balancing policy to Round Robin" -ForegroundColor DarkGray 110 |       Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR 111 | } #End $isIscsiConfigured if/else 112 | 113 | Write-Host "Finsihed configuration of $using:server" -ForegroundColor Green 114 | Write-Host "#######################################`r`n" -ForegroundColor Green 115 | } #End Invoke-Command 116 | } #End foreach ($server in $servers) loop 117 | 118 | 119 | #Optional - Push server IQNs into Volume Access Group 120 | #This assumes the SolidFire PSM is installed on the host running this script 121 | 122 | 123 | -------------------------------------------------------------------------------- /Microsoft/4-CreateSFVolumes.ps1: -------------------------------------------------------------------------------- 1 | #Create SolidFire volumes 2 | 3 | #Collect credentials for connecting to SolidFire 4 | $creds = Get-Credential 5 | 6 | #Connect to SolidFire Cluster 7 | Connect-SFCluster 172.27.1.193 -credential $creds 8 | 9 | #Get the account for the volumes to create 10 | $acct = Get-SFAccount -AccountID 1 11 | 12 | #Create 20 1TiB Volumes with QoS of 2500/25000/25000 (Min/Max/Burst) IOPS 13 | $vols = 1..20 14 | $vols = $vols | ForEach-Object {$_.ToString("00")} 15 | 16 | $vols | %{New-SFVolume -AccountID 1 -Name "pvs-desktop$_" -TotalSize 1000 -GiB -Enable512e:$false -miniops 2500 -maxiops 25000 -burstiops 25000; start-sleep -s 5} 17 | 18 | #Add volumes to volume access group 19 | $acct | Get-SFVolume | Add-SFVolumeToVolumeAccessGroup -VolumeAccessGroupID 1 20 | -------------------------------------------------------------------------------- /Microsoft/5-AddNewIscsiTargets.ps1: -------------------------------------------------------------------------------- 1 | #Configures the iSCSI initiator on SCVMM managed hosts 2 | 3 | #pull in csv with server IP information 4 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 5 | $csv = Import-Csv -path $csvfile 6 | 7 | #Get credentials for Invoke-Command 8 | $creds = Get-Credential 9 | 10 | #Populate the servers 11 | $servers = ($csv).hostname 12 | 13 | #Iterate through all the servers in the $servers variable 14 | foreach ($server in $servers) { 15 | 16 | Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 17 | 18 | #Import IscsiTarget module if not loaded 19 | if (Get-Module -ListAvailable -Name IscsiTarget) { 20 | Write-Host "IscsiTarget module loaded... Continuting" 21 | } else { 22 | Write-Host "IscsiTarget module not loaded. Loading..." 23 | Import-Module IscsiTarget 24 | } #End if 25 | 26 | #Set name variables for Invoke-Command 27 | $temphost = hostname 28 | $thishost = $using:csv | where{$_.hostname -eq $temphost} 29 | 30 | #Message what server we are working on 31 | Write-Host "########################################" -ForegroundColor Green 32 | Write-Host "Beginning configuration of $using:server`r`n" -ForegroundColor Green 33 | 34 | Write-Host "Updating iSCSI Targets..." 35 | Update-IscsiTargetPortal -TargetPortalAddress $thishost.svip 36 | 37 | Write-Host "Connecting any new inactive iSCSI targets on" $temphost -ForegroundColor DarkGray 38 | $targets = Get-IscsiTarget | Where-Object {$_.IsConnected -ne "True"} 39 | foreach ($target in $targets) { 40 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi1 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 41 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi2 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 42 | Start-Sleep -s 1 43 | } #End foreach ($target in $targets) loop 44 | } #End Invoke-Command 45 | }#End foreach ($server in $servers) loop -------------------------------------------------------------------------------- /Microsoft/6-AddClusterStorage.ps1: -------------------------------------------------------------------------------- 1 | #get credentials for the Invoke-Command section 2 | $creds = get-credential 3 | 4 | <# 5 | Add storage to Failover Cluster, assumes all nodes joined to cluster with no shared storage. 6 | Script has to be run on an existing cluster node, otherwise CredSSP 7 | will need to be configured which can be considered a security risk 8 | #> 9 | $cluster = Get-Cluster 10 | 11 | <#Server used should currently own storage being configured 12 | This server should have the FCM role and management tools installed 13 | as well as having access to the iSCSI volumes to be imported into FCM 14 | Assumes iSCSI volumes are connected 15 | #> 16 | $server = "Hyperv-09" 17 | 18 | #Add CSVs to cluster 19 | #Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 20 | 21 | #Format storage and add to Failover Cluster Manager as CSVs 22 | #Get the target name and legacy disk name for the volumes 23 | #This requires that iSCSI targets are already presented and connected 24 | $iscsidevices = (get-wmiobject -namespace ROOT\WMI -class MSiSCSIInitiator_SessionClass).devices | select TargetName,LegacyName -Unique | where {$_.targetname -match "pvs-desktop"} 25 | 26 | #Sort the devices by legacy name 27 | $iscsidevices = $iscsidevices | Sort-Object -Property @{Expression={[int][RegEx]::Match($_.LegacyName, "(?:[a-zA-Z-\.]+)(?\d+)").Groups["number"].Value}} 28 | 29 | #Break out volume names and legacy disk numbers for use in Initialize-Disk 30 | $iscsivolumenames = $iscsidevices.Targetname | ForEach-Object {$_.split('.')[4]} 31 | $LegacyDiskNumber = $iscsidevices.LegacyName | ForEach-Object {$_.split('e')[1]} 32 | 33 | #Format driveswith GPT partition type 34 | #Uses SolidFire volume name for file system label 35 | for ($i = 0; $i -lt $iscsidevices.count; $i++) { 36 | write-host "Formating Disk number" $LegacyDiskNumber[$i] "as" $iscsivolumenames[$i] -ForegroundColor DarkGreen 37 | #Initialize-Disk -Number $LegacyDiskNumber[$i] -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel $iscsivolumenames[$i] -Confirm:$false -ErrorAction SilentlyContinue 38 | Initialize-Disk -Number $LegacyDiskNumber[$i] -PartitionStyle GPT 39 | #Assign temp free drive letter to ease formating logic 40 | New-Partition -DiskNumber $LegacyDiskNumber[$i] -UseMaximumSize -AssignDriveLetter 41 | $tempdriveletter = Get-Partition -DiskNumber $LegacyDiskNumber[$i] | select DriveLetter 42 | Format-Volume -FileSystem NTFS -NewFileSystemLabel $iscsivolumenames[$i] -Confirm:$false -ErrorAction SilentlyContinue 43 | 44 | Start-Sleep -Seconds 2 45 | } #End for loop 46 | 47 | #Add storage to Cluster Failover Manager as available storage 48 | <#If not all available storage is to be added to FCM this 49 | then the "Get-ClusterAvailableDisk | Add-ClusterDisk" command 50 | could be run inside the preceeding for loop to add disks 51 | as they are available after formating. This would limit the 52 | storage added to the cluster to just those volumes that get 53 | matched in the $iscsidevices variable 54 | #> 55 | Get-ClusterAvailableDisk | Add-ClusterDisk 56 | 57 | #Get list of cluster disk resources to add to CSV 58 | $ClusterDisks = Get-ClusterResource | where {$_.OwnerGroup -match "Available Storage"} 59 | Add-ClusterSharedVolume -Name $clusterdisks.Name 60 | 61 | #Rename Cluster Disks in FCM to match volume name 62 | $ClusterDisks = Get-CimInstance -ClassName MSCluster_Resource -Namespace root/mscluster -Filter "type = 'Physical Disk'" 63 | 64 | foreach ($Disk in $ClusterDisks) { 65 | $DiskResource = Get-CimAssociatedInstance -InputObject $Disk -ResultClass MSCluster_DiskPartition 66 | if (-not ($DiskResource.VolumeLabel -eq $Disk.Name)) { 67 | Write-host "Renaming CSV" $disk.Name "to" $DiskResource.VolumeLabel -ForegroundColor DarkGreen 68 | Invoke-CimMethod -InputObject $Disk -MethodName Rename -Arguments @{newName = $DiskResource.VolumeLabel} 69 | } #End If 70 | } #End Foreach 71 | 72 | #Aaannnd for extra credit, rename shortcuts for CSVs to match volume names 73 | #To Do - Figure out how to programatically rename Junctions to their target 74 | 75 | Write-Host "Finished Adding CSV" -ForegroundColor DarkGreen 76 | #} #End Invoke-Command for adding CSVs 77 | 78 | ######################################################################## 79 | #Now validate that all the servers have the expected storage allocated # 80 | ######################################################################## 81 | 82 | #pull in csv with server IP information 83 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 84 | $csv = Import-Csv -path $csvfile 85 | 86 | #Populate the servers variable 87 | $servers = ($csv).hostname 88 | 89 | foreach ($server in $servers) { 90 | 91 | Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 92 | $ClusterDisks = Get-CimInstance -ClassName MSCluster_Resource -Namespace root/mscluster -Filter "type = 'Physical Disk'" | sort 93 | $outstring = $ClusterDisks.Name -join "`n" 94 | $serverhost = $env:COMPUTERNAME 95 | Write-host "Checking cluster storage on" $serverhost 96 | write-host "There are" $ClusterDisks.Count "cluster disks on this server" 97 | Write-host "The cluster disks are:`n" 98 | write-host $outstring -ForegroundColor DarkGreen 99 | } 100 | } 101 | 102 | #Finally, set the CSV cache size to 512MB 103 | #In Windows 2012 R2 CSV cache is enabled by default but set to 0MB 104 | #More information here: http://blogs.msdn.com/b/clustering/archive/2013/07/19/10286676.aspx 105 | 106 | Write-Host "Setting CSV Block Cache Size to 512MB" 107 | (Get-Cluster).BlockCacheSize = 512 108 | 109 | #We are done 110 | Write-Host "Script Complete" -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Microsoft/HyperV-2012R2/.DS_Store -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/1-basic-network(local)-v1.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | Basic initial network configuration. Expects to be run from a host locally 3 | 4 | The CSV file is structured as follows 5 | 6 | hostname,ipmgmt,ipiscsi1,ipiscsi2,ipfailover,svip 7 | hyperv-01,172.27.40.9,172.27.41.9,172.27.41.19,172.27.50.9,172.27.41.220 8 | #> 9 | 10 | #pull in csv with network config 11 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 12 | $csv = Import-Csv -path $csvfile 13 | $temphost = hostname 14 | $thishost = $csv | where{$_.hostname -eq $temphost} 15 | 16 | New-NetLbfoTeam -Name 1G-Mgmt -TeamMembers NIC3,NIC4 -confirm:$false 17 | New-NetLbfoTeam -Name 10G-Net -TeamMembers NIC1,NIC2 -confirm:$false 18 | 19 | #Create new VMSwitch for Management Traffic 20 | New-VMSwitch -Name "Management" -NetAdapterName "1G-Mgmt" 21 | start-sleep -s 2 22 | 23 | #Set up management network 24 | New-NetIPAddress -InterfaceAlias "vEthernet (Management)" -IPAddress $thishost.ipmgmt -PrefixLength 24 -DefaultGateway 172.27.40.254 25 | Set-DnsClientServerAddress -InterfaceAlias "vEthernet (Management)" -ServerAddresses 172.27.100.13,172.27.100.14 26 | 27 | #Create VMSwitch for iSCSI and VM traffic 28 | New-VMSwitch -Name "XD-Logical-Switch" -NetAdapterName "10G-Net" -AllowManagementOS $false 29 | 30 | #Add iSCSI VMNetworkAdapters and set VLAN 31 | Add-VMNetworkAdapter -ManagementOS -Name "iSCSI1" -SwitchName "XD-Logical-Switch" 32 | Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "iSCSI1" -Access -VlanId 2001 33 | Add-VMNetworkAdapter -ManagementOS -Name "iSCSI2" -SwitchName "XD-Logical-Switch" 34 | Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "iSCSI2" -Access -VlanId 2001 35 | 36 | New-NetIPAddress -InterfaceAlias "vEthernet (iSCSI1)" -IPAddress $thishost.ipiscsi1 -PrefixLength 24 37 | New-NetIPAddress -InterfaceAlias "vEthernet (iSCSI2)" -IPAddress $thishost.ipiscsi2 -PrefixLength 24 38 | 39 | #Add Hyper-V Failover Network 40 | Add-VMNetworkAdapter -ManagementOS -Name "Failover" -SwitchName "XD-Logical-Switch" 41 | Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Failover" -Access -VlanId 2002 42 | New-NetIPAddress -InterfaceAlias "vEthernet (Failover)" -IPAddress $thishost.ipfailover -PrefixLength 24 43 | 44 | #Enable Jumbo Frames on 10g adapters 45 | #Have separate matches for vEth vs Eth due to slightly different property names 46 | $10gvNICs = Get-Netadapter | where Name -Match iSCSI 47 | $10gNICs = Get-NetAdapter | where InterfaceDescription -Match 10G 48 | Set-NetAdapterAdvancedProperty $10gNICs.Name -DisplayName "Jumbo Packet" -DisplayValue "9014 Bytes" 49 | Set-NetAdapterAdvancedProperty $10gNICs.Name -DisplayName "Large Send Offload V2 (IPV4)" -DisplayValue "Disabled" 50 | Set-NetAdapterAdvancedProperty $10gNICs.Name -DisplayName "Large Send Offload V2 (IPV6)" -DisplayValue "Disabled" 51 | Set-NetAdapterAdvancedProperty $10gvNICs.Name -DisplayName "Jumbo Packet" -DisplayValue "9014 Bytes" 52 | Set-NetAdapterAdvancedProperty $10gvNICs.Name -DisplayName "Large Send Offload Version 2 (IPV4)" -DisplayValue "Disabled" 53 | Set-NetAdapterAdvancedProperty $10gvNICs.Name -DisplayName "Large Send Offload Version 2 (IPV6)" -DisplayValue "Disabled" 54 | -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/2-Install-Feature(multiple).ps1: -------------------------------------------------------------------------------- 1 | #Installs feature(s) on multiple hosts 2 | #pull in csv with server IP information 3 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 4 | $csv = Import-Csv -path $csvfile 5 | 6 | #Get credentials for Invoke-Command 7 | $creds = Get-Credential 8 | 9 | #Populate the servers and sort the array by the FQDN of the VMM hosts 10 | $servers = ($csv).hostname 11 | 12 | #List of features to install. If more than one, use comma separated list 13 | #Example for single feature $featurename = "GPMC" 14 | #Example for multiple features $featurename = "GPMC","Multipath-IO" 15 | $featurename = "GPMC","Failover-Clustering" 16 | 17 | #Iterate through all the servers in the $servers variable 18 | foreach ($server in $servers) { 19 | 20 | #For each feature, check if the feature is installed or not 21 | foreach ($feature in $featurename) { 22 | write-host "Checking for $feature on server $server" 23 | $check = Get-WindowsFeature -Name $feature -ComputerName $server 24 | 25 | if ($check.Installed -ne "True") { 26 | #Install the feature if not installed as well as management tools 27 | Write-Host "Windows feature $feature not installed on server $server. Installing $feature ..." -ForegroundColor Green 28 | Add-WindowsFeature $feature -ComputerName $server -IncludeManagementTools | Out-Null 29 | } 30 | else { 31 | Write-Host "Feature $feature is already installed on host $server" -ForegroundColor Gray 32 | } 33 | } 34 | } 35 | 36 | Write-Host "Script Complete. Please reboot all hosts before continuing configuration" -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/3-iSCSIConfiguration-v2.ps1: -------------------------------------------------------------------------------- 1 | #Configures the iSCSI initiator on SCVMM managed hosts 2 | 3 | #pull in csv with server IP information 4 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 5 | $csv = Import-Csv -path $csvfile 6 | 7 | #Get credentials for Invoke-Command 8 | $creds = Get-Credential 9 | 10 | #Populate the servers and sort the array by the FQDN of the VMM hosts 11 | $servers = ($csv).hostname 12 | 13 | #Iterate through all the servers in the $servers variable 14 | foreach ($server in $servers) { 15 | 16 | Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 17 | 18 | #Import IscsiTarget module if not loaded 19 | if (Get-Module -ListAvailable -Name IscsiTarget) { 20 | Write-Host "IscsiTarget module loaded... Continuting" 21 | } else { 22 | Write-Host "IscsiTarget module not loaded. Loading..." 23 | Import-Module IscsiTarget 24 | } 25 | 26 | #Set name variables for Invoke-Command 27 | $temphost = hostname 28 | $thishost = $using:csv | where{$_.hostname -eq $temphost} 29 | 30 | #Message what server we are working on 31 | Write-Host "########################################" -ForegroundColor Green 32 | Write-Host "Beginning configuration of $using:server`r`n" -ForegroundColor Green 33 | 34 | #Get status of iSCSI service 35 | $iSCSIService = get-service msiscsi 36 | 37 | #Test to see if the msiscsi service is already running, if not, start it 38 | Write-Host "Checking status of iSCSI service" 39 | if ($iSCSIService.Status -eq "Stopped") { 40 | Write-Host "MSISCSI service not running. Starting service and setting startup type to 'automatic'" -ForegroundColor DarkGray 41 | $iSCSIService.Start() 42 | Start-Sleep -seconds 5 43 | Set-Service –Name MSiSCSI –StartupType Automatic 44 | } 45 | else { 46 | Write-Host "iSCSI service already running on host" $temphost -ForegroundColor DarkGray 47 | } 48 | 49 | #Enable iSCSI through the firewall 50 | $iscsiFw = Get-NetFirewallRule -DisplayGroup "iscsi Service" 51 | $iscsiFwIn = $iscsifw | Where-Object {$_.Name -eq "MsiScsi-In-TCP"} 52 | $iscsiFwOut = $iscsifw | Where-Object {$_.Name -eq "MsiScsi-Out-TCP"} 53 | 54 | #Check and enable inbound iSCSI traffic 55 | if ($iscsiFwIn.Enabled -eq "True") { 56 | Write-Host "MSiSCSI inbound connections already enabled" -ForegroundColor DarkGray 57 | } 58 | else { 59 | write-host "Updating firewall rules to allow inbound iSCSI traffic on host" $temphost -ForegroundColor DarkGray 60 | Set-NetFirewallRule -Name MsiScsi-In-TCP -Enabled True 61 | } 62 | 63 | #Check and enable inbound iSCSI traffic 64 | if ($iscsiFwOut.Enabled -eq "True") { 65 | Write-Host "MSiSCSI outbound connections already enabled" -ForegroundColor DarkGray 66 | } 67 | else { 68 | write-host "Updating firewall rules to allow outbound iSCSI traffic on host" $temphost -ForegroundColor DarkGray 69 | Set-NetFirewallRule -Name MsiScsi-Out-TCP -Enabled True 70 | } 71 | 72 | #Check to see if iSCSI Target Portal has already been configured 73 | #If so, skip, if not, configure it 74 | $isIscsiConfigured = (Get-IscsiTargetPortal).TargetPortalAddress 75 | if ($isIscsiConfigured) { 76 | Write-Host "iSCSI Target Portal" (Get-IscsiTargetPortal).TargetPortalAddress "has already been configured" -ForegroundColor DarkGray 77 | } 78 | else { 79 | Write-Host "Configuring the iSCSI Target Portal on host" $temphost -ForegroundColor DarkGray 80 | New-IscsiTargetPortal –TargetPortalAddress $thishost.svip 81 | 82 | <# 83 | Connect to each target with both vEth iSCSI interfaces 84 | Sleep command necessary for avoiding aborted connections that can happen 85 | when many concurrent connections are attempted 86 | #> 87 | Write-Host "Connecting to targets" -ForegroundColor DarkGray 88 | #$targets = Get-IscsiTarget 89 | $targets = Get-IscsiTarget | Where-Object {$_.IsConnected -ne "True"} 90 | foreach ($target in $targets) { 91 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi1 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 92 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi2 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 93 | Start-Sleep -s 1 94 | } 95 | 96 | #Set up MPIO to automatically claim devices 97 | # Enable the MPIO Feature, if not already done 98 | Write-Host "Enabling MPIO on server " $using:server -ForegroundColor DarkGray 99 |    Enable-WindowsOptionalFeature -Online -FeatureName MultipathIO 100 | 101 | # Enable automatic claiming of iSCSI devices for MPIO  102 | Write-Host "Enabling automatic claiming of MPIO devices for iSCSI" -ForegroundColor DarkGray 103 |    Enable-MSDSMAutomaticClaim -BusType iSCSI | Out-Null 104 | 105 | # Set the default load balance policy of all newly claimed devices to Round Robin  106 | # Might have to reboot to get it to work if you just enabled MPIO feature and didn't reboot 107 | #The "Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR" command will actually fail if the server 108 | #has not been rebooted after enabling MPIO 109 | Write-Host "Setting default load balancing policy to Round Robin" -ForegroundColor DarkGray 110 |       Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR 111 | } #End $isIscsiConfigured if/else 112 | 113 | Write-Host "Finsihed configuration of $using:server" -ForegroundColor Green 114 | Write-Host "#######################################`r`n" -ForegroundColor Green 115 | } #End Invoke-Command 116 | } #End foreach ($server in $servers) loop 117 | 118 | 119 | #Optional - Push server IQNs into Volume Access Group 120 | #This assumes the SolidFire PSM is installed on the host running this script 121 | 122 | 123 | -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/4-CreateSFVolumes.ps1: -------------------------------------------------------------------------------- 1 | #Create SolidFire volumes 2 | 3 | #Collect credentials for connecting to SolidFire 4 | $creds = Get-Credential 5 | 6 | #Connect to SolidFire Cluster 7 | Connect-SFCluster 172.27.1.193 -credential $creds 8 | 9 | #Get the account for the volumes to create 10 | $acct = Get-SFAccount -AccountID 1 11 | 12 | #Create 20 1TiB Volumes with QoS of 2500/25000/25000 (Min/Max/Burst) IOPS 13 | $vols = 1..20 14 | $vols = $vols | ForEach-Object {$_.ToString("00")} 15 | 16 | $vols | %{New-SFVolume -AccountID 1 -Name “pvs-desktop$_” -TotalSize 1000 -GiB -Enable512e:$false -miniops 2500 -maxiops 25000 -burstiops 25000; start-sleep -s 5} 17 | 18 | #Add volumes to volume access group 19 | $acct | Get-SFVolume | Add-SFVolumeToVolumeAccessGroup -VolumeAccessGroupID 1 20 | -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/5-AddNewIscsiTargets.ps1: -------------------------------------------------------------------------------- 1 | #Configures the iSCSI initiator on SCVMM managed hosts 2 | 3 | #pull in csv with server IP information 4 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 5 | $csv = Import-Csv -path $csvfile 6 | 7 | #Get credentials for Invoke-Command 8 | $creds = Get-Credential 9 | 10 | #Populate the servers 11 | $servers = ($csv).hostname 12 | 13 | #Iterate through all the servers in the $servers variable 14 | foreach ($server in $servers) { 15 | 16 | Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 17 | 18 | #Import IscsiTarget module if not loaded 19 | if (Get-Module -ListAvailable -Name IscsiTarget) { 20 | Write-Host "IscsiTarget module loaded... Continuting" 21 | } else { 22 | Write-Host "IscsiTarget module not loaded. Loading..." 23 | Import-Module IscsiTarget 24 | } #End if 25 | 26 | #Set name variables for Invoke-Command 27 | $temphost = hostname 28 | $thishost = $using:csv | where{$_.hostname -eq $temphost} 29 | 30 | #Message what server we are working on 31 | Write-Host "########################################" -ForegroundColor Green 32 | Write-Host "Beginning configuration of $using:server`r`n" -ForegroundColor Green 33 | 34 | Write-Host "Updating iSCSI Targets..." 35 | Update-IscsiTargetPortal -TargetPortalAddress $thishost.svip 36 | 37 | Write-Host "Connecting any new inactive iSCSI targets on" $temphost -ForegroundColor DarkGray 38 | $targets = Get-IscsiTarget | Where-Object {$_.IsConnected -ne "True"} 39 | foreach ($target in $targets) { 40 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi1 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 41 | Connect-IscsiTarget -NodeAddress $target.NodeAddress -InitiatorPortalAddress $thishost.ipiscsi2 -IsMultipathEnabled $true -IsPersistent $true -TargetPortalAddress $thishost.svip 42 | Start-Sleep -s 1 43 | } #End foreach ($target in $targets) loop 44 | } #End Invoke-Command 45 | }#End foreach ($server in $servers) loop -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/6-AddClusterStorage.ps1: -------------------------------------------------------------------------------- 1 | #get credentials for the Invoke-Command section 2 | $creds = get-credential 3 | 4 | <# 5 | Add storage to Failover Cluster, assumes all nodes joined to cluster with no shared storage. 6 | Script has to be run on an existing cluster node, otherwise CredSSP 7 | will need to be configured which can be considered a security risk 8 | #> 9 | $cluster = Get-Cluster 10 | 11 | <#Server used should currently own storage being configured 12 | This server should have the FCM role and management tools installed 13 | as well as having access to the iSCSI volumes to be imported into FCM 14 | Assumes iSCSI volumes are connected 15 | #> 16 | $server = "Hyperv-09" 17 | 18 | #Add CSVs to cluster 19 | #Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 20 | 21 | #Format storage and add to Failover Cluster Manager as CSVs 22 | #Get the target name and legacy disk name for the volumes 23 | #This requires that iSCSI targets are already presented and connected 24 | $iscsidevices = (get-wmiobject -namespace ROOT\WMI -class MSiSCSIInitiator_SessionClass).devices | select TargetName,LegacyName -Unique | where {$_.targetname -match "pvs-desktop"} 25 | 26 | #Sort the devices by legacy name 27 | $iscsidevices = $iscsidevices | Sort-Object -Property @{Expression={[int][RegEx]::Match($_.LegacyName, "(?:[a-zA-Z-\.]+)(?\d+)").Groups["number"].Value}} 28 | 29 | #Break out volume names and legacy disk numbers for use in Initialize-Disk 30 | $iscsivolumenames = $iscsidevices.Targetname | ForEach-Object {$_.split('.')[4]} 31 | $LegacyDiskNumber = $iscsidevices.LegacyName | ForEach-Object {$_.split('e')[1]} 32 | 33 | #Format driveswith GPT partition type 34 | #Uses SolidFire volume name for file system label 35 | for ($i = 0; $i -lt $iscsidevices.count; $i++) { 36 | write-host "Formating Disk number" $LegacyDiskNumber[$i] "as" $iscsivolumenames[$i] -ForegroundColor DarkGreen 37 | #Initialize-Disk -Number $LegacyDiskNumber[$i] -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel $iscsivolumenames[$i] -Confirm:$false -ErrorAction SilentlyContinue 38 | Initialize-Disk -Number $LegacyDiskNumber[$i] -PartitionStyle GPT 39 | #Assign temp free drive letter to ease formating logic 40 | New-Partition -DiskNumber $LegacyDiskNumber[$i] -UseMaximumSize -AssignDriveLetter 41 | $tempdriveletter = Get-Partition -DiskNumber $LegacyDiskNumber[$i] | select DriveLetter 42 | Format-Volume -FileSystem NTFS -NewFileSystemLabel $iscsivolumenames[$i] -Confirm:$false -ErrorAction SilentlyContinue 43 | 44 | Start-Sleep -Seconds 2 45 | } #End for loop 46 | 47 | #Add storage to Cluster Failover Manager as available storage 48 | <#If not all available storage is to be added to FCM this 49 | then the "Get-ClusterAvailableDisk | Add-ClusterDisk" command 50 | could be run inside the preceeding for loop to add disks 51 | as they are available after formating. This would limit the 52 | storage added to the cluster to just those volumes that get 53 | matched in the $iscsidevices variable 54 | #> 55 | Get-ClusterAvailableDisk | Add-ClusterDisk 56 | 57 | #Get list of cluster disk resources to add to CSV 58 | $ClusterDisks = Get-ClusterResource | where {$_.OwnerGroup -match "Available Storage"} 59 | Add-ClusterSharedVolume -Name $clusterdisks.Name 60 | 61 | #Rename Cluster Disks in FCM to match volume name 62 | $ClusterDisks = Get-CimInstance -ClassName MSCluster_Resource -Namespace root/mscluster -Filter "type = 'Physical Disk'" 63 | 64 | foreach ($Disk in $ClusterDisks) { 65 | $DiskResource = Get-CimAssociatedInstance -InputObject $Disk -ResultClass MSCluster_DiskPartition 66 | if (-not ($DiskResource.VolumeLabel -eq $Disk.Name)) { 67 | Write-host "Renaming CSV" $disk.Name "to" $DiskResource.VolumeLabel -ForegroundColor DarkGreen 68 | Invoke-CimMethod -InputObject $Disk -MethodName Rename -Arguments @{newName = $DiskResource.VolumeLabel} 69 | } #End If 70 | } #End Foreach 71 | 72 | #Aaannnd for extra credit, rename shortcuts for CSVs to match volume names 73 | #To Do - Figure out how to programatically rename Junctions to their target 74 | 75 | Write-Host "Finished Adding CSV" -ForegroundColor DarkGreen 76 | #} #End Invoke-Command for adding CSVs 77 | 78 | ######################################################################## 79 | #Now validate that all the servers have the expected storage allocated # 80 | ######################################################################## 81 | 82 | #pull in csv with server IP information 83 | $csvfile = "\\172.27.100.7\share\scripts\powershell\hyper-v\hyperv-ips.csv" 84 | $csv = Import-Csv -path $csvfile 85 | 86 | #Populate the servers variable 87 | $servers = ($csv).hostname 88 | 89 | foreach ($server in $servers) { 90 | 91 | Invoke-Command -ComputerName $server -Credential $creds -ScriptBlock { 92 | $ClusterDisks = Get-CimInstance -ClassName MSCluster_Resource -Namespace root/mscluster -Filter "type = 'Physical Disk'" | sort 93 | $outstring = $ClusterDisks.Name -join "`n" 94 | $serverhost = $env:COMPUTERNAME 95 | Write-host "Checking cluster storage on" $serverhost 96 | write-host "There are" $ClusterDisks.Count "cluster disks on this server" 97 | Write-host "The cluster disks are:`n" 98 | write-host $outstring -ForegroundColor DarkGreen 99 | } 100 | } 101 | 102 | #Finally, set the CSV cache size to 512MB 103 | #In Windows 2012 R2 CSV cache is enabled by default but set to 0MB 104 | #More information here: http://blogs.msdn.com/b/clustering/archive/2013/07/19/10286676.aspx 105 | 106 | Write-Host "Setting CSV Block Cache Size to 512MB" 107 | (Get-Cluster).BlockCacheSize = 512 108 | 109 | #We are done 110 | Write-Host "Script Complete" -------------------------------------------------------------------------------- /Microsoft/HyperV-2012R2/ConfigGuide/hyperv-ips.csv: -------------------------------------------------------------------------------- 1 | hostname,ipmgmt,ipiscsi1,ipiscsi2,ipfailover,svip 2 | hyperv-01,172.27.40.9,172.27.41.9,172.27.41.19,172.27.50.9,172.27.41.220 3 | hyperv-02,172.27.40.10,172.27.41.10,172.27.41.20,172.27.50.10,172.27.41.220 4 | hyperv-03,172.27.40.11,172.27.41.11,172.27.41.21,172.27.50.11,172.27.41.220 5 | hyperv-04,172.27.40.12,172.27.41.12,172.27.41.22,172.27.50.12,172.27.41.220 6 | hyperv-05,172.27.40.13,172.27.41.13,172.27.41.23,172.27.50.13,172.27.41.220 7 | hyperv-06,172.27.40.14,172.27.41.14,172.27.41.24,172.27.50.14,172.27.41.220 8 | hyperv-07,172.27.40.15,172.27.41.15,172.27.41.25,172.27.50.15,172.27.41.220 9 | hyperv-08,172.27.40.16,172.27.41.16,172.27.41.26,172.27.50.16,172.27.41.220 10 | hyperv-09,172.27.40.17,172.27.41.17,172.27.41.27,172.27.50.17,172.27.41.220 11 | -------------------------------------------------------------------------------- /Microsoft/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/Microsoft/README.md -------------------------------------------------------------------------------- /Microsoft/hyperv-ips.csv: -------------------------------------------------------------------------------- 1 | hostname,ipmgmt,ipiscsi1,ipiscsi2,ipfailover,svip 2 | hyperv-01,172.27.40.9,172.27.41.9,172.27.41.19,172.27.50.9,172.27.41.220 3 | hyperv-02,172.27.40.10,172.27.41.10,172.27.41.20,172.27.50.10,172.27.41.220 4 | hyperv-03,172.27.40.11,172.27.41.11,172.27.41.21,172.27.50.11,172.27.41.220 5 | hyperv-04,172.27.40.12,172.27.41.12,172.27.41.22,172.27.50.12,172.27.41.220 6 | hyperv-05,172.27.40.13,172.27.41.13,172.27.41.23,172.27.50.13,172.27.41.220 7 | hyperv-06,172.27.40.14,172.27.41.14,172.27.41.24,172.27.50.14,172.27.41.220 8 | hyperv-07,172.27.40.15,172.27.41.15,172.27.41.25,172.27.50.15,172.27.41.220 9 | hyperv-08,172.27.40.16,172.27.41.16,172.27.41.26,172.27.50.16,172.27.41.220 10 | hyperv-09,172.27.40.17,172.27.41.17,172.27.41.27,172.27.50.17,172.27.41.220 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NetApp SolidFire PowerShell Tools 2 | 3 | ### Version 12.3.0 4 | 5 | ![logo](docs/product.png) 6 | 7 | ## Description 8 | 9 | The SolidFire PowerShell Tools is a collection of Microsoft® Windows® PowerShell functions that use SolidFire API to control a SolidFire storage system. These functions allow administrators to query for information, make changes to objects in a storage system, and develop complex scripts on a single platform. Users can implement this module with other modules and snap-ins, such as VMware® PowerCLI and Cisco® UCS PowerTool, to extend capabilities throughout the infrastructure. 10 | 11 | Any user with a SolidFire storage system and Windows PowerShell can take advantage of the SolidFire PowerShell Tools. Users of the SolidFire PowerShell Tools should have an understanding of Windows PowerShell functions. 12 | 13 | ## Installation 14 | 15 | The SolidFire Powershell Module can be installed directly on multiple systems by following these instructions: 16 | 17 | | System | Installation | 18 | |---------------------------|-------------------------------------------| 19 | | Windows | [Instructions](docs/windows/README.md) | 20 | | Mac | [Instructions](docs/mac/README.md) | 21 | | Linux (Ubuntu/Centos) | [Instructions](docs/linux/README.md) | 22 | 23 | ## Release Notes 24 | 25 | [Click here to download latest release notes](docs/NetApp_Element_PowerShell_12.3_Release_Notes.pdf) 26 | 27 | [Click here to download User Guide Doc](docs/NetApp_Element_PowerShell_12.3_User_Guide.pdf) 28 | -------------------------------------------------------------------------------- /Reporting/Get-VolumeAccessGroup-Each-Volume-Is-In: -------------------------------------------------------------------------------- 1 | # Identify the Volume Access Groups each volume is part of 2 | 3 | $result = @() 4 | $volumes = Get-SFVolume 5 | foreach($vol in $volumes){ 6 | $volaccessgroups = $vol.VolumeAccessGroupIDs 7 | foreach($vagID in $volaccessgroups){ 8 | $vag = Get-SFVolumeAccessGroup $vagID 9 | # Store Volume Access Group data in object 10 | $object = New-Object -TypeName PSObject -Property @{ 11 | VolumeName = $vol.VolumeName 12 | VolumeAccessGroupName = $vag.VolumeAccessGroupName 13 | } 14 | $result += $object 15 | } 16 | } 17 | $result | Sort VolumeName 18 | 19 | 20 | -------------------------------------------------------------------------------- /Reporting/sf-efficiency.ps1: -------------------------------------------------------------------------------- 1 | #KEVIN PAPRECK - UNOFFICIAL SCRIPT FOR CALCULATING SOLIDFIRE EFFICIENCIES 2 | 3 | # ==================================================================== 4 | # Disclaimer: This script is written as best effort and provides no 5 | # warranty expressed or implied. Please contact the author(s) if you 6 | # have questions about this script before running or modifying 7 | # ==================================================================== 8 | 9 | #EFFICIENCY CALCULATIONS 10 | #thinProvisioningFactor = (nonZeroBlocks + zeroBlocks) / nonZeroBlocks 11 | #deDuplicationFactor = (nonZeroBlocks+snapshotNonZeroBlocks) / uniqueBlocks 12 | #compressionFactor = (uniqueBlocks * 4096) / (uniqueBlocksUsedSpace*.93) 13 | 14 | #REQUIRED INPUTS 15 | $nonZeroBlocks = get-sfclustercapacity | select nonZeroBlocks -ExpandProperty nonZeroBlocks 16 | $zeroBlocks = get-sfclustercapacity | select zeroBlocks -ExpandProperty zeroBlocks 17 | $uniqueBlocks = get-sfclustercapacity | select uniqueBlocks -ExpandProperty uniqueBlocks 18 | $uniqueBlocksUsedSpace = get-sfclustercapacity | select uniqueBlocksUsedSpace -ExpandProperty uniqueBlocksUsedSpace 19 | $snapshotNonZeroBlocks = get-sfclustercapacity | select snapshotNonZeroBlocks -ExpandProperty snapshotNonZeroBlocks 20 | 21 | #EFFICIENCY CALCULATIONS 22 | [single]$thinProvisioningFactor = (($nonZeroBlocks+$zeroBlocks)/$nonZeroBlocks) 23 | [single]$deDuplicationFactor = (($nonZeroBlocks+$snapshotNonZeroBlocks)/$uniqueBlocks) 24 | [single]$compressionFactor = (($uniqueBlocks*4096)/($uniqueBlocksUsedSpace*.93)) 25 | 26 | #FOR DEBUGGING 27 | #echo $thinProvisioningFactor 28 | #echo $deDuplicationFactor 29 | #echo $compressionFactor 30 | 31 | #CALCULATE EFFICIENCY FACTOR FOR COMPRESSION + DEDUPLICATION ONLY 32 | $efficiencyFactor = ($deDuplicationFactor*$compressionFactor) 33 | 34 | #CALCULATE FULL EFFICIENCY FACTOR FOR COMPRESSION + DEDUPLICATION + THIN PROVISIONING 35 | $efficiencyFullFactor = ($deDuplicationFactor*$compressionFactor*$thinProvisioningFactor) 36 | 37 | #GET THE CLUSTER ERROR THRESHOLD BYTES 38 | $errorThreshold = get-sfclusterfullthreshold | select stage4BlockThresholdBytes -ExpandProperty Stage4BlockThresholdBytes 39 | $errorThresholdTB = ($errorThreshold/1000/1000/1000/1000) 40 | 41 | #GET THE TOTAL USED RAW CAPACITY 42 | $sumUsedCapacity = get-sfclusterfullthreshold | select sumUsedClusterBytes -ExpandProperty sumUsedClusterBytes 43 | $sumUsed = ($sumUsedCapacity/1000/1000/1000/1000) 44 | 45 | #DETERMINE THE RAW SPACE AVAILABLE ON THE CLUSTER UNTIL ERROR THRESHOLD 46 | $rawSpaceAvailableTB = (($errorThreshold-$sumUsedCapacity)/(1000*1000*1000*1000)) 47 | 48 | #DETERMINE THE RAW SPACE AVAILABLE ON THE CLUSTER UNTIL 100% FULL 49 | $stage5BlockThresholdBytes = get-sfclusterfullthreshold | select stage5BlockThresholdBytes -ExpandProperty stage5BlockThresholdBytes 50 | $rawSpaceAvailable100TB = (($stage5BlockThresholdBytes-$sumUsedCapacity)/(1000*1000*1000*1000)) 51 | 52 | #GET TOTAL CLUSTER CAPCITY 53 | $sumTotalClusterBytes = get-sfclusterfullthreshold | select sumTotalClusterBytes -ExpandProperty sumTotalClusterBytes 54 | $sumTotalClusterBytes = ($sumTotalClusterBytes/1000/1000/1000/1000) 55 | 56 | #GET CLUSTER FULL EFFECTIVE 57 | $sumClusterFulldc = ($sumTotalClusterBytes*$efficiencyFactor)/2 58 | $sumClusterFulldct = ($sumTotalClusterBytes*$efficiencyFullFactor)/2 59 | 60 | #GET THE EFFECTIVE CAPACITY REMAINING OF COMPRESSION + DEDUPLICATION UNTIL ERROR THRESHOLD 61 | $effectiveCapacityRemaining = ($rawSpaceAvailableTB*$efficiencyFactor)/2 62 | 63 | #GET THE EFFECTIVE CAPACITY OF COMPRESSION + DEDUPLICATION + THIN PROVISIONING UNTIL ERROR THRESHOLD 64 | $effectiveFullCapacityRemaining = ($rawSpaceAvailableTB*$efficiencyFullFactor)/2 65 | 66 | #GET THE EFFECTIVE CAPACITY REMAINING OF COMPRESSION + DEDUPLICATION UNTIL 100% FULL 67 | $effectiveCapacityRemaining100 = ((($stage5BlockThresholdBytes-$sumUsedCapacity)*$efficiencyFactor)/(1000*1000*1000*1000))/2 68 | 69 | #GET CLUSTER NAME 70 | $clusterName = get-sfClusterInfo | select name -ExpandProperty name 71 | 72 | #FORMAT TO 2 DECIMALS 73 | $efficiencyFactor = "{0:N2}" -f $efficiencyFactor 74 | $efficiencyFullFactor = "{0:N2}" -f $efficiencyFullFactor 75 | $rawSpaceAvailableTB = "{0:N2}" -f $rawSpaceAvailableTB 76 | $effectiveCapacity = "{0:N2}" -f $effectiveCapacity 77 | $sumTotalClusterBytes = "{0:N2}" -f $sumTotalClusterBytes 78 | $effectiveCapacityRemaining = "{0:N2}" -f $effectiveCapacityRemaining 79 | $sumClusterFulldc = "{0:N2}" -f $sumClusterFulldc 80 | $sumClusterFulldct = "{0:N2}" -f $sumClusterFulldct 81 | $effectiveCapacityRemaining100 = "{0:N2}" -f $effectiveCapacityRemaining100 82 | $sumUsed = "{0:N2}" -f $sumUsed 83 | $errorThresholdTB = "{0:N2}" -f $errorThresholdTB 84 | $compressionFactor = "{0:N2}" -f $compressionFactor 85 | $deDuplicationFactor = "{0:N2}" -f $deDuplicationFactor 86 | $thinProvisioningFactor = "{0:N2}" -f $thinProvisioningFactor 87 | $rawSpaceAvailable100TB = "{0:N2}" -f $rawSpaceAvailable100TB 88 | 89 | Write-Host "--------------------------------------------------------------------------------------------------------------" 90 | Write-Host "SolidFire Cluster: $clusterName" 91 | Write-Host "" 92 | Write-Host "Cluster RAW Capacity: $sumTotalClusterBytes TB" 93 | Write-Host "Cluster RAW Capacity Error Stage: $errorThresholdTB TB" 94 | Write-Host "Cluster RAW Capacity Used: $sumUsed" 95 | Write-Host "Cluster Error Stage RAW TB Remaining Available: $rawSpaceAvailableTB TB" 96 | Write-Host "Cluster 100% Full RAW TB Remaining Available: $rawSpaceAvailable100TB TB" 97 | 98 | Write-Host "" 99 | Write-Host "Cluster Efficiencies" 100 | Write-Host "Thin Provisioning Ratio: $thinProvisioningFactor" 101 | Write-Host "Deduplication Ratio: $deDuplicationFactor" 102 | Write-Host "Compression Ratio: $compressionFactor" 103 | Write-Host "Cluster Deduplication/Compression Efficiency: $efficiencyFactor" 104 | Write-host "Cluster Deduplication/Compression/Thin Provisioning Efficiency: $efficiencyFullFactor" 105 | Write-Host "" 106 | Write-Host "Cluster Capacity" 107 | Write-Host "Cluster Effective Capacity @ 100% Full with Dedup/Comp: $sumClusterFulldc TB" 108 | Write-Host "Cluster Effective Capacity @ 100% Full with Dedup/Comp/Thin: $sumClusterFulldct TB" 109 | Write-Host "Effective Capacity Remaining until 100% Full with Dedup/Comp: $effectiveCapacityRemaining100 TB" 110 | Write-Host "Effective Capacity Remaining until Error Threshold with Dedup/Comp: $effectiveCapacityRemaining TB" 111 | 112 | Write-Host "--------------------------------------------------------------------------------------------------------------" 113 | -------------------------------------------------------------------------------- /SPBM/Get-SFSpbmPolicyName.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/SPBM/Get-SFSpbmPolicyName.ps1 -------------------------------------------------------------------------------- /SPBM/Get-SFVolumeFromDatastore.ps1: -------------------------------------------------------------------------------- 1 | Function Get-SFVolumeFromDatastore{ 2 | <# 3 | .Synopsis 4 | 5 | Gets the SolidFire volume associated with a vSphere Datastore 6 | 7 | .Description 8 | 9 | Gets the SolidFire volume associated with a vSphere Datastore. 10 | Requires active connections to vCenter with PowerCLI and connection to SolidFire cluster. 11 | 12 | .Parameter Datastore 13 | 14 | Represents a VMware datastore object. Datastore objects can be collected with Get-Datastore 15 | 16 | .Example 17 | 18 | Get-Datastore "Oracle01" | Get-SFVolumeFromDatastore 19 | 20 | Returns the SolidFire volume associated with vSphere datastore "Oracle01"ds. 21 | 22 | .Link 23 | http://www.github.com/solidfire/powershell 24 | 25 | .Notes 26 | 27 | ==================================================================== 28 | Disclaimer: This script is written as best effort and provides no 29 | warranty expressed or implied. Please contact the author(s) if you 30 | have questions about this script before running or modifying 31 | ==================================================================== 32 | #> 33 | [CmdletBinding()] 34 | param( 35 | [Parameter( 36 | ValueFromPipeline=$true, 37 | Position=0, 38 | Mandatory=$True, 39 | HelpMessage="Enter the Datastore.")] 40 | [VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.Datastore[]] 41 | $datastore 42 | 43 | ) 44 | 45 | Process{ 46 | $scsiID = ((Get-ScsiLun -Datastore $datastore).CanonicalName).Split(".")[1] 47 | $result = Get-SFVolume | Where{$_.ScsiNAAdeviceID -eq $scsiID} 48 | Return $result 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /SPBM/Get-SFVolumeQoSfromSPBMPolicy.ps1: -------------------------------------------------------------------------------- 1 | Function Get-SFVolumeQoSfromSPBMPolicy{ 2 | <# 3 | .Synopsis 4 | 5 | Creates a QoS profile based on values related to a SPBM policy name. 6 | 7 | .Description 8 | Creates a QoS profile based on values related to a SPBM policy name. 9 | Splits name at '-' and pulls values when the policy name is formatted 10 | -Min-Max-Burst | Oracle-500-3K-5K 11 | 12 | Returns an object containing the QoS values and Attributes 13 | 14 | .Parameter Policy 15 | 16 | Represents a VMware SPBM policy object. 17 | 18 | .Example 19 | 20 | Get-SpbmStoragePolicy "Oracle-5K-10K-15K" | Get-SFVolumeQoSfromSPBMPolicy 21 | 22 | Returns an object that has the QoS values split out. 23 | 24 | .Link 25 | http://www.github.com/solidfire/powershell 26 | 27 | .Notes 28 | 29 | ==================================================================== 30 | Disclaimer: This script is written as best effort and provides no 31 | warranty expressed or implied. Please contact the author(s) if you 32 | have questions about this script before running or modifying 33 | ==================================================================== 34 | #> 35 | [CmdletBinding(ConfirmImpact="Low")] 36 | param( 37 | [Parameter( 38 | ValueFromPipeline=$true, 39 | Position=0, 40 | Mandatory=$True, 41 | HelpMessage="Enter the VMware Storage Policy name.")] 42 | #[VimAutomation.Storage.Impl.V1.Spbm.SpbmStoragePolicyImpl[]] 43 | $Policy 44 | ) 45 | 46 | # Runs Once 47 | BEGIN { 48 | $result = @() 49 | } 50 | 51 | # Runs one time for every object piped in 52 | PROCESS { 53 | 54 | $row = "" | Select Workload,Min,Max,Burst 55 | $row.Workload = ($policy.Name.Split("-")[0]) 56 | $row.Min = ($policy.Name.Split("-")[1]).Replace("K","000") 57 | $row.Max = ($policy.Name.Split("-")[2]).Replace("K","000") 58 | $row.Burst = ($policy.Name.Split("-")[3]).Replace("K","000") 59 | 60 | $result += $row 61 | } 62 | 63 | # Runs once 64 | END { 65 | $result 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /SPBM/New-SFMultiVolume.ps1: -------------------------------------------------------------------------------- 1 | function New-SFMultiVolume{ 2 | <# 3 | .Synopsis 4 | 5 | Create multiple SolidFire Volumes with same account, name prefix, and size. 6 | 7 | .Description 8 | 9 | Create multiple SolidFire Volumes with same account, name prefix, and size. 10 | This function supplements and uses the SolidFire Tools for PowerShell 11 | Primary value of this function is to create multiple, similar volumes. 12 | 13 | .Parameter VolumeCount 14 | 15 | The number of volumes to be created. Required. Must be greater than 1. 16 | 17 | .Parameter NamePrefix 18 | 19 | The string to prepend to the Volume name. Defaults to "MultiVolume" 20 | 21 | .Parameter AccountID 22 | 23 | The ID of the Account these Volumes should be created under. Required. 24 | 25 | .Parameter SizeInGB 26 | 27 | The size of the Volumes to be created in GB. Required. 28 | 29 | .Example 30 | 31 | Get-SFAccount | New-SFMultiVolume -VolumeCount 100 -NamePrefix "OneHundred" -SizeInGB 10 32 | Creates 100 10GB Volumes with names prefixed by "OneHundred" (eg: OneHundred-45813576) for each Account on the cluster 33 | 34 | .Link 35 | http://www.github.com/solidfire/powershell 36 | 37 | .Notes 38 | 39 | ==================================================================== 40 | Disclaimer: This script is written as best effort and provides no 41 | warranty expressed or implied. Please contact the author(s) if you 42 | have questions about this script before running or modifying 43 | ==================================================================== 44 | #> 45 | [CmdletBinding(ConfirmImpact="Low")] 46 | param( 47 | [Parameter( 48 | Position=0, 49 | Mandatory=$True, 50 | HelpMessage="Enter the number of Volumes to create. Int between 2 and 1000.")] 51 | [ValidateRange(2,1000)] 52 | [int] 53 | $VolumeCount, 54 | 55 | [Parameter( 56 | Position=1, 57 | Mandatory=$False, 58 | HelpMessage="Enter the prefix for Volume names.")] 59 | [string] 60 | $NamePrefix = "MultiVolume", 61 | 62 | [Parameter( 63 | ValueFromPipeline = $True, 64 | Position=2, 65 | Mandatory=$True, 66 | HelpMessage="Enter the AccountID under which to create these Volumes.")] 67 | [long] 68 | $AccountID, 69 | 70 | [Parameter( 71 | Position=3, 72 | Mandatory=$True, 73 | HelpMessage="Enter the Volume size in GB.")] 74 | [int] 75 | $SizeInGB 76 | 77 | ) 78 | #Create an ArrayList to hold the newly created Volumes. 79 | $CreatedVolumes = New-Object System.Collections.ArrayList($null) 80 | 81 | #Counter used to compare to the $VolumeCount argument 82 | $VolumeTally = 0 83 | Do { 84 | #Generates a random hash to append to the NamePrefix for unique Volume names 85 | $Random = Get-Random 86 | #Creates a new Volume 87 | $NewVolume = New-SFVolume -Name "$NamePrefix-$Random" -AccountID $AccountID -Enable512e:$true -TotalSize $SizeInGB -GB 88 | $NewVolumeName = $NewVolume.Name 89 | Write-Verbose "Solidfire volume $NewVolume.Name has been created" 90 | #Add the new Volume to the CreatedVolumes list. 91 | $CreatedVolumes.Add($NewVolume) 92 | #Increments $VolumeTally by 1 93 | $VolumeTally = $VolumeTally + 1 94 | #Compares $VolumeTally and $VolumeCount to stop volume creation loop 95 | } Until ($VolumeTally -eq $VolumeCount) 96 | #Writes created Volumes to Output 97 | Write-Output $CreatedVolumes 98 | } -------------------------------------------------------------------------------- /SPBM/New-SFVolumeFromSPBMPolicy.ps1: -------------------------------------------------------------------------------- 1 | function New-SFVolumeFromSPBMPolicy{ 2 | <# 3 | .Synopsis 4 | 5 | Creates a new SolidFire volume based on 6 | 7 | .Description 8 | Creates a string name based on values related to a SolidFire volume. 9 | Pulls the QoS profile for the volume. Substitutes 000 with a K. 10 | Prefixes the policy name with a workload attribute if it exists. 11 | Ability to choose different attribute name lookup 12 | 13 | Returns the Volume name and resulting policy name. 14 | 15 | .Parameter Volume 16 | 17 | Represents a SolidFire volume object as returned by Get-SFVolume 18 | 19 | .Parameter Attribute 20 | 21 | Allows user to specify the attribute name they would like to use if different than default. 22 | Default attribute name is "Workload" 23 | The attribute value is pulled from the volume attribute and used as a prefix for the policy name. 24 | If volume attribute is: Workload = Oracle 25 | Policy name will be: Oracle-Min-Max-Burst 26 | 27 | .Example 28 | 29 | Get-SFVolume Volume1 | Get-SFSpbmPolicyName 30 | 31 | Returns the derived policy name for SolidFire volume Volume1 32 | 33 | .Example 34 | 35 | Get-SFVolume | Get-SFSpbmPolicyName 36 | 37 | Returns the derivied policy name for all SolidFire volumes returned. 38 | .Example 39 | 40 | Get-SFVolume Volume1 | Get-SFSpbmPolicyName -Attribute Application 41 | 42 | Returns the derived policy name for the SolidFire volume Volume1 with the value for Application as prefix 43 | -Min-Max-Burst 44 | Oracle-1K-3K-5K 45 | 46 | 47 | .Link 48 | http://www.github.com/solidfire/powershell 49 | 50 | .Notes 51 | 52 | ==================================================================== 53 | Disclaimer: This script is written as best effort and provides no 54 | warranty expressed or implied. Please contact the author(s) if you 55 | have questions about this script before running or modifying 56 | ==================================================================== 57 | #> 58 | 59 | [CmdletBinding(ConfirmImpact="Low")] 60 | param( 61 | [Parameter( 62 | ValueFromPipeline=$true, 63 | Position=0, 64 | Mandatory=$True, 65 | HelpMessage="Enter the VMware Storage Policy.")] 66 | [VimAutomation.Storage.Impl.V1.Spbm.SpbmStoragePolicyImpl[]] 67 | $Policy, 68 | [Parameter( 69 | ValueFromPipeline=$false, 70 | Position=1, 71 | Mandatory=$True)] 72 | [String] 73 | $VolumeName, 74 | [Parameter( 75 | ValueFromPipeline=$True, 76 | Position=1, 77 | Mandatory=$True)] 78 | [String] 79 | $AccountName 80 | ) 81 | 82 | 83 | $specs = $policy | Get-SFVolumeQosFromSpbmPolicy 84 | $capacity = [Math]::Round((($policy | Get-SpbmCompatibleStorage | Select -First 1).CapacityGB)*1.07374) 85 | $attribute = @{"Workload" = $specs.Workload} 86 | 87 | New-SFVolume -Name Oracle2 -Account (Get-SFAccount $AccountName) -Enable512e:$true -TotalSize $capacity -GB -MinIOPS $specs.Min -MaxIOPS $specs.Max -BurstIOPS $specs.Burst -Attributes $attribute 88 | } 89 | -------------------------------------------------------------------------------- /SPBM/New-SPBMPolicyFromDatastore.ps1: -------------------------------------------------------------------------------- 1 | function New-SPBMPolicyFromDatastore{ 2 | # Dynamically create SPBM Policy from ground up. 3 | [CmdletBinding(ConfirmImpact="Low")] 4 | param( 5 | [Parameter( 6 | ValueFromPipeline=$true, 7 | Position=0, 8 | Mandatory=$True, 9 | HelpMessage="Enter the Datastore.")] 10 | [VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.Datastore[]] 11 | $datastore, 12 | [Parameter( 13 | Position=2, 14 | Mandatory=$False, 15 | HelpMessage="Enter the SolidFire Volume attribute." 16 | )] 17 | $attribute = "Workload" 18 | 19 | ) 20 | Begin{} 21 | Process{ 22 | # Get Volume 23 | Write-Verbose "Getting the SolidFire Volume" 24 | $volume = Get-SFVolumeFromDatastore -datastore $datastore 25 | 26 | # Get Workload 27 | $workload = ($volume).Attributes.$($attribute) 28 | Write-Verbose "Collected workload $workload" 29 | 30 | # Create Tag 31 | Write-Verbose "Creating a new Tag from Workload" 32 | $volume | New-TagFromSFWorkload 33 | Write-Verbose "Completed Tag creation for workload $workload" 34 | 35 | 36 | # Assign Tag to Datastore 37 | Write-Verbose "Assigning a new Tag to Datastore" 38 | $datastore | Set-SFWorkloadTagToDatastore 39 | Write-Verbose "Completed assigning new Tag to Datastore" 40 | 41 | 42 | 43 | # Check if Policy exists. Create if it does not. 44 | $policyname = (Get-SFSpbmPolicyName -Volume $volume).PolicyName 45 | Write-Verbose "Creating Storage Policy" 46 | $checkpolicy = Get-SPBMStoragePolicy -Name $policyname -ErrorAction SilentlyContinue 47 | if($checkpolicy -eq $null){ 48 | New-SPBMPolicyFromSFWorkload -Volume $volume 49 | } 50 | Write-Verbose "Policy created successfully" 51 | } 52 | } -------------------------------------------------------------------------------- /SPBM/New-SPBMPolicyFromSFWorkload.ps1: -------------------------------------------------------------------------------- 1 | function New-SPBMPolicyFromSFWorkload{ 2 | <# 3 | .Synopsis 4 | 5 | Creates a policy based on a SolidFire volume QOS profile and attributes.. 6 | 7 | .Description 8 | 9 | Creates a policy based on a SolidFire volume QOS profile and attributes.. 10 | 11 | 12 | .Parameter Volume 13 | 14 | Represents a SolidFire volume object. 15 | 16 | .Parameter AttributeName 17 | 18 | SolidFire attribute name. This key allows lookup of appropriate values used in policy creation. 19 | 20 | .Example 21 | 22 | Get-SFVolume Cluster01-1 | New-SPBMPolicyFromSFWorkload -AttributeName Workload 23 | 24 | .Link 25 | http://www.github.com/solidfire/powershell 26 | 27 | .Notes 28 | 29 | ==================================================================== 30 | Disclaimer: This script is written as best effort and provides no 31 | warranty expressed or implied. Please contact the author(s) if you 32 | have questions about this script before running or modifying 33 | ==================================================================== 34 | #> 35 | 36 | param( 37 | [Parameter( 38 | ValueFromPipeline=$true, 39 | Position=0, 40 | Mandatory=$True, 41 | HelpMessage="Enter the SolidFire volume")] 42 | [SolidFire.Core.Objects.SFVolume[]] 43 | $Volume, 44 | [Parameter( 45 | ValueFromPipeline=$false, 46 | Position=1, 47 | Mandatory=$false, 48 | HelpMessage="Enter the attribute name if different from Workload")] 49 | [String] 50 | $AttributeName = "Workload" 51 | ) 52 | 53 | 54 | 55 | $name = (Get-SFSpbmPolicyName -Volume $volume).PolicyName 56 | $workload = $volume.Attributes.$AttributeName 57 | 58 | #if(!(Get-SPBMStoragePolicy $name)){ 59 | $rules = New-SpbmRuleSet -Name "$($name)" -AllOfRules (New-SpbmRule -AnyOfTags (Get-Tag $workload)) 60 | 61 | New-SpbmStoragePolicy -Name $name -AnyOfRuleSets $rules -Description "Storage policy for $workload workloads" 62 | #} 63 | 64 | 65 | } -------------------------------------------------------------------------------- /SPBM/New-TagFromSFWorkload.ps1: -------------------------------------------------------------------------------- 1 | Function New-TagFromSFWorkload{ 2 | <# 3 | .Synopsis 4 | 5 | Creates a tag based on SolidFire volume attribute. 6 | 7 | .Description 8 | 9 | Creates a tag based on SolidFire volume attribute. 10 | Default attribute key is Workload 11 | Default Tag Category is SolidFire 12 | 13 | .Parameter Datastore 14 | 15 | Represents a VMware datastore object. Datastore objects can be collected with Get-Datastore 16 | 17 | .Parameter Attribute 18 | 19 | SolidFire attribute value 20 | 21 | .Example 22 | 23 | New-TagFromSFWorkload $volume 24 | 25 | Returns an object that has the QoS values split out. 26 | 27 | .Link 28 | http://www.github.com/solidfire/powershell 29 | 30 | .Notes 31 | 32 | ==================================================================== 33 | Disclaimer: This script is written as best effort and provides no 34 | warranty expressed or implied. Please contact the author(s) if you 35 | have questions about this script before running or modifying 36 | ==================================================================== 37 | #> 38 | [CmdletBinding(ConfirmImpact="Low")] 39 | param( 40 | [Parameter( 41 | ValueFromPipeline=$true, 42 | Position=0, 43 | Mandatory=$True)] 44 | [SolidFire.Core.Objects.SFVolume[]] 45 | $Volume, 46 | [Parameter( 47 | Position=1, 48 | Mandatory=$False, 49 | HelpMessage="Enter category name." 50 | )] 51 | $category = "*SolidFire*", 52 | [Parameter( 53 | Position=2, 54 | Mandatory=$False, 55 | HelpMessage="Enter the SolidFire Volume." 56 | )] 57 | $attribute = "Workload" 58 | 59 | ) 60 | 61 | # Runs Once 62 | BEGIN { 63 | 64 | # Validate that there is an active connection to a vCenter server 65 | If(!($defaultviserver)){ 66 | Write-Output "No vCenter Server is available with this session" 67 | Break 68 | } 69 | 70 | } 71 | 72 | # Runs one time for every object piped in 73 | PROCESS { 74 | 75 | # Collect value for the attribute provided 76 | $workload = ($volume).Attributes.$($attribute) 77 | $tagexists = Get-Tag -Name $workload -ErrorAction SilentlyContinue 78 | 79 | If($tagexists -ne $null){ 80 | Write-Output "The Tag for $workload already exists" 81 | Break 82 | } 83 | 84 | 85 | 86 | $cat = Get-TagCategory $category -ErrorAction SilentlyContinue | Select -First 1 87 | 88 | If($workload -ne $null){ 89 | 90 | # If a category does not exist based on the value provided a new category will be created. 91 | If($cat -eq $null){ 92 | New-TagCategory -Name "SolidFire" -Description "Tags related to SolidFire Storage capabilities" -Cardinality Multiple -EntityType Datastore,DatastoreCluster 93 | $cat = Get-TagCategory "SolidFire" 94 | } 95 | 96 | # Creates a new tag as part of the provided tag category. 97 | New-Tag -Name $workload -Category $cat -Description "SolidFire volume with $($attribute) value of $($workload)" 98 | 99 | }Else{ 100 | Write-Output "No value available for attribute $($workload) on volume $($volume)" 101 | } 102 | 103 | } 104 | } -------------------------------------------------------------------------------- /SPBM/ReadMe.txt: -------------------------------------------------------------------------------- 1 | # Note for Contributors 2 | I have compiled all of the functions into a module file, SolidFire-SPBM.psm1. 3 | Please provide updates and pull requests to the individual functions. 4 | I have a function that will roll all of the functions together into the module and incorporate updates. I will do so when pull requests are accepted. 5 | 6 | # Capabilities 7 | You can use these functions to do things such as: 8 | - Create Tags based on SolidFire Volume characteristics 9 | - Set Volume Attributes easily. 10 | - Assign Tags and Policies to datastores 11 | - Create QoS profile based on an existing policy 12 | - Create Policy name based on QoS and Attributes of a volume 13 | - Create tag, category, assign datastore, and create new policy based on an existing volume/datastore with one function 14 | 15 | # Why is this useful? 16 | In short this allows organizations leveraging SolidFire in a VMware environment to easily begin utilizing Storage Policy Based Management (SPBM) in order to properly classify their datastores for consumption. Assigning datastores (and the underlying SF volumes) to policies means that consumers can understand the characteristics of the storage their applications are running atop. Administrators can ensure that policies are adhered to and do so dynamically. Automation can be built with these functions that will allow an administrator to alter the characteristics of a volume and assign it to an appropriate policy when necessary. This provides the ability to change the performance characteristics of a datastore, and ensure proper policy alignment, without the need of storage vmotion. Additionally, this management framework is the model that is used for vSphere Virtual Volumes. 17 | 18 | You can learn more about this and more in future blog posts at http://developer.solidfire.com/blogs. 19 | 20 | # Note on Set-SFVolumeAttribute 21 | Natively Set-SFVolume replaces attribute values with the hash table provided when called. The Set-SFVolumeAttribute is designed to add some extra logic that will be made available in a later build. If the key exists it will simply update the value. If it does not exist it will simply add the key:value pair to the attributes of the volume. The function collects any existing attributes so that when the call is made those values are not replaced. 22 | 23 | # Version Note 24 | These functions are built using SolidFire Tools for PowerShell 1.0. 25 | As such some parameter and property names may have changed slightly since the beta release. 26 | These were necessary improvements to improve ease of use and consistency. 27 | If you are running the beta build and would like to take advantage of these functions please email us at powershell@solidfire.com 28 | -------------------------------------------------------------------------------- /SPBM/Set-SFVolumeAttribute.ps1: -------------------------------------------------------------------------------- 1 | function Set-SFVolumeAttribute{ 2 | <# 3 | .Synopsis 4 | 5 | Easily sets attributes on SolidFire Volume. 6 | 7 | .Description 8 | 9 | Sets attribute on SolidFire Volume. 10 | This function supplements and uses the SolidFire Tools for PowerShell 11 | Primary value of this function is to quickly modify and add attributes. 12 | This is helpful since the default behavior of the api call overwrites 13 | 14 | .Parameter Volume 15 | 16 | 17 | .Parameter AttributeName 18 | 19 | Name for the Attribute. 20 | 21 | .Parameter AttributeValue 22 | 23 | Value for the attribute. 24 | 25 | .Example 26 | 27 | Get-SFVolume | Set-SFVolumeAttribute -AttributeName Workload -AttributeValue SQLDB 28 | 29 | .Link 30 | http://www.github.com/solidfire/powershell 31 | 32 | .Notes 33 | 34 | ==================================================================== 35 | Disclaimer: This script is written as best effort and provides no 36 | warranty expressed or implied. Please contact the author(s) if you 37 | have questions about this script before running or modifying 38 | ==================================================================== 39 | #> 40 | [CmdletBinding(ConfirmImpact="Low")] 41 | param( 42 | [Parameter( 43 | ValueFromPipeline=$true, 44 | Position=0, 45 | Mandatory=$True, 46 | HelpMessage="Enter the SolidFire Volume.")] 47 | [SolidFire.Core.Objects.SFVolume[]] 48 | $Volume, 49 | [Parameter( 50 | Position=1, 51 | Mandatory=$False, 52 | HelpMessage="Enter the SolidFire Volume attribute name." 53 | )] 54 | $AttributeName = "Workload", 55 | [Parameter( 56 | Position=2, 57 | Mandatory=$True, 58 | HelpMessage="Enter the SolidFire Volume attribute value." 59 | )] 60 | [String] 61 | $AttributeValue 62 | 63 | ) 64 | 65 | # Set Attributes 66 | 67 | Process{ 68 | $attributes = $volume | Select -ExpandProperty Attributes 69 | 70 | If($attributes.ContainsKey($AttributeName)){ 71 | $attributes.Set_Item($AttributeName,$AttributeValue) 72 | 73 | }ElseIf(!($attributes.ContainsKey($AttributeName))){ 74 | 75 | $attributes.Add($AttributeName,$AttributeValue) 76 | } 77 | 78 | $Volume | Set-SFVolume -Attributes $attributes -Confirm:$False 79 | 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /SPBM/Set-SFWorkloadTagToDatastore.ps1: -------------------------------------------------------------------------------- 1 | Function Set-SFWorkloadTagToDatastore{ 2 | <# 3 | .Synopsis 4 | 5 | Assigns a datastore to a tag based on an attribute value. 6 | 7 | .Description 8 | Assigns a datastore to a tag based on an attribute value. 9 | If a tag doesn't exist for the workload then a new tag is created and assigned. 10 | 11 | 12 | .Parameter Datastore 13 | 14 | Represents a VMware datastore object. Datastore objects can be collected with Get-Datastore 15 | 16 | .Parameter Attribute 17 | 18 | SolidFire attribute value 19 | 20 | .Example 21 | 22 | Get-Datastore | Set-SFWorkloadTagToDatastore 23 | 24 | Assigns tag to datastores based on defined attribute. 25 | 26 | .Link 27 | http://www.github.com/solidfire/powershell 28 | 29 | .Notes 30 | 31 | ==================================================================== 32 | Disclaimer: This script is written as best effort and provides no 33 | warranty expressed or implied. Please contact the author(s) if you 34 | have questions about this script before running or modifying 35 | ==================================================================== 36 | #> 37 | [CmdletBinding(ConfirmImpact="Low")] 38 | param( 39 | [Parameter( 40 | ValueFromPipeline=$true, 41 | Position=0, 42 | Mandatory=$True, 43 | HelpMessage="Enter the Datastore.")] 44 | #[VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.VmfsDatastoreImpl[]] 45 | $datastore, 46 | [Parameter( 47 | Position=2, 48 | Mandatory=$False, 49 | HelpMessage="Enter the SolidFire Volume attribute." 50 | )] 51 | $attribute = "Workload" 52 | 53 | ) 54 | 55 | # Runs Once 56 | BEGIN { 57 | # Validate that there is an active connection to a vCenter server 58 | If(!($defaultviserver)){ 59 | Write-Output "No vCenter Server is available with this session" 60 | Break 61 | } 62 | } 63 | 64 | # Runs one time for every object piped in 65 | PROCESS { 66 | 67 | # Identify the workload name. 68 | $volume = Get-SFVolumeFromDatastore $datastore 69 | $workload = $volume.Attributes.$($attribute) 70 | 71 | # Get the tag associated with that name. Creates a new tag for the workload if the tag doesn't exist. 72 | If(!($tag = Get-Tag -Name $workload -ErrorAction SilentlyContinue)){ 73 | New-TagfromSFWorkload -Volume $volume 74 | $tag = Get-Tag -Name $workload 75 | } 76 | 77 | # Assign the tag to that datastore. 78 | New-TagAssignment -Tag $tag -Entity $datastore 79 | 80 | } 81 | } -------------------------------------------------------------------------------- /Sample Scripts - Assigning Volume Attributes.ps1: -------------------------------------------------------------------------------- 1 | # This script sample demonstrates how to use the Set-SFVolumeAttribute function to assign attributes to a volume. 2 | 3 | Get-SFVolume Cluster01-2 | Set-SFVolumeAttribute -AttributeName Workload -AttributeValue Standard 4 | Get-SFVolume Cluster01-2 | Set-SFVolumeAttribute -AttributeName Workload -AttributeValue Standard 5 | Get-SFVolume Cluster01-3 | Set-SFVolumeAttribute -AttributeName Workload -AttributeValue MySQLDB 6 | Get-SFVolume Cluster01-4 | Set-SFVolumeAttribute -AttributeName Workload -AttributeValue SQLDB 7 | -------------------------------------------------------------------------------- /Sample Scripts - Nodes.ps1: -------------------------------------------------------------------------------- 1 | #Identify the Master Node in the Cluster 2 | Get-SFClusterMasterNodeID 3 | 4 | #Get Name and info about the Cluster Master Node 5 | Get-SFClusterMasterNodeID | Get-SFNode 6 | 7 | #Get Listing of all of the Nodes 8 | Get-SFNode 9 | 10 | #List Nodes and software version 11 | Get-SFNode | Select Name, NodeID, SoftwareVersion 12 | 13 | #Get platform info for a single node 14 | $node = Get-SFNode | Select -first 1 15 | $node.PlatformInfo | fl 16 | 17 | -------------------------------------------------------------------------------- /Sample Scripts - Volume Access Groups.ps1: -------------------------------------------------------------------------------- 1 | # Display Volume Names in Volume Access Group 2 | 3 | Get-SFVolumeAccessGroup -VolumeAccessGroupName 'name' | Get-SFVolume 4 | 5 | 6 | # Display InitiatorIQNs for each VolumeAccessGroup 7 | $result = @() 8 | $vags = Get-SFVolumeAccessGroup 9 | foreach($vag in $vags){ 10 | $initiators = $vag.Initiators 11 | foreach($init in $initiators){ 12 | $object = New-Object -TypeName PSObject -Property @{ 13 | Name = $vag.VolumeAccessGroupName 14 | Initiator = $init 15 | } 16 | $result += $object 17 | } 18 | } 19 | $result | Sort VolumeAccessGroupName 20 | 21 | 22 | # Add volume(s) to Volume Access Group 23 | Get-SFVolume "vol1","vol2" | Add-SFVolumeToVolumeAccessGroup -VolumeAccessGroupID 1 24 | 25 | -------------------------------------------------------------------------------- /Sample Scripts - Volumes.ps1: -------------------------------------------------------------------------------- 1 | # Display Volume Name and Volume size in GB 2 | Get-SFVolume | Select Name, @{N='TotalSizeGB';E={[math]::Round($_.TotalSize/1GB*(1/0.9313),1) }} 3 | 4 | # Display Volume Name and QoS information 5 | Get-SFVolume | Select Name, @{N='MinIOPS';E={$_.QoS.MinIOPS}}, @{N='MaxIOPS';E={$_.QoS.MaxIOPS}}, @{N='BurstIOPS';E={$_.QoS.BurstIOPS}} 6 | 7 | # Display the Name, IQN, SCSI NAA 8 | Get-SFVolume | Select Name, IQN, ScsiNAADeviceID 9 | 10 | # Display Volumes for an Account or list of accounts or accountIDs 11 | $accounts = "Josh","Aaron" 12 | $accounts | Get-SFAccount | Get-SFVolume 13 | # or 14 | $accountids = 5,6,7 15 | Get-SFVolume -AccountID $accountids 16 | 17 | 18 | # Display the VolumeAccessGroups each volume is assigned 19 | $result = @() 20 | $volumes = Get-SFVolume 21 | foreach($vol in $volumes){ 22 | $volaccessgroups = $vol.VolumeAccessGroups 23 | foreach($vagID in $volaccessgroups){ 24 | $vag = Get-SFVolumeAccessGroup $vagID 25 | # Store Volume Access Group data in object 26 | $object = New-Object -TypeName PSObject -Property @{ 27 | Name = $vol.Name 28 | VolumeAccessGroupName = $vag.VolumeAccessGroupName 29 | } 30 | $result += $object 31 | } 32 | } 33 | $result | Sort Name 34 | 35 | # Set Attribute 36 | # !!!! Note !!! Doing it this way will OVERWRITE your attributes for the volume. 37 | # We recommend using the Set-SFVolumeAttribute function in the SPBM module for modifying volume attributes. 38 | 39 | $attribute = @{"Workload" = "Standard"} 40 | Get-SFVolume Dev* | Set-SFVolume -Attributes $attribute 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /SolidFire-Function-Template.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/SolidFire-Function-Template.ps1 -------------------------------------------------------------------------------- /VMware/Add-SolidFire-Volume-To-VMware.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | A more complete script is available in the New-TenantOrCluster function. 3 | 4 | This script file contains elements that can be used for connecting SolidFire volumes to a VMware vSphere environment. 5 | 6 | This is NOT an end to end script with logic, error-handling, and full capabilities. 7 | 8 | The contents in this script serves to provide examples of cmdlets required to connect SolidFire volumes to vSphere. 9 | 10 | - Script will connect to both VMware and SF environments. 11 | - Creates an account 12 | - Creates some volumes 13 | - Gets ESXi iSCSI initiator IQNs 14 | - Creates volume access group with initiators and volumes 15 | - Checks for the new targets 16 | - Creates VMware datastores based on the SF volume name 17 | - Rescans the HBAs. 18 | #> 19 | 20 | #Connect to SF Cluster 21 | 22 | Connect-SFCluster -Target clusterMVIP -UserName admin -ClearPassword pass 23 | 24 | #Connect to vCenter 25 | 26 | Connect-VIServer -Server vcenter -User root -Password pass 27 | 28 | #Create an Account 29 | 30 | New-SFAccount -UserName PoshTest 31 | 32 | $account = Get-SFAccount PoshTest 33 | 34 | # Create a Volume 35 | 36 | New-SFVolume -Name TestDefaultQoS -AccountID $account.AccountID -TotalSize 200 -GB -Enable512e:$true 37 | 38 | New-SFVolume -Name TestSetQoS -AccountID $account.AccountID -TotalSize 200 -GB -Enable512e:$true -MinIOPS 1000 -MaxIOPS 2000 -BurstIOPS 3000 39 | 40 | 41 | # Get Volumes 42 | 43 | $volumes = Get-SFVolume Test* 44 | 45 | # Get list of ESXi host software initiator IQNs. 46 | # You can use Get-Cluster prior to Get-VMhost to reduce scope. 47 | 48 | $IQNs = Get-VMHost | Select name,@{n="IQN";e={$_.ExtensionData.Config.StorageDevice.HostBusAdapter.IscsiName}} 49 | 50 | 51 | # Create a Volume Access Group 52 | 53 | New-SFVolumeAccessGroup -Name TestGroup -Initiators $IQNs.IQN -VolumeIDs $volumes.VolumeID 54 | 55 | 56 | <# 57 | Use this if an existing volume access group 58 | Write-Host "Adding Volumes to Volume Access Group" -ForegroundColor Yellow 59 | $vag = Get-SFVolumeAccessGroup -VolumeAccessGroupName ESX-16 60 | $vag | Add-SFVolumeToVolumeAccessGroup -VolumeID $volumes.VolumeID 61 | #> 62 | 63 | # Check Target to hosts 64 | 65 | Write-Host "Showing ISCSI targets" -ForegroundColor Yellow 66 | Get-VMHost | Get-VMhostHba -Type IScsi | Get-IScsiHbaTarget 67 | 68 | # Add Target 69 | 70 | Write-Host "Adding iSCSI Targets" -ForegroundColor Yellow 71 | $SVIP = (Get-SFClusterInfo).Svip 72 | Get-VMhost | Get-VMHostHba -Type IScsi | New-IScsiHbaTarget -Address $SVIP -Port 3260 73 | 74 | # Check Target to hosts 75 | 76 | Write-Host "Showing ISCSI targets post Add" -ForegroundColor Yellow 77 | Get-VMHost | Get-VMhostHba -Type IScsi | Get-IScsiHbaTarget 78 | 79 | # Rescan HBAs 80 | 81 | Get-VMhost | Get-VMhostStorage -RescanAllHba -RescanVMFs 82 | 83 | 84 | # Create Datastore 85 | 86 | $vmhost = Get-VMhost | Select -First 1 87 | foreach($volume in $volumes){ 88 | $canonicalname = "naa." + $volume.ScsiNAADeviceID 89 | New-Datastore -VMhost $vmhost -Name $volume.VolumeName -Path $canonicalname -Vmfs -FileSystemVersion 5 90 | } 91 | 92 | 93 | # Rescan HBAs 94 | 95 | Get-VMhost | Get-VMhostStorage -RescanAllHba -RescanVMFs 96 | -------------------------------------------------------------------------------- /VMware/ESXi-Host-to-VolumeAccessGroup-Mapping.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/VMware/ESXi-Host-to-VolumeAccessGroup-Mapping.ps1 -------------------------------------------------------------------------------- /VMware/Get-SFVMwareBestPractices.ps1: -------------------------------------------------------------------------------- 1 | Function Get-SFVMwareBestPractices { 2 | <# 3 | .Synopsis 4 | 5 | Collects ESXi host configuration information with respect to SolidFire recommended configurations. Organized by ESXi host object 6 | 7 | .Description 8 | Collects ESXi host configuration information with respect to SolidFire recommended configurations. 9 | 10 | Options included in script. 11 | 1 | Increase  MaxHWTransferSize size from 4MB to 16MB !!! only for Nitrogen 12 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 13 | 3 | Set Queue Depth for Software iSCSI initiator to 256 14 | 4 | Turn Off DelayedAck for Random Workloads !!! Only for throughput heavy workloads or latency senstive applications 15 | 5 | Create Custom SATP Rule for SolidFire 16 | 17 | .Parameter VMHost 18 | 19 | Represents a VMware vSphere ESXi host 20 | 21 | .Parameter Configuration 22 | 23 | Allows user to specify the configurations they would like to Query 24 | 25 | .Example 26 | 27 | Get-VMHost | Get-SFVMwareBestPractices 28 | 29 | Returns all configurations for all ESXi hosts. 30 | 31 | .Example 32 | 33 | Get-VMHost esxi6-prod-01 | Get-SFVMwareBestPractices -Configuration 1 34 | 35 | Returns the first configuration information for a single ESXi host. 36 | 37 | 38 | .Link 39 | http://www.github.com/solidfire/powershell 40 | 41 | .Notes 42 | 43 | ==================================================================== 44 | Disclaimer: This script is written as best effort and provides no 45 | warranty expressed or implied. Please contact the author(s) if you 46 | have questions about this script before running or modifying 47 | ==================================================================== 48 | #> 49 | [CmdletBinding(ConfirmImpact="Low")] 50 | param( 51 | [Parameter( 52 | ValueFromPipeline=$true, 53 | Position=0, 54 | Mandatory=$True, 55 | HelpMessage="Enter the ESXi Host.")] 56 | [VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost[]] 57 | $vmhost, 58 | [Parameter( 59 | Position=2, 60 | Mandatory=$False, 61 | HelpMessage="Enter the SolidFire configurations to check. Use Get-Help to see available options." 62 | )] 63 | $configuration = "all" 64 | 65 | ) 66 | 67 | Begin{ 68 | # Validate that there is an active connection to a vCenter server 69 | If(!($defaultviserver)){ 70 | Write-Output "No vCenter Server is available with this session" 71 | Break 72 | } 73 | } 74 | 75 | Process{ 76 | 77 | $esxcli = Get-EsxCli -VMHost $vmhost 78 | 79 | 80 | 81 | 82 | ################### 83 | # 1 - Max HW Transfer Size 84 | ################### 85 | 86 | if($configuration -contains 1 -or $configuration -eq "all"){ 87 | Write-Verbose "Collecting Max HW Transfer Size" 88 | 89 | #$maxHWTransferSize = $vmhost | Get-AdvancedSetting -Name "DataMover.MaxHWTransferSize" | Select Value 90 | 91 | $vmhost | Select Name,@{N="MaxHWTransferSize";E={($_ | Get-AdvancedSetting -Name "DataMover.MaxHWTransferSize").Value }} | Format-Table -AutoSize 92 | 93 | #Write-Host $vmhost.Name " | " $maxHWTransferSize.Value 94 | } 95 | 96 | ################### 97 | # 2 - DSNRO 98 | # No of outstanding IOs with competing worlds: 32 99 | ################### 100 | 101 | if($configuration -contains 2 -or $configuration -eq "all"){ 102 | Write-Verbose "Collecting Number of outstanding IOs with competing worlds" 103 | $devices = $vmhost | Get-ScsiLun | Where{$_.Vendor -match "SolidFir"} 104 | $devices | Select VMHost, CanonicalName, @{N="NoOf";E={($esxcli.storage.core.device.list($_.CanonicalName)).NoofoutstandingIOswithcompetingworlds}} | Format-Table -AutoSize 105 | } 106 | 107 | ################### 108 | # 3 - Queue Depth 109 | ################### 110 | 111 | if($configuration -contains 3 -or $configuration -eq "all"){ 112 | Write-Verbose "Collecting Queue Depth" 113 | $esxcli.system.module.parameters.list("iscsi_vmk") | Where{$_.Name -eq "iscsivmk_LunQDepth"} | Select Name,Value | Format-Table -AutoSize 114 | #Write-Host $vmhost.Name $qdepth.Name $qdepth.Value 115 | } 116 | 117 | 118 | ################### 119 | # 4 - Delayed Ack 120 | ################### 121 | 122 | if($configuration -contains 4 -or $configuration -eq "all"){ 123 | Write-Verbose "Collecting Delayed Ack" 124 | Write-Host $vmhost.Name 125 | $adapterID = $vmhost.ExtensionData.config.StorageDevice.HostBusAdapter | Where{$_.Model -match "iSCSI"} 126 | foreach($adapter in $adapterID){ 127 | $esxcli.iscsi.adapter.param.get($adapter.device) | Where{$_.Name -eq "DelayedACK"} | Select ID, Current 128 | } 129 | } 130 | 131 | ################### 132 | # 5 - SATP 133 | ################### 134 | if($configuration -contains 5 -or $configuration -eq "all"){ 135 | Write-Verbose "Collecting SATP Info" 136 | $esxcli.storage.nmp.satp.rule.list() | Where{$_.Vendor -eq "SolidFir"} 137 | } 138 | 139 | } 140 | } -------------------------------------------------------------------------------- /VMware/New-TenantOrCluster.ps1: -------------------------------------------------------------------------------- 1 | function New-TenantOrCluster{ 2 | <# 3 | .Synopsis 4 | 5 | Creates all components necessary to populate SolidFire storage on a new cluster. 6 | 7 | .Description 8 | Creates all components necessary to populate SolidFire storage on a new cluster. Not all conditions are managed in this script. 9 | Modifications may need to be made in your environment based on your vSphere configurations. 10 | 11 | Creates Account 12 | Creates Volumes 13 | Creates VolumeAccess Groups 14 | Collects ESXi host IQNs. 15 | Adds IQNs and Volumes to VolumeAccessGroup 16 | Creates iSCSI Targets on ESXi host iSCSI HBA 17 | Rescans HBA 18 | Creates Datastores based on Volume name in the vSphere Cluster 19 | 20 | .Parameter Cluster 21 | 22 | Represents a vSphere cluster where the volumes should be added. 23 | 24 | .Parameter qtyVolumes 25 | 26 | The number of volumes that need to be added to the cluster. 27 | 28 | .Parameter StartingNumber 29 | 30 | The first number that should be represented in the range for the new volumes. 31 | 32 | .Parameter sizeGB 33 | 34 | Size of each new volume in GB. 35 | 36 | .Parameter Tenant 37 | 38 | Name of tenant to be used as account name. 39 | 40 | .Parameter min 41 | 42 | Minimum IOPs value. 43 | 44 | .Parameter max 45 | 46 | Minimum IOPs value. 47 | 48 | .Parameter burst 49 | 50 | Minimum IOPs value. 51 | 52 | .Parameter InitiatorSecret 53 | 54 | Custom initiator secret for the account. Must be between 12 and 16 characters in length. 55 | 56 | .Parameter TargetSecret 57 | 58 | Custom target secret for the account. Must be between 12 and 16 characters in length. 59 | 60 | .Example 61 | 62 | New-TenantOrCluster -Cluster Cluster02 -qtyVolumes 4 -sizeGB 1024 -min 1000 -max 1200 -burst 2000 63 | 64 | Basic usage of the New-TenantOrCluster function to deploy 4 volumes. 65 | 66 | .Example 67 | 68 | New-TenantOrCluster -Cluster Cluster02 -Tenant DeveloperA -qtyVolumes 4 -sizeGB 1024 -min 1000 -max 1200 -burst 2000 69 | 70 | Creates volumes for an account based on Tenant name to specified cluster. 71 | 72 | .Example 73 | 74 | New-TenantOrCluster -Cluster Cluster01 -Tenant Engineering -InitiatorSecret sdl29sl19sdk -TargetSecret e9dlxwps8c!s -qtyVolumes 10 -StartingNumber 11 -sizeGB 2048 -min 3000 -max 4000 -burst 6000 75 | 76 | Creates volumes for an account based on Tenant name to specified cluster. Custom Target and Initiator secrets are provided and a starting volume number provided. 77 | Specifically useful when adding additional volumes to existing cluster or tenant. 78 | 79 | .Link 80 | http://www.github.com/solidfire/powershell 81 | 82 | .Notes 83 | 84 | ==================================================================== 85 | Disclaimer: This script is written as best effort and provides no 86 | warranty expressed or implied. Please contact the author(s) if you 87 | have questions about this script before running or modifying 88 | ==================================================================== 89 | #> 90 | param( 91 | [Parameter( 92 | ValueFromPipeline=$true, 93 | Position=0, 94 | Mandatory=$true)] 95 | $Cluster, 96 | [Parameter( 97 | Position=1, 98 | Mandatory=$true, 99 | HelpMessage="Enter quantity of Volumes." 100 | )] 101 | [Int]$qtyVolumes, 102 | [Parameter( 103 | Position=2, 104 | Mandatory=$True, 105 | HelpMessage="Enter the size of volumes in GB." 106 | )] 107 | [Int]$sizeGB, 108 | [Parameter(Mandatory=$false)] 109 | [String]$Tenant, 110 | [Parameter(Mandatory=$false)] 111 | [Int]$StartingNumber=0, 112 | [Parameter(Mandatory=$true)] 113 | [Int]$min, 114 | [Parameter(Mandatory=$true)] 115 | [Int]$max, 116 | [Parameter(Mandatory=$true)] 117 | [Int]$burst, 118 | [Parameter(Mandatory=$false, 119 | ParameterSetName='CustomSecrets')] 120 | [ValidateLength(12,16)] 121 | [String]$InitiatorSecret="", 122 | [Parameter(Mandatory=$false, 123 | ParameterSetName='CustomSecrets')] 124 | [ValidateLength(12,16)] 125 | [String]$TargetSecret="" 126 | 127 | ) 128 | 129 | # Choose tenant name for account name if specified. Otherwise use Cluster name for account. 130 | If($tenant -ne ""){ 131 | $accountname = $Tenant 132 | }Else{ 133 | $accountname = $Cluster 134 | } 135 | 136 | ################### 137 | # Account creation 138 | ################### 139 | 140 | # Check if account exists. If not then the account is created. 141 | If(!(Get-SFAccount $accountname -ErrorAction SilentlyContinue)){ 142 | # Create the account for the cluster/tenant 143 | Write-Verbose "Creating the account $($accountname)" 144 | 145 | if($initiatorSecret -or $targetSecret -eq ""){ 146 | New-SFAccount -UserName $accountname 147 | }Else{ 148 | New-SFAccount -UserName $accountname -InitiatorSecret $initiatorSecret -TargetSecret $targetSecret 149 | } 150 | Write-Verbose "Creating the account $($accountname) complete" 151 | } 152 | 153 | ################# 154 | # Create Volumes 155 | ################# 156 | 157 | Write-Verbose "Creating the volumes" 158 | 159 | # Create numeric range based on provided values for volume numbering. 160 | If($StartingNumber -ne 0){ 161 | $lastnumber = $StartingNumber + ($qtyVolumes - 1) 162 | $volnumbers = $StartingNumber..$lastnumber 163 | }Else{ 164 | $volnumbers = 1..$($qtyVolumes) 165 | } 166 | 167 | # Ensure that all of the volumes are numerically consistent. Places a '0' before volumes 1-9. i.e. 01-09 168 | $volnumbers = $volnumbers | %{$_.ToString("00")} 169 | 170 | $volnumbers | %{New-SFVolume -Name ("$accountname-$_") -AccountID (Get-SFAccount $accountname).AccountID -TotalSize $sizeGB -GB -Enable512e:$true -MinIOPS $min -MaxIOPS $max -BurstIOPS $burst} 171 | 172 | Write-Verbose "Creating the volumes complete" 173 | 174 | $volumes = $volnumbers | %{Get-SFVolume -Name ("$accountname-$_")} 175 | 176 | 177 | ############################################# 178 | # Create Volume Access Group and Add volumes 179 | ############################################# 180 | 181 | Write-Verbose "Creating the volume access group $($Cluster)" 182 | 183 | If(!(Get-SFVolumeAccessGroup -Name $Cluster -ErrorAction SilentlyContinue)){ 184 | 185 | New-SFVolumeAccessGroup -Name $Cluster -VolumeIDs $volumes.VolumeID 186 | 187 | Write-Verbose "Creating the volume access group $($Cluster) complete" 188 | 189 | }Else{ 190 | Write-Verbose "Adding volumes to existing volume access group $($Cluster)" 191 | $volumes | Add-SFVolumeToVolumeAccessGroup -VolumeAccessGroupID (Get-SFVolumeAccessGroup $Cluster).VolumeAccessGroupID 192 | Write-Verbose "Adding volumes to existing volume access group $($Cluster) complete" 193 | } 194 | 195 | # Collects cluster's SVIP dynamically 196 | $SVIP = (Get-SFClusterInfo).Svip 197 | 198 | # Collect all of the ESXi hosts in the cluster that will connect to the volumes in the access group 199 | $vmhosts = Get-Cluster $cluster | Get-VMHost 200 | 201 | # Validate whether the ESXi host already has the SVIP as a send target on the iSCSI HBA Adapter. 202 | foreach($vmhost in $vmhosts){ 203 | If(!($vmhost | Get-VMHostHba -Type IScsi | Get-IScsiHbaTarget | Where{$_.Address -eq $SVIP -and $_.Type -eq "Send"})){ 204 | Write-Verbose "Adding the SolidFire SVIP $($SVIP) as a target" 205 | $vmhost | Get-VMHostHba -Type IScsi | New-IScsiHbaTarget -Address $SVIP -Port 3260 206 | # Add iSCSI Target on each VMhost 207 | Write-Verbose "Adding the SolidFire SVIP $($SVIP) as a target complete" 208 | }Else{ 209 | Write-Verbose "SolidFire SVIP $($SVIP) is already present" 210 | } 211 | } 212 | 213 | ################################### 214 | # Add IQNs to Volume Access Group 215 | ################################### 216 | $vid = (Get-SFVolumeAccessGroup $Cluster).VolumeAccessGroupID 217 | # Collect IQNs for each host iSCSI adapater 218 | $IQNs = $vmhosts | Select name,@{n="IQN";e={$_.ExtensionData.Config.StorageDevice.HostBusAdapter.IscsiName}} 219 | 220 | 221 | ForEach($IQN in $IQNs){ 222 | If((Get-SFVolumeAccessGroup -VolumeAccessGroupID $vid | Select -ExpandProperty Initiators) -notcontains $IQN.IQN){ 223 | Write-Verbose "Adding the ESXi host IQN $($IQN.IQN) to the Volume Access Group" 224 | 225 | $IQN | Add-SFInitiatorToVolumeAccessGroup -VolumeAccessGroupID $vid -Initiators $_.IQN 226 | # Note: % is PowerShell for forEach 227 | 228 | Write-Verbose "Adding the ESXi host IQNs to the Volume Access Group Complete" 229 | 230 | }Else{ 231 | Write-Verbose "The IQN $($IQN.IQN) is already Present in the Volume Access Group" 232 | } 233 | 234 | } 235 | 236 | 237 | # Rescan all of the HBAs so that the storage devices can be seen. 238 | Write-Verbose "Rescanning the HBAs to identify storage devices" 239 | 240 | # Collect Host information from Cluster (One Host required to add storage in cluster) 241 | $vmhost = $vmhosts | select -First 1 242 | 243 | $vmhosts | Get-VMhostStorage -RescanAllHba 244 | 245 | 246 | ################################### 247 | # Creating Datastores on ESXi Host 248 | ################################### 249 | 250 | 251 | Write-Verbose "Creating the new datastores on ESXi host $($vmhost.Name)" 252 | 253 | foreach($volume in $volumes){ 254 | $canonicalname = "naa." + $volume.ScsiNAADeviceID 255 | New-Datastore -VMhost $vmhost -Name $volume.Name -Path $canonicalname -Vmfs -FileSystemVersion 5 256 | } 257 | Write-Verbose "Creating the new datastores on ESXi host $($vmhost.Name) Complete" 258 | 259 | 260 | # Rescan HBAs 261 | Write-Verbose "Rescanning the HBAs to connect all datastores" 262 | 263 | $vmhosts | Get-VMhostStorage -RescanAllHba -RescanVMFs 264 | Write-Verbose "Rescan Complete" 265 | } 266 | -------------------------------------------------------------------------------- /VMware/PowerActions/Get-Volume-Access-Group-PowerAction.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Get_Volume_Access_Group 3 | 4 | .NOTES Author: Josh Atwell @josh_atwell 5 | 6 | .Label 7 | Identifies the SolidFire Volume Access Group the ESXi host is connected. 8 | 9 | .Description 10 | Identifies the SolidFire Volume Access Group the ESXi host is connected. 11 | 12 | #> 13 | 14 | param 15 | ( 16 | [Parameter(Mandatory=$true)] 17 | [VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost[]] 18 | $vhosts, 19 | [Parameter(Mandatory=$true)] 20 | $sfcluster 21 | ); 22 | 23 | If(!(Get-Module SolidFire)){ 24 | Import-Module SolidFire | Out-Null 25 | } 26 | $cred = Get-Credential 27 | Connect-SFCluster -Target $sfcluster -Credential $cred | Out-Null 28 | foreach($vhost in $vhosts){ 29 | $IQNs = $vhost | Select name,@{n="IQN";e={$_.ExtensionData.Config.StorageDevice.HostBusAdapter.IscsiName}} 30 | 31 | $output = @() 32 | foreach($vmhost in $IQNs){ 33 | foreach($iqn in $vmhost.IQN){ 34 | $vag = Get-SFVolumeAccessGroup | Where{$_.Initiators -match $iqn} 35 | 36 | $a = New-Object System.Object 37 | $a | Add-Member -Type NoteProperty -Name VMhost -Value $vmhost.Name 38 | If($vag -eq $null){ 39 | $a | Add-Member -Type NoteProperty -Name VolumeAccessGroup -Value "Unassociated" 40 | }Else{ 41 | $a | Add-Member -Type NoteProperty -Name VolumeAccessGroup -Value $vag.VolumeAccessGroupName 42 | } 43 | $a | Add-Member -Type NoteProperty -Name IQN -Value $vmhost.IQN 44 | 45 | $output += $a 46 | Write-Host "ESXi Host | Volume Access Group | Host IQN" 47 | Write-Host "$($a.VMHost) | $($a.VolumeAccessGroup) | $($a.IQN)" 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /VMware/PowerActions/Get-iSCSI-Adapter-Queue-Depth-PowerAction.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Get_Queue_Depth 3 | 4 | .NOTES Author: Josh Atwell @josh_atwell 5 | 6 | .Label 7 | Get iSCSI adapter Queue Depth 8 | 9 | .Description 10 | Reports the Queue Depth settings for iSCSI adapters 11 | #> 12 | 13 | param 14 | ( 15 | [Parameter(Mandatory=$true)] 16 | [VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost[]] 17 | $vParam 18 | ); 19 | 20 | foreach($vmhost in $vParam){ 21 | $esxcli = Get-EsxCli -VMhost $vmhost 22 | $result = $esxcli.system.module.parameters.list("iscsi_vmk") | Where{$_.Name -eq "iscsivmk_LunQDepth"} 23 | Write-Host "$($result.Description) for $vmhost is set to $($result.Value)" 24 | } -------------------------------------------------------------------------------- /VMware/PowerActions/Set-QoS-on-Datastore-PowerAction.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Set QoS on Datastore 3 | 4 | .NOTES Author: Josh Atwell @josh_atwell 5 | 6 | .Label 7 | Sets QoS on the SolidFire Volume related to the selected datastore. 8 | 9 | .Description 10 | Sets QoS on the SolidFire Volume related to the selected datastore. 11 | 12 | ==================================================================== 13 | Disclaimer: This script is written as best effort and provides no 14 | warranty expressed or implied. Please contact the author(s) if you 15 | have questions about this script before running or modifying 16 | ==================================================================== 17 | #> 18 | 19 | param 20 | ( 21 | [Parameter(Mandatory=$true)] 22 | [VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.Datastore] 23 | $vParam, 24 | [Parameter(Mandatory=$true)] 25 | $cluster, 26 | [Parameter(Mandatory=$true)] 27 | $minIOPs, 28 | [Parameter(Mandatory=$true)] 29 | $maxIOPs, 30 | [Parameter(Mandatory=$true)] 31 | $burstIOPs 32 | 33 | ); 34 | Import-Module SolidFire | Out-Null 35 | $cred = Get-Credential 36 | Connect-SFCluster -Target $cluster -Credential $cred | Out-Null 37 | If($sfconnection -eq $null){ 38 | Write-Host "Connection to cluster failed" 39 | break 40 | } 41 | 42 | $scsiID = ((Get-ScsiLun -Datastore $vParam).CanonicalName).Split(".")[1] 43 | $volume = Get-SFVolume | Where{$_.ScsiNAADeviceID -eq $scsiID} 44 | Set-SFVolume -VolumeID $volume.VolumeID -MinIOPS $minIOPs -MaxIOPS $maxIOPs -BurstIOPS $burstIOPs -Confirm:$false | Out-Null 45 | Write-Host "QoS on Volume $($volume.name) was updated | $minIOPs / $maxIOPs / $burstIOPs" -------------------------------------------------------------------------------- /VMware/PowerActions/Set-SFVolumeAttribute-PowerAction.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Set Attribute on SolidFire Volume 3 | 4 | .NOTES Author: Josh Atwell @josh_atwell 5 | 6 | .Label 7 | Sets volume attributes on the SolidFire volume that supports the selected datastore(s). 8 | 9 | .Description 10 | Sets volume attributes on the SolidFire volume that supports the selected datastore(s). 11 | This can be leveraged to assist in dynamic SPBM policy creation and management. 12 | 13 | ==================================================================== 14 | Disclaimer: This script is written as best effort and provides no 15 | warranty expressed or implied. Please contact the author(s) if you 16 | have questions about this script before running or modifying 17 | ==================================================================== 18 | #> 19 | 20 | param 21 | ( 22 | [Parameter(Mandatory=$true)] 23 | [VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.Datastore[]] 24 | $vParam, 25 | [Parameter(Mandatory=$true)] 26 | $Cluster, 27 | [Parameter(Mandatory=$true)] 28 | $AttributeName, 29 | [Parameter(Mandatory=$true)] 30 | $AttributeValue 31 | ); 32 | Import-Module SolidFire | Out-Null 33 | Import-Module "C:\Program Files\WindowsPowerShell\Modules\SolidFire\SolidFire-SPBM.psm1" | Out-Null 34 | 35 | $sfcred = Get-Credential 36 | 37 | Connect-SFCluster -Target $cluster -Credential $sfcred | Out-Null 38 | 39 | foreach($datastore in $vParam){ 40 | 41 | $scsiID = ((Get-ScsiLun -Datastore $datastore).CanonicalName).Split(".")[1] 42 | $volume = Get-SFVolume | Where{$_.ScsiNAADeviceID -eq $scsiID} 43 | $volume | Set-SFVolumeAttribute -AttributeName $AttributeName -AttributeValue $AttributeValue | Out-Null 44 | 45 | Write-Host "$($datastore.name) updated with $AttributeName value set to $AttributeValue" 46 | 47 | } -------------------------------------------------------------------------------- /VMware/PowerActions/SolidFire-VMware-Best-Practices-PowerAction.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Set_VMware_Best_Practices 3 | 4 | .NOTES Author: Josh Atwell @josh_atwell 5 | 6 | .Label 7 | This script simplifies implementation of recommended configurations for VMware environments 8 | PLEASE READ ALL SCRIPT BLOCKS! 9 | 10 | .Description 11 | ==================================================================== 12 | | Disclaimer: | 13 | | This script is written as best effort and provides no warranty | 14 | | expressed or implied. Please contact SolidFire support if you | 15 | | have questions about this script before running or modifying. | 16 | ==================================================================== 17 | 18 | 19 | #> 20 | 21 | 22 | param( 23 | [Parameter(Mandatory=$true)] 24 | [VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost[]] 25 | $vmhosts, 26 | [Parameter(Madatory=$true)] 27 | $apply 28 | ); 29 | 30 | 31 | $Confirm = $false 32 | $verbose = $false 33 | 34 | 35 | 36 | ###### 3. Options to Apply ###### 37 | <# Beneath this section choose the components that you want to include. 38 | 39 | Options included in script. 40 | 1 | Increase  MaxHWTransferSize size from 4MB to 16MB !!! only for Nitrogen 41 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 42 | 3 | Set Queue Depth for Software iSCSI initiator to 256 43 | 4 | Turn Off DelayedAck for Random Workloads !!! Only for throughput heavy workloads or latency senstive applications 44 | 5 | Create Custom SATP Rule for SolidFire 45 | 46 | 47 | Use if you need to include only specific settings. 48 | Must be comma-separated or all 49 | 50 | Examples 51 | $apply = 2,3,5 52 | $apply = "all" 53 | #> 54 | 55 | 56 | ####### The Script blocks ####### 57 | if($verbose = $true){ 58 | Write-Host " 59 | ______________ ___ 60 | /__/__\__\__\__\ ___/__/ 61 | /_ /__/_\__\__\__\ ___/__/__/ 62 | /__/__/__/\__\__\__\/__/__/__/ 63 | /__/__/__/ \__\__\__\_/__/__/ 64 | /__/__/ \__\__\__\__/__/ 65 | /__/ \__\__\__\/__/ 66 | Fueled By SolidFire 67 | 68 | SolidFire VMware Configuration 69 | Implementation Script 70 | " 71 | } 72 | 73 | ######### Begin Block 1 | MaxHWTransferSize #################### 74 | if($apply -contains 1 -or $apply -eq "all"){ 75 | 76 | if($verbose = $true){ 77 | Write-Host "Increasing MaxHWTransferSize size from 4MB to 16MB" 78 | } 79 | <# 80 | 1 | Increase MaxHWTransferSize size from 4MB to 16MB (only for Nitrogen) 81 | 82 | Default value is 4MB 83 | SolidFire recommended value is 16MB 84 | 85 | Per ESXi Host Setting 86 | 87 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 88 | !!! Only applied for Nitrogen release and later !!! 89 | !!! This setting will result in poor xcopy and write-same offload in Carbon !!! 90 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 91 | 92 | Alternate method of implementation: 93 | esxcfg-advcfg -s 16384 /DataMover/MaxHWTransferSize 94 | or  95 | esxcli system settings advanced set -i 16384 -o /DataMover/MaxHWTransferSize 96 | #> 97 | 98 | foreach ($esx in $vmhosts){ 99 | 100 | $esx | Get-AdvancedSetting -Name "DataMover.MaxHWTransferSize" | Set-AdvancedSetting -Value 16384 -Confirm:$($Confirm) 101 | 102 | # Output completion to screen if $verbose = $true 103 | if($verbose = $true){ 104 | Write-Host ("MaxHWTransferSize size set to 16MB for " + $esx.name) 105 | } 106 | } 107 | } 108 | ##################### End Block 1 #################################### 109 | 110 | ######### Begin Block 2 | DSNRO ################################ 111 | if($apply -contains 2 -or $apply -eq "all"){ 112 | if($verbose = $true){ 113 | Write-Host "Setting DSNRO to 64" 114 | } 115 | <# 116 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 117 | 118 | Only applied to SolidFire devices 119 | 120 | Default value is 32 121 | Max value is 256 122 | SolidFire recommended value is 64 123 | Set $dsnro to your preferred value if you want something other than 64 124 | 125 | Alternate method of implementation: 126 | esxcli storage core device set -d naa.xxxx -O 64 127 | #> 128 | 129 | $dsnro = 64 130 | foreach ($esx in $vmhosts) 131 | { 132 |     $esxcli=get-esxcli -VMHost $esx 133 |     $devices = $esx | Get-ScsiLun | Where{$_.Vendor -match "SolidFir"} 134 |     foreach ($device in $devices) 135 |     { 136 | If($esx.Version.Split(".")[0] -ge "6"){ 137 | #vSphere 6.x hosts or greater 138 | $esxcli.storage.core.device.set($null, $null, $device.CanonicalName, $null, $null, $null, $null, $null, $null, $null, $null, $dsnro, $null, $null) 139 | }else{ 140 | #vSphere 5.x hosts 141 | $esxcli.storage.core.device.set($null, $device.CanonicalName, $null, $null, $null, $null, $null, $dsnro, $null) 142 | } 143 |     144 | # Output completion to screen if $verbose = $true 145 | if($verbose = $true){ 146 | Write-Host ("DSNRO for " + $device.CanonicalName + " on host " + $esx.name + " set to " + $dsnro) 147 | } 148 | } 149 | } 150 | } 151 | ##################### End Block 2 #################################### 152 | 153 | ######### Begin Block 3 | Queue Depth ########################## 154 | if($apply -contains 3 -or $apply -eq "all"){ 155 | if($verbose = $true){ 156 | Write-Host "Setting Queue Depth for Software iSCSI initiators to 256" 157 | } 158 | <# 159 | 3 | Set Queue Depth for Software iSCSI initiator to 256 160 | 161 | Default value is 128 162 | SolidFire recommended value is 256 163 | 164 | Alternate method of implementation: 165 | esxcli system module parameters set -m iscsi_vmk -p iscsivmk_LunQDepth=256 166 | #> 167 | 168 | foreach ($esx in $vmhosts){ 169 | $esxcli = get-esxcli -VMHost $esx 170 | 171 | 172 | If($esx.Version.Split(".")[0] -ge "6"){ 173 | #vSphere 6.x hosts or greater 174 | $esxcli.system.module.parameters.set($null, $null,"iscsi_vmk","iscsivmk_LunQDepth=256") 175 | }else{ 176 | #vSphere 5.x command 177 | $esxcli.system.module.parameters.set($null,"iscsi_vmk","iscsivmk_LunQDepth=256") 178 | } 179 | 180 | $esxcli.system.module.parameters.list("iscsi_vmk") | Where{$_.Name -eq "iscsivmk_LunQDepth"} 181 | 182 | # Output completion to screen if $verbose = $true 183 | if($verbose = $true){ 184 | Write-Host ("Queue depth for " + $esx.Name + " set to 256") 185 | } 186 | } 187 | } 188 | ##################### End Block 3 #################################### 189 | 190 | 191 | ######### Begin Block 4 | DelayedAck ########################### 192 | if($apply -contains 4 -or $apply -eq "all"){ 193 | if($verbose = $true){ 194 | Write-Host "Turning off DelayedAck" 195 | } 196 | <# 197 | 4 | Turn Off DelayedAck for Random Workloads 198 | 199 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 200 | !!! Only for throughput heavy workload or latency senstive applications. !!! 201 | !!! This is a global ESXi host setting that applies to all software iSCSI !!! 202 | !!! initiator targets on the host. !!! 203 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 204 | 205 | Default application value is 1 (On) 206 | Modified application value is 0 (Off) 207 | 208 | Alternate method of implementation: 209 | vmkiscsi-tool vmhba38 -W -a delayed_ack=0 210 | 211 | NOTES from https://communities.vmware.com/message/1830738 212 | #> 213 | 214 | foreach($esx in $vmhosts){ 215 | $adapterID = $esx.ExtensionData.config.StorageDevice.HostBusAdapter | Where{$_.Model -match "iSCSI"} 216 | 217 | $esxcli.iscsi.adapter.param.set($adapterID.device, $null, "DelayedAck", "false") 218 | 219 | # Output completion to screen if $verbose = $true 220 | if($verbose = $true){ 221 | Write-Host ("DelayedAck turned off for " + $esx.name) 222 | } 223 | } 224 | } 225 | ##################### End Block 4 #################################### 226 | 227 | 228 | ######### Begin Block 5 | SATP Rule ############################ 229 | if($apply -contains 5 -or $apply -eq "all"){ 230 | if($verbose = $true){ 231 | Write-Host "Creating Custom SATP Rule" 232 | } 233 | <# 234 | 5 | Create Custom SATP Rule for SolidFire 235 | 236 | Alternate method of implementation: 237 | esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -P VMW_PSP_RR -O iops=“1” -V “SolidFir" -M “SSD SAN” -e “SolidFire custom SATP rule"  238 | 239 | add(boolean boot, string claimoption, string description, string device, string driver, boolean force, string model, string option, string psp, string pspoption, string satp, string 240 | transport, string type, string vendor) 241 | 242 | -s = The SATP for which a new rule will be added 243 | -P = Set the default PSP for the SATP claim rule 244 | -O = Set the PSP options for the SATP claim rule (option=string 245 | -V = Set the vendor string when adding SATP claim rules. Vendor/Model rules are mutually exclusive with driver rules (vendor=string) 246 | -M = Set the model string when adding SATP claim rule. 247 | -e = Claim rule description 248 | 249 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 250 | !!! When to reboot the host upon applying setting !!! 251 | !!! Reboot host if you have already presented SolidFire storage to the host !!! 252 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 253 | 254 | To remove the claim rule: 255 | $esxcli.storage.nmp.satp.rule.remove($false, $null, "SolidFire custom SATP rule", $null, $null, "SSD SAN", $null, "VMW_PSP_RR", "iops=10", "VMW_SATP_DEFAULT_AA", $null, $null, "SolidFir") 256 | #> 257 | 258 | #> 259 | foreach($esx in $vmhosts){ 260 | 261 | $esxcli = Get-Esxcli -VMHost $esx 262 | $esxcli.storage.nmp.satp.rule.add($false, $null, "SolidFire custom SATP rule", $null, $null, $true, "SSD SAN", $null, "VMW_PSP_RR", "iops=10", "VMW_SATP_DEFAULT_AA", $null, $null, "SolidFir") 263 | 264 | # Output completion to screen if $verbose = $true 265 | if($verbose = $true){ 266 | Write-Host ("Custom SATP rule created for " + $esx.name) 267 | } 268 | } 269 | 270 | <# Result Looks like: 271 | ClaimOptions : 272 | DefaultPSP : VMW_PSP_RR 273 | Description : SolidFire custom SATP rule 274 | Device : 275 | Driver : 276 | Model : SSD SAN 277 | Name : VMW_SATP_DEFAULT_AA 278 | Options : 279 | PSPOptions : iops='1' 280 | RuleGroup : user 281 | Transport : 282 | Vendor : SolidFir 283 | #> 284 | 285 | } 286 | ##################### End Block 5 #################################### -------------------------------------------------------------------------------- /VMware/Remove-SolidFire-Volume-From-VMware.ps1: -------------------------------------------------------------------------------- 1 | # Load Datastore Functions 2 | . "C:\Users\jatwell\Google Drive\Scripts\DatastoreFunctions.ps1" 3 | 4 | # Load SPBM Module since we'll use the Get-SVolumeFromDatastore function. 5 | Import-Module "C:\Users\jatwell\Documents\GitHub\PowerShell\SPBM\SolidFire-SPBM.psm1" 6 | 7 | 8 | # Collect datastore object that you wish to remove 9 | $datastore = Get-Datastore Engineering-02 10 | 11 | # Collect volume object for the selected datastore 12 | $volume = $datastore | Get-SFVolumeFromDatastore 13 | 14 | 15 | $datastore | Get-DatastoreMountInfo 16 | 17 | # Unmount the datastore 18 | $datastore | Unmount-Datastore 19 | 20 | # Check mount info for the datastore (optional) 21 | $datastore | Get-DatastoreMountInfo 22 | 23 | 24 | # Detach the datastore from ESXi host 25 | $datastore | Detach-Datastore 26 | 27 | # Remove the volume from the SolidFire System 28 | # This places the volume in the DeletedVolumes space 29 | $volume | Remove-SFVolume -Confirm:$false 30 | 31 | # Optional | Permanently remove volume from SolidFire system 32 | # This is a PERMANENT OPERATION! 33 | #Get-SFDeletedVolume | Remove-SFDeletedVolume -Confirm:$false -------------------------------------------------------------------------------- /VMware/Set-SFVMwareBestPractices.ps1: -------------------------------------------------------------------------------- 1 | Function Set-SFVMwareBestPractices{ 2 | <# 3 | .Synopsis 4 | 5 | Applies ESXi host configuration information with respect to SolidFire recommended configurations. Organized by ESXi host object 6 | 7 | .Description 8 | Applies ESXi host configuration information with respect to SolidFire recommended configurations. 9 | 10 | Options included in script. 11 | 1 | Increase  MaxHWTransferSize size from 4MB to 16MB !!! only for Nitrogen 12 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 13 | 3 | Set Queue Depth for Software iSCSI initiator to 256 14 | 4 | Turn Off DelayedAck for Random Workloads !!! Only for throughput heavy workloads or latency senstive applications 15 | 5 | Create Custom SATP Rule for SolidFire 16 | 17 | Requirements: 18 | 1. Active PowerCLI connection to a vCenter server or ESXi host 19 | 2. User must have privileges to make changes to advanced settings 20 | 3. Evaluation of each segment's configuration changes as it relatesto your environment. 21 | 22 | Not all recommendations apply to everyone 23 | 24 | PLEASE READ ALL SCRIPT BLOCKS! 25 | 26 | .Parameter VMHost 27 | 28 | Represents a VMware vSphere ESXi host where settings will be applied. 29 | 30 | .Parameter Configuration 31 | 32 | Allows user to specify the configurations they would like to Query 33 | 34 | .Example 35 | 36 | Get-VMHost | Set-SFVMwareBestPractices 37 | 38 | Sets all configurations for all ESXi hosts. 39 | 40 | .Example 41 | 42 | Get-VMHost esxi6-prod-01 | Set-SFVMwareBestPractices -Configuration 1 -MaxHWTransferSize 16384 43 | 44 | Sets the first configuration information for a single ESXi host. Optional value provided. 45 | 46 | 47 | .Link 48 | http://www.github.com/solidfire/powershell 49 | 50 | .Notes 51 | Authors: Josh Atwell | josh.atwell@soldifire.com 52 | Aaron Patten | aaron.patten@solidfire.com 53 | 54 | ==================================================================== 55 | | Disclaimer: | 56 | | This script is written as best effort and provides no warranty | 57 | | expressed or implied. Please contact SolidFire support if you | 58 | | have questions about this script before running or modifying. | 59 | ==================================================================== 60 | 61 | 62 | #> 63 | [CmdletBinding(ConfirmImpact="Medium")] 64 | param( 65 | [Parameter( 66 | ValueFromPipeline=$true, 67 | Position=0, 68 | Mandatory=$True, 69 | HelpMessage="Enter the ESXi Host.")] 70 | [VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost[]] 71 | $VMhost, 72 | [Parameter(Mandatory=$false)] 73 | $Configuration="all", 74 | [Parameter(Mandatory=$false)] 75 | $Confirm = $true, 76 | [Parameter(Mandatory=$false)] 77 | [Int]$MaxHWTransferSize=16384, 78 | [Parameter(Mandatory=$false)] 79 | [Int]$dsnro=64, 80 | [Parameter(Mandatory=$false)] 81 | [Int]$qdepth=256 82 | ) 83 | 84 | Begin{ 85 | If ((Get-Module "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue) -eq $null) { 86 | Write-Output "This script must be run in PowerShell session with PowerCLI 6.x loaded" 87 | Return 88 | } 89 | } 90 | 91 | Process{ 92 | $esxcli = Get-EsxCli -VMHost $VMhost 93 | 94 | ######### Begin Block 1 | MaxHWTransferSize #################### 95 | if($configuration -contains 1 -or $configuration -eq "all"){ 96 | Write-Verbose "Increasing MaxHWTransferSize size from 4MB to 16MB" 97 | <# 98 | 1 | Increase MaxHWTransferSize size from 4MB to 16MB (only for Nitrogen) 99 | 100 | Default value is 4MB 101 | SolidFire recommended value is 16MB 102 | 103 | Per ESXi Host Setting 104 | 105 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 106 | !!! Only applied for Nitrogen release and later !!! 107 | !!! This setting will result in poor xcopy and write-same offload in Carbon !!! 108 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 109 | 110 | Alternate method of implementation: 111 | esxcfg-advcfg -s 16384 /DataMover/MaxHWTransferSize 112 | or  113 | esxcli system settings advanced set -i 16384 -o /DataMover/MaxHWTransferSize 114 | #> 115 | $VMhost | Get-AdvancedSetting -Name "DataMover.MaxHWTransferSize" | Set-AdvancedSetting -Value $MaxHWTransferSize -Confirm:$($Confirm) 116 | 117 | # Output completion to screen if $verbose = $true 118 | if($verbose = $true){ 119 | Write-Verbose ("MaxHWTransferSize size set to 16MB for " + $VMhost.name) 120 | } 121 | } 122 | ##################### End Block 1 #################################### 123 | 124 | ######### Begin Block 2 | DSNRO ################################ 125 | if($configuration -contains 2 -or $configuration -eq "all"){ 126 | Write-Verbose "Setting DSNRO to 64" 127 | <# 128 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 129 | 130 | Only applied to SolidFire devices 131 | 132 | Default value is 32 133 | Max value is 256 134 | SolidFire recommended value is 64 135 | Set $dsnro to your preferred value if you want something other than 64 136 | 137 | Alternate method of implementation: 138 | esxcli storage core device set -d naa.xxxx -O 64 139 | #> 140 | 141 | 142 |     $esxcli=get-esxcli -VMHost $VMhost 143 |     $devices = $VMhost | Get-ScsiLun | Where{$_.Vendor -match "SolidFir"} 144 |     foreach ($device in $devices) 145 |     { 146 | If($VMhost.Version.Split(".")[0] -ge "6"){ 147 | #vSphere 6.x hosts or greater 148 | $esxcli.storage.core.device.set($null, $null, $device.CanonicalName, $null, $null, $null, $null, $null, $null, $null, $null, $dsnro, $null, $null) 149 | }else{ 150 | #vSphere 5.x hosts 151 | $esxcli.storage.core.device.set($null, $device.CanonicalName, $null, $null, $null, $null, $null, $dsnro, $null) 152 | } 153 |     154 | Write-Verbose ("DSNRO for " + $device.CanonicalName + " on host " + $VMhost.name + " set to " + $dsnro) 155 | } 156 | } 157 | 158 | ##################### End Block 2 #################################### 159 | 160 | ######### Begin Block 3 | Queue Depth ########################## 161 | if($configuration -contains 3 -or $configuration -eq "all"){ 162 | Write-Verbose "Setting Queue Depth for Software iSCSI initiators to 256" 163 | <# 164 | 3 | Set Queue Depth for Software iSCSI initiator to 256 165 | 166 | Default value is 128 167 | SolidFire recommended value is 256 168 | 169 | Alternate method of implementation: 170 | esxcli system module parameters set -m iscsi_vmk -p iscsivmk_LunQDepth=256 171 | #> 172 | 173 | $esxcli = get-esxcli -VMHost $VMhost 174 | 175 | If($VMhost.Version.Split(".")[0] -ge "6"){ 176 | #vSphere 6.x hosts or greater 177 | #$esxcli.system.module.parameters.set($null, $null,"iscsi_vmk","iscsivmk_LunQDepth=256") 178 | $esxcli.system.module.parameters.set($null, $null,"iscsi_vmk","iscsivmk_LunQDepth=$qdepth") 179 | 180 | }else{ 181 | #vSphere 5.x command 182 | #$esxcli.system.module.parameters.set($null,"iscsi_vmk","iscsivmk_LunQDepth=256") 183 | $esxcli.system.module.parameters.set($null,"iscsi_vmk","iscsivmk_LunQDepth=$qdepth") 184 | 185 | } 186 | 187 | #$esxcli.system.module.parameters.list("iscsi_vmk") | Where{$_.Name -eq "iscsivmk_LunQDepth"} 188 | 189 | Write-Verbose ("Queue depth for " + $VMhost.Name + " set to $qdepth") 190 | } 191 | ##################### End Block 3 #################################### 192 | 193 | 194 | ######### Begin Block 4 | DelayedAck ########################### 195 | if($configuration -contains 4 -or $configuration -eq "all"){ 196 | Write-Verbose "Turning off DelayedAck" 197 | <# 198 | 4 | Turn Off DelayedAck for Random Workloads 199 | 200 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 201 | !!! Only for throughput heavy workload or latency senstive applications. !!! 202 | !!! This is a global ESXi host setting that applies to all software iSCSI !!! 203 | !!! initiator targets on the host. !!! 204 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 205 | 206 | Default application value is 1 (On) 207 | Modified application value is 0 (Off) 208 | 209 | Alternate method of implementation: 210 | vmkiscsi-tool vmhba38 -W -a delayed_ack=0 211 | 212 | NOTES from https://communities.vmware.com/message/1830738 213 | #> 214 | 215 | $adapterID = $VMhost.ExtensionData.config.StorageDevice.HostBusAdapter | Where{$_.Model -match "iSCSI"} 216 | 217 | $esxcli.iscsi.adapter.param.set($adapterID.device, $null, "DelayedAck", "false") 218 | 219 | 220 | Write-Verbose ("DelayedAck turned off for " + $VMhost.name) 221 | } 222 | ##################### End Block 4 #################################### 223 | 224 | 225 | ######### Begin Block 5 | SATP Rule ############################ 226 | if($configuration -contains 5 -or $configuration -eq "all"){ 227 | Write-Verbose "Creating Custom SATP Rule" 228 | <# 229 | 5 | Create Custom SATP Rule for SolidFire 230 | 231 | Alternate method of implementation: 232 | esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -P VMW_PSP_RR -O iops=“1” -V “SolidFir" -M “SSD SAN” -e “SolidFire custom SATP rule"  233 | 234 | add(boolean boot, string claimoption, string description, string device, string driver, boolean force, string model, string option, string psp, string pspoption, string satp, string 235 | transport, string type, string vendor) 236 | 237 | -s = The SATP for which a new rule will be added 238 | -P = Set the default PSP for the SATP claim rule 239 | -O = Set the PSP options for the SATP claim rule (option=string 240 | -V = Set the vendor string when adding SATP claim rules. Vendor/Model rules are mutually exclusive with driver rules (vendor=string) 241 | -M = Set the model string when adding SATP claim rule. 242 | -e = Claim rule description 243 | 244 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 245 | !!! When to reboot the host upon applying setting !!! 246 | !!! Reboot host if you have already presented SolidFire storage to the host !!! 247 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 248 | 249 | To remove the claim rule: 250 | $esxcli.storage.nmp.satp.rule.remove($false, $null, "SolidFire custom SATP rule", $null, $null, "SSD SAN", $null, "VMW_PSP_RR", "iops=10", "VMW_SATP_DEFAULT_AA", $null, $null, "SolidFir") 251 | #> 252 | 253 | $esxcli = Get-Esxcli -VMHost $VMhost 254 | $esxcli.storage.nmp.satp.rule.add($false, $null, "SolidFire custom SATP rule", $null, $null, $true, "SSD SAN", $null, "VMW_PSP_RR", "iops=10", "VMW_SATP_DEFAULT_AA", $null, $null, "SolidFir") 255 | 256 | Write-Output ("Custom SATP rule created for " + $VMhost.name) 257 | 258 | <# Result Looks like: 259 | ClaimOptions : 260 | DefaultPSP : VMW_PSP_RR 261 | Description : SolidFire custom SATP rule 262 | Device : 263 | Driver : 264 | Model : SSD SAN 265 | Name : VMW_SATP_DEFAULT_AA 266 | Options : 267 | PSPOptions : iops='1' 268 | RuleGroup : user 269 | Transport : 270 | Vendor : SolidFir 271 | #> 272 | 273 | } 274 | ##################### End Block 5 #################################### 275 | 276 | } 277 | 278 | } -------------------------------------------------------------------------------- /VMware/SolidFire-VMware-Best-Practices.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | 3 | SolidFire VMware Best Practices Implementation Script 4 | 5 | This script simplifies implementation of recommended 6 | configurations for VMware environments 7 | 8 | Authors: Josh Atwell | josh.atwell@soldifire.com 9 | Aaron Patten | aaron.patten@solidfire.com 10 | 11 | ==================================================================== 12 | | Disclaimer: | 13 | | This script is written as best effort and provides no warranty | 14 | | expressed or implied. Please contact SolidFire support if you | 15 | | have questions about this script before running or modifying. | 16 | ==================================================================== 17 | 18 | Requirements: 19 | 1. Active PowerCLI connection to a vCenter server or ESXi host 20 | 2. User must have privileges to make changes to advanced settings 21 | 3. Evaluation of each segment's configuration changes as it relates 22 | to your environment. Not all recommendations apply to everyone 23 | 24 | PLEASE READ ALL SCRIPT BLOCKS! 25 | #> 26 | 27 | ###### User Input Section ######## 28 | 29 | <# User Checklist. Choose: 30 | 1. Verbose and Confirm selection 31 | 2. VMhosts to apply 32 | 3. Options to apply 33 | #> 34 | 35 | ###### 1. Verbose Output ###### 36 | # Verbose writes output letting user know what is happening throughout the script. 37 | $verbose = $true 38 | 39 | ###### 1b. Confirm ###### 40 | # Instructs the script whether to confirm your command or not. 41 | # False means user will receive no confiromation. 42 | 43 | $Confirm = $false 44 | 45 | ###### 2. VMware Host Selection ###### 46 | <# Choose the vSphere host filter. 47 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 48 | !! Requires active connection to your vCenter server !! 49 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 50 | #> 51 | If ((Get-PSSnapin "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue) -eq $null) { 52 | Write-Output "This script must be run in PowerShell session with PowerCLI loaded" 53 | Return 54 | }else{ 55 | $vmhosts = Get-VMhost 56 | } 57 | 58 | ###### 3. Options to Apply ###### 59 | <# Beneath this section choose the components that you want to include. 60 | 61 | Options included in script. 62 | 1 | Increase  MaxHWTransferSize size from 4MB to 16MB !!! only for Nitrogen 63 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 64 | 3 | Set Queue Depth for Software iSCSI initiator to 256 65 | 4 | Turn Off DelayedAck for Random Workloads !!! Only for throughput heavy workloads or latency senstive applications 66 | 5 | Create Custom SATP Rule for SolidFire 67 | 68 | 69 | Use if you need to include only specific settings. 70 | Must be comma-separated or all 71 | 72 | Examples 73 | $apply = 2,3,5 74 | $apply = "all" 75 | #> 76 | 77 | $apply = 4 78 | 79 | 80 | 81 | 82 | ####### The Script blocks ####### 83 | if($verbose = $true){ 84 | Write-Output " 85 | ______________ ___ 86 | /__/__\__\__\__\ ___/__/ 87 | /_ /__/_\__\__\__\ ___/__/__/ 88 | /__/__/__/\__\__\__\/__/__/__/ 89 | /__/__/__/ \__\__\__\_/__/__/ 90 | /__/__/ \__\__\__\__/__/ 91 | /__/ \__\__\__\/__/ 92 | Fueled By SolidFire 93 | 94 | SolidFire VMware Configuration 95 | Implementation Script 96 | " 97 | } 98 | 99 | ######### Begin Block 1 | MaxHWTransferSize #################### 100 | if($apply -contains 1 -or $apply -eq "all"){ 101 | 102 | if($verbose = $true){ 103 | Write-Output "Increasing MaxHWTransferSize size from 4MB to 16MB" 104 | } 105 | <# 106 | 1 | Increase MaxHWTransferSize size from 4MB to 16MB (only for Nitrogen) 107 | 108 | Default value is 4MB 109 | SolidFire recommended value is 16MB 110 | 111 | Per ESXi Host Setting 112 | 113 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 114 | !!! Only applied for Nitrogen release and later !!! 115 | !!! This setting will result in poor xcopy and write-same offload in Carbon !!! 116 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 117 | 118 | Alternate method of implementation: 119 | esxcfg-advcfg -s 16384 /DataMover/MaxHWTransferSize 120 | or  121 | esxcli system settings advanced set -i 16384 -o /DataMover/MaxHWTransferSize 122 | #> 123 | 124 | foreach ($esx in $vmhosts){ 125 | 126 | $esx | Get-AdvancedSetting -Name "DataMover.MaxHWTransferSize" | Set-AdvancedSetting -Value 16384 -Confirm:$($Confirm) 127 | 128 | # Output completion to screen if $verbose = $true 129 | if($verbose = $true){ 130 | Write-Output ("MaxHWTransferSize size set to 16MB for " + $esx.name) 131 | } 132 | } 133 | } 134 | ##################### End Block 1 #################################### 135 | 136 | ######### Begin Block 2 | DSNRO ################################ 137 | if($apply -contains 2 -or $apply -eq "all"){ 138 | if($verbose = $true){ 139 | Write-Output "Setting DSNRO to 64" 140 | } 141 | <# 142 | 2 | Set DSNRO (Disk Scheduler Number Req Outstanding for a volume 143 | 144 | Only applied to SolidFire devices 145 | 146 | Default value is 32 147 | Max value is 256 148 | SolidFire recommended value is 64 149 | Set $dsnro to your preferred value if you want something other than 64 150 | 151 | Alternate method of implementation: 152 | esxcli storage core device set -d naa.xxxx -O 64 153 | #> 154 | 155 | $dsnro = 64 156 | foreach ($esx in $vmhosts) 157 | { 158 |     $esxcli=get-esxcli -VMHost $esx 159 |     $devices = $esx | Get-ScsiLun | Where{$_.Vendor -match "SolidFir"} 160 |     foreach ($device in $devices) 161 |     { 162 | If($esx.Version.Split(".")[0] -ge "6"){ 163 | #vSphere 6.x hosts or greater 164 | $esxcli.storage.core.device.set($null, $null, $device.CanonicalName, $null, $null, $null, $null, $null, $null, $null, $null, $dsnro, $null, $null) 165 | }else{ 166 | #vSphere 5.x hosts 167 | $esxcli.storage.core.device.set($null, $device.CanonicalName, $null, $null, $null, $null, $null, $dsnro, $null) 168 | } 169 |     170 | # Output completion to screen if $verbose = $true 171 | if($verbose = $true){ 172 | Write-Output ("DSNRO for " + $device.CanonicalName + " on host " + $esx.name + " set to " + $dsnro) 173 | } 174 | } 175 | } 176 | } 177 | ##################### End Block 2 #################################### 178 | 179 | ######### Begin Block 3 | Queue Depth ########################## 180 | if($apply -contains 3 -or $apply -eq "all"){ 181 | if($verbose = $true){ 182 | Write-Output "Setting Queue Depth for Software iSCSI initiators to 256" 183 | } 184 | <# 185 | 3 | Set Queue Depth for Software iSCSI initiator to 256 186 | 187 | Default value is 128 188 | SolidFire recommended value is 256 189 | 190 | Alternate method of implementation: 191 | esxcli system module parameters set -m iscsi_vmk -p iscsivmk_LunQDepth=256 192 | #> 193 | 194 | foreach ($esx in $vmhosts){ 195 | $esxcli = get-esxcli -VMHost $esx 196 | 197 | 198 | If($esx.Version.Split(".")[0] -ge "6"){ 199 | #vSphere 6.x hosts or greater 200 | $esxcli.system.module.parameters.set($null, $null,"iscsi_vmk","iscsivmk_LunQDepth=256") 201 | }else{ 202 | #vSphere 5.x command 203 | $esxcli.system.module.parameters.set($null,"iscsi_vmk","iscsivmk_LunQDepth=256") 204 | } 205 | 206 | $esxcli.system.module.parameters.list("iscsi_vmk") | Where{$_.Name -eq "iscsivmk_LunQDepth"} 207 | 208 | # Output completion to screen if $verbose = $true 209 | if($verbose = $true){ 210 | Write-Output ("Queue depth for " + $esx.Name + " set to 256") 211 | } 212 | } 213 | } 214 | ##################### End Block 3 #################################### 215 | 216 | 217 | ######### Begin Block 4 | DelayedAck ########################### 218 | if($apply -contains 4 -or $apply -eq "all"){ 219 | if($verbose = $true){ 220 | Write-Output "Turning off DelayedAck" 221 | } 222 | <# 223 | 4 | Turn Off DelayedAck for Random Workloads 224 | 225 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 226 | !!! Only for throughput heavy workload or latency senstive applications. !!! 227 | !!! This is a global ESXi host setting that applies to all software iSCSI !!! 228 | !!! initiator targets on the host. !!! 229 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 230 | 231 | Default application value is 1 (On) 232 | Modified application value is 0 (Off) 233 | 234 | Alternate method of implementation: 235 | vmkiscsi-tool vmhba38 -W -a delayed_ack=0 236 | 237 | NOTES from https://communities.vmware.com/message/1830738 238 | #> 239 | 240 | foreach($esx in $vmhosts){ 241 | $adapterID = $esx.ExtensionData.config.StorageDevice.HostBusAdapter | Where{$_.Model -match "iSCSI"} 242 | 243 | $esxcli.iscsi.adapter.param.set($adapterID.device, $null, "DelayedAck", "false") 244 | 245 | # Output completion to screen if $verbose = $true 246 | if($verbose = $true){ 247 | Write-Output ("DelayedAck turned off for " + $esx.name) 248 | } 249 | } 250 | } 251 | ##################### End Block 4 #################################### 252 | 253 | 254 | ######### Begin Block 5 | SATP Rule ############################ 255 | if($apply -contains 5 -or $apply -eq "all"){ 256 | if($verbose = $true){ 257 | Write-Output "Creating Custom SATP Rule" 258 | } 259 | <# 260 | 5 | Create Custom SATP Rule for SolidFire 261 | 262 | Alternate method of implementation: 263 | esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -P VMW_PSP_RR -O iops=“1” -V “SolidFir" -M “SSD SAN” -e “SolidFire custom SATP rule"  264 | 265 | add(boolean boot, string claimoption, string description, string device, string driver, boolean force, string model, string option, string psp, string pspoption, string satp, string 266 | transport, string type, string vendor) 267 | 268 | -s = The SATP for which a new rule will be added 269 | -P = Set the default PSP for the SATP claim rule 270 | -O = Set the PSP options for the SATP claim rule (option=string 271 | -V = Set the vendor string when adding SATP claim rules. Vendor/Model rules are mutually exclusive with driver rules (vendor=string) 272 | -M = Set the model string when adding SATP claim rule. 273 | -e = Claim rule description 274 | 275 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 276 | !!! When to reboot the host upon applying setting !!! 277 | !!! Reboot host if you have already presented SolidFire storage to the host !!! 278 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 279 | 280 | To remove the claim rule: 281 | $esxcli.storage.nmp.satp.rule.remove($false, $null, "SolidFire custom SATP rule", $null, $null, "SSD SAN", $null, "VMW_PSP_RR", "iops=10", "VMW_SATP_DEFAULT_AA", $null, $null, "SolidFir") 282 | #> 283 | 284 | #> 285 | foreach($esx in $vmhosts){ 286 | 287 | $esxcli = Get-Esxcli -VMHost $esx 288 | $esxcli.storage.nmp.satp.rule.add($false, $null, "SolidFire custom SATP rule", $null, $null, $true, "SSD SAN", $null, "VMW_PSP_RR", "iops=10", "VMW_SATP_DEFAULT_AA", $null, $null, "SolidFir") 289 | 290 | # Output completion to screen if $verbose = $true 291 | if($verbose = $true){ 292 | Write-Output ("Custom SATP rule created for " + $esx.name) 293 | } 294 | } 295 | 296 | <# Result Looks like: 297 | ClaimOptions : 298 | DefaultPSP : VMW_PSP_RR 299 | Description : SolidFire custom SATP rule 300 | Device : 301 | Driver : 302 | Model : SSD SAN 303 | Name : VMW_SATP_DEFAULT_AA 304 | Options : 305 | PSPOptions : iops='1' 306 | RuleGroup : user 307 | Transport : 308 | Vendor : SolidFir 309 | #> 310 | 311 | } 312 | ##################### End Block 5 #################################### -------------------------------------------------------------------------------- /VMware/VVols/D3 - Migrate-VMsToVvols.ps1: -------------------------------------------------------------------------------- 1 | $vms = Get-VM VMAPP-DB05 2 | 3 | foreach ($vm in $vms){ 4 | $policy = "AppSrvOS" 5 | 6 | $target = Get-SpbmStoragePolicy $policy | Get-SpbmCompatibleStorage 7 | Move-VM $vm -Datastore $target 8 | 9 | $configurations = Get-SpbmEntityConfiguration -VM $vm -HardDisk ($vm | Get-HardDisk) 10 | 11 | Set-SpbmEntityConfiguration -Configuration $configurations -StoragePolicy (Get-SpbmStoragePolicy $policy) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /VMware/VVols/D4 - Set-MultipleVvolPolicies.ps1: -------------------------------------------------------------------------------- 1 | $vms = Get-VM VMAPP-DB04 2 | 3 | foreach($vm in $vms){ 4 | 5 | $configurations = Get-SpbmEntityConfiguration -VM $vm -HardDisk ($vm | Get-HardDisk) 6 | 7 | foreach($configuration in $configurations){ 8 | 9 | $config = $configuration.Entity 10 | 11 | switch ($config) 12 | { 13 | "Hard Disk 1" {$policy = "AppSrvOS"} 14 | "Hard Disk 2" {$policy = "AppSrvLog"} 15 | "Hard Disk 3" {$policy = "AppSrvDBHigh"} 16 | $vm {$policy = "AppSrvOS"} 17 | } 18 | Set-SpbmEntityConfiguration -Configuration $configuration -StoragePolicy (Get-SpbmStoragePolicy $policy) 19 | Write-Host $policy was set for $config 20 | } 21 | } -------------------------------------------------------------------------------- /VMware/VVols/New-VvolSPBMPolicy-NoTags.ps1: -------------------------------------------------------------------------------- 1 | $capabilities = Get-SpbmCapability | Where{$_.Category -eq "SolidfireVolumeQOSHints"} | Sort Name 2 | $NewPolicyName = "VDIEncrypt" 3 | $values = @(1000,100,50,5000,500,150,$false) 4 | 5 | $range = 0..6 6 | $rules = @() 7 | 8 | foreach ($x in $range) { 9 | If($x -lt $range.count -1){ 10 | $rule = New-SpbmRule -Capability $capabilities[$x] -Value ($values[$x] -as [Int64]) 11 | $rules += $rule 12 | } 13 | if($x -eq ($range.count - 1)){ 14 | $rule = New-SpbmRule -Capability $capabilities[$x] -Value ($values[$x]) 15 | $rules += $rule 16 | } 17 | } 18 | $rules 19 | 20 | 21 | $ruleset = New-SpbmRuleSet -Name Capabilities -AllOfRules $rules 22 | 23 | New-SpbmStoragePolicy -Name VDIEncrypt -Description "Policy for Encrypted VDI Disks." -AnyOfRuleSets $ruleset 24 | #Get-SpbmStoragePolicy -Name VDIEncrypt | Set-SpbmStoragePolicy -AnyOfRuleSets $ruleset 25 | 26 | 27 | -------------------------------------------------------------------------------- /VMware/VVols/New-VvolSPBMPolicy.ps1: -------------------------------------------------------------------------------- 1 | $capabilities = Get-SpbmCapability | Where{$_.Category -eq "SolidfireVolumeQOSHints"} | Where {$_.ValueType.ToString() -eq "System.Int64"} 2 | 3 | $values = @(1000,100,50,5000,500,150,"VDI") 4 | 5 | $range = 0..6 6 | $rules = @() 7 | 8 | 9 | 10 | foreach ($x in $range) { 11 | If($x -lt $range.count -1){ 12 | $rule = New-SpbmRule -Capability $capabilities[$x] -Value ($values[$x] -as [Int64]) 13 | $rules += $rule 14 | } 15 | if($x -eq ($range.count - 1)){ 16 | $tagrule = New-SpbmRule -AnyOfTags (Get-Tag $values[$x]) 17 | } 18 | } 19 | $rules 20 | 21 | 22 | $ruleset = New-SpbmRuleSet -Name Capabilities -AllOfRules $rules 23 | $tagruleset = New-SpbmRuleSet -Name Capabilities -AllOfRules $tagrule 24 | 25 | New-SpbmStoragePolicy -Name VDIDefault -Description "Policy for default VDI Disks." -AnyOfRuleSets $ruleset, $tagruleset -------------------------------------------------------------------------------- /docs/NetApp_Element_PowerShell_12.3_Release_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/NetApp_Element_PowerShell_12.3_Release_Notes.pdf -------------------------------------------------------------------------------- /docs/NetApp_Element_PowerShell_12.3_User_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/NetApp_Element_PowerShell_12.3_User_Guide.pdf -------------------------------------------------------------------------------- /docs/linux/README.md: -------------------------------------------------------------------------------- 1 | # Install NetApp SolidFire PowerShell Tools on Linux 2 | 3 | ![solidfire-powershell-logo](../../docs/product.png) ![linux-logo](linux-logo-small.png) 4 | 5 | The commands should be run in a terminal session on the machine you want to install on. You don't have to be in a specific directory to execute any of these commands. You will need sudo access. 6 | 7 | ## First, Install PowerShell bits 8 | 9 | Follow the detailed instructions on the [PowerShell for Linux installation page](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md). 10 | 11 | ## Next, Install SolidFire bits 12 | 13 | 1. Once inside the PowerShell shell, install SolidFire PowerShell Tools for dotnet core by downloading it from the [PowerShell Gallery](powershellgallery.com) with the following command: 14 | 15 | PS> Install-Module -Name SolidFire.Core 16 | 17 | 1. Then, import the SolidFire module with the following command: 18 | 19 | PS> Import-Module SolidFire.Core 20 | 21 | 1. To see a list of available commands, use: 22 | 23 | PS> Get-Command -Module SolidFire.Core 24 | 25 | **NOTE:** This module used to be called `SolidFire.Linux`. That name has been deprecated and it is now `SolidFire.Core` 26 | 27 | ## Paths 28 | 29 | * `$PSHOME` is `/opt/microsoft/powershell/[version]/` 30 | * User profiles will be read from `~/.config/powershell/profile.ps1` 31 | * Default profiles will be read from `$PSHOME/profile.ps1` 32 | * User modules will be read from `~/.local/share/powershell/Modules` 33 | * Shared modules will be read from `/usr/local/share/powershell/Modules` 34 | * Default modules will be read from `$PSHOME/Modules` 35 | * PSReadLine history will be recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt` 36 | 37 | The profiles respect PowerShell's per-host configuration, 38 | so the default host-specific profiles exists at `Microsoft.PowerShell_profile.ps1` in the same locations. 39 | 40 | On Linux and macOS, the [XDG Base Directory Specification][xdg-bds] is respected. 41 | 42 | [xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html 43 | -------------------------------------------------------------------------------- /docs/linux/linux-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/linux/linux-logo-small.png -------------------------------------------------------------------------------- /docs/linux/linux12.3.md: -------------------------------------------------------------------------------- 1 | # Install NetApp SolidFire PowerShell Tools on Linux 2 | 3 | ![solidfire-powershell-logo](../../docs/product.png) ![linux-logo](linux-logo-small.png) 4 | 5 | The commands should be run in a terminal session on the machine you want to install on. You don't have to be in a specific directory to execute any of these commands. You will need sudo access. 6 | 7 | ## First, Install PowerShell bits 8 | ###### CentOS 9 | The following steps ran on CentOS 7.3. 10 | 11 | 1. Install the rpm package: 12 | 13 | `#sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm` 14 | 15 | Then install using yum: 16 | 17 | `#sudo yum install dotnet-sdk-3.1` 18 | 19 | 2. Install PowerShell: 20 | 21 | `dotnet tool install --global PowerShell` 22 | 23 | ###### Ubuntu 24 | The Following process worked on Ubuntu Server 18.04. It should be similar with 16.04. 25 | 26 | 1. Firstly you need to get the .NET Core SDK Package since the ubuntu package manger doesn’t have any prior knowledge of it. 27 | The first this to do is download it using wget: 28 | 29 | `#wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb` 30 | 31 | 32 | 2. Next you need to install the downloaded package: 33 | 34 | `#sudo dpkg -i packages-microsoft-prod.deb` 35 | 36 | 37 | 3. Once that is done you can install the .NET Core SDK with the following commands: 38 | 39 | 40 | `sudo add-apt-repository universe` 41 | 42 | `#sudo apt-get update` 43 | 44 | `#sudo apt-get install apt-transport-https` 45 | 46 | `#sudo apt-get update` 47 | 48 | `#sudo apt-get install dotnet-sdk-3.1` 49 | 50 | 4. Install PowerShell: 51 | 52 | `dotnet tool install --global PowerShell` 53 | 54 | ## Next, Install SolidFire bits 55 | 56 | 1. Once inside the PowerShell shell, install SolidFire PowerShell Tools for dotnet core by downloading it from the [PowerShell Gallery](powershellgallery.com) with the following command: 57 | 58 | PS> Install-Module -Name SolidFire.Core 59 | 60 | 1. Then, import the SolidFire module with the following command: 61 | 62 | PS> Import-Module SolidFire.Core 63 | 64 | 1. To see a list of available commands, use: 65 | 66 | PS> Get-Command -Module SolidFire.Core 67 | 68 | **NOTE:** This module used to be called `SolidFire.Linux`. That name has been deprecated and it is now `SolidFire.Core` 69 | 70 | ## Paths 71 | 72 | * `$PSHOME` is `/opt/microsoft/powershell/[version]/` 73 | * User profiles will be read from `~/.config/powershell/profile.ps1` 74 | * Default profiles will be read from `$PSHOME/profile.ps1` 75 | * User modules will be read from `~/.local/share/powershell/Modules` 76 | * Shared modules will be read from `/usr/local/share/powershell/Modules` 77 | * Default modules will be read from `$PSHOME/Modules` 78 | * PSReadLine history will be recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt` 79 | 80 | The profiles respect PowerShell's per-host configuration, 81 | so the default host-specific profiles exists at `Microsoft.PowerShell_profile.ps1` in the same locations. 82 | 83 | On Linux and macOS, the [XDG Base Directory Specification][xdg-bds] is respected. 84 | 85 | [xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html 86 | -------------------------------------------------------------------------------- /docs/mac/README.md: -------------------------------------------------------------------------------- 1 | # Install NetApp SolidFire PowerShell Tools on Mac OS 2 | 3 | ![solidfire-powershell-logo](../../docs/product.png) ![apple-logo](apple-logo-small.png) 4 | 5 | ## Installation Instructions 6 | 7 | The commands should be run in a terminal session on the machine you want to install on. You don't have to be in a specific directory to execute any of these commands. You will need sudo access. 8 | 9 | ### First, Install PowerShell bits 10 | 11 | Follow the detailed instructions on the [PowerShell for Mac installation page](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#macos-1012). 12 | 13 | ### Next, Install SolidFire bits 14 | 15 | 1. Once inside the PowerShell shell, install SolidFire PowerShell Tools by downloading it from the [PowerShell Gallery](powershellgallery.com) with the following command: 16 | 17 | PS> Install-Module -Name SolidFire.Core 18 | 19 | 1. Then, import the SolidFire module with the following command: 20 | 21 | PS> Import-Module SolidFire.Core 22 | 23 | 1. To see a list of available commands, use: 24 | 25 | PS> Get-Command -Module SolidFire.Core 26 | 27 | ## Paths 28 | 29 | * `$PSHOME` is `/opt/microsoft/powershell/[version]/` 30 | * User profiles will be read from `~/.config/powershell/profile.ps1` 31 | * Default profiles will be read from `$PSHOME/profile.ps1` 32 | * User modules will be read from `~/.local/share/powershell/Modules` 33 | * Shared modules will be read from `/usr/local/share/powershell/Modules` 34 | * Default modules will be read from `$PSHOME/Modules` 35 | * PSReadLine history will be recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt` 36 | 37 | The profiles respect PowerShell's per-host configuration, 38 | so the default host-specific profiles exists at `Microsoft.PowerShell_profile.ps1` in the same locations. 39 | 40 | `$PSHOME` is `/usr/local/microsoft/powershell/[version]/`, 41 | and the symlink is placed at `/usr/local/bin/powershell`. 42 | 43 | On Linux and macOS, the [XDG Base Directory Specification][xdg-bds] is respected. 44 | 45 | [xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html 46 | -------------------------------------------------------------------------------- /docs/mac/Readme12.3.md: -------------------------------------------------------------------------------- 1 | # Install NetApp SolidFire PowerShell Tools on Mac OS 2 | 3 | ![solidfire-powershell-logo](../../docs/product.png) ![apple-logo](apple-logo-small.png) 4 | 5 | ## Installation Instructions 6 | 7 | The commands should be run in a terminal session on the machine you want to install on. You don't have to be in a specific directory to execute any of these commands. You will need sudo access. 8 | 9 | ### First, Install PowerShell bits 10 | 11 | Follow the detailed instructions on the [PowerShell for Mac installation page](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#macos-1012). 12 | 13 | ### Next, Install SolidFire bits 14 | 15 | 1. Once inside the PowerShell shell, install SolidFire PowerShell Tools by downloading it from the [PowerShell Gallery](powershellgallery.com) with the following command: 16 | 17 | PS> Install-Module -Name SolidFire.Core 18 | 19 | 1. Then, import the SolidFire module with the following command: 20 | 21 | PS> Import-Module SolidFire.Core 22 | 23 | 1. To see a list of available commands, use: 24 | 25 | PS> Get-Command -Module SolidFire.Core 26 | 27 | ## Paths 28 | 29 | * `$PSHOME` is `/opt/microsoft/powershell/[version]/` 30 | * User profiles will be read from `~/.config/powershell/profile.ps1` 31 | * Default profiles will be read from `$PSHOME/profile.ps1` 32 | * User modules will be read from `~/.local/share/powershell/Modules` 33 | * Shared modules will be read from `/usr/local/share/powershell/Modules` 34 | * Default modules will be read from `$PSHOME/Modules` 35 | * PSReadLine history will be recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt` 36 | 37 | The profiles respect PowerShell's per-host configuration, 38 | so the default host-specific profiles exists at `Microsoft.PowerShell_profile.ps1` in the same locations. 39 | 40 | `$PSHOME` is `/usr/local/microsoft/powershell/[version]/`, 41 | and the symlink is placed at `/usr/local/bin/powershell`. 42 | 43 | On Linux and macOS, the [XDG Base Directory Specification][xdg-bds] is respected. 44 | 45 | [xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html 46 | -------------------------------------------------------------------------------- /docs/mac/apple-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/mac/apple-logo-small.png -------------------------------------------------------------------------------- /docs/product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/product.png -------------------------------------------------------------------------------- /docs/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains the documents needed to get started using the SolidFire PowerShell Tools. 2 | 3 | Also join us at http://developer.solidfire.com -------------------------------------------------------------------------------- /docs/windows/PowerShell12.3.md: -------------------------------------------------------------------------------- 1 | # To install NetApp SolidFire Powershell on Windows: 2 | 3 | ![solidfire-powershell-logo](../../docs/product.png) ![windows-logo](windows10-logo-small.png) 4 | 5 | This page has instructions for installing the SolidFire PowerShell Core tools module on a Windows client. 6 | 7 | **Note**: Only Powershell Core is supported in Powershell Tools v12.3. 8 | 9 | ## Powershell Core 10 | 11 | ##### Prerequisites 12 | 13 | | Component | Version | 14 | |----------------------|------------------| 15 | | PowerShell Core | 6.1 or later | 16 | | SolidFire Element OS | 11.0 through 12.3| 17 | 18 | ### Installation Instructions 19 | 1. Download and install the PowerShell Core msi installer: 20 | 21 | Latest version : [Powershell Core 7.1](https://github.com/PowerShell/PowerShell/) 22 | 23 | 2. Download the PowerShell Core zip file from the NetApp Support Site and extract the contents to the directory you wish to keep them in. 24 | 25 | 3. Open Windows PowerShell, or a command prompt, and run powershell core using the following command: 26 | 27 | pwsh 28 | 29 | 4. Then, import the SolidFire module with the following command: 30 | 31 | PS> Import-Module \SolidFire.dll 32 | 33 | 5. To see a list of available commands, use: 34 | 35 | PS> Get-Command -Module SolidFire 36 | 37 | ##### Supported Microsoft Operating Systems 38 | 39 | The following versions of Microsoft operating systems are supported, and have had the module tested on them. 40 | 41 | | Version | 42 | |------------------------| 43 | | Windows Server 2016 | 44 | | Windows Server 2018 | 45 | | Windows 10 | 46 | 47 | PowerShell Core 7.1 supports many more platforms, but extensive module testing has not been done. More than likely they work fine, but no guarantees are given. 48 | 49 | You can find that list here at [PowerShell Core 7.1](https://devblogs.microsoft.com/powershell/announcing-powershell-7-1/). 50 | -------------------------------------------------------------------------------- /docs/windows/README.md: -------------------------------------------------------------------------------- 1 | # To install NetApp SolidFire Powershell on Windows: 2 | 3 | ![solidfire-powershell-logo](../../docs/product.png) ![windows-logo](windows10-logo-small.png) 4 | 5 | This page has instructions for installing the SolidFire PowerShell tools module on a Windows client. 6 | 7 | ## Powershell 6.1 8 | 9 | ##### Prerequisites 10 | 11 | | Component | Version | 12 | |----------------------|------------------| 13 | | PowerShell | 6.1 or later | 14 | | SolidFire Element OS | 11.0 through 12.3| 15 | 16 | ### Installation Instructions 17 | 18 | 1. Once inside the PowerShell shell, install SolidFire PowerShell Tools by downloading it from the [PowerShell Gallery](powershellgallery.com) with the following command: 19 | 20 | PS> Install-Module -Name SolidFire.Core 21 | 22 | 1. Then, import the SolidFire module with the following command: 23 | 24 | PS> Import-Module SolidFire.Core 25 | 26 | 1. To see a list of available commands, use: 27 | 28 | PS> Get-Command -Module SolidFire.Core 29 | 30 | ##### Supported Microsoft Operating Systems 31 | 32 | The following versions of Microsoft operating systems are supported, and have had the module tested on them. 33 | 34 | | Version | 35 | |------------------------| 36 | | Windows Server 2016 | 37 | | Mac 10.13 | 38 | | CentOS 7.3 | 39 | | Ubuntu 16.04 | 40 | 41 | PowerShell 7.1 supports many more platforms, but extensive module testing has not been done. More than likely they work fine, but no guarantees are given. 42 | 43 | You can find that list here at [PowerShell Core 7.1](https://devblogs.microsoft.com/powershell/announcing-powershell-7-1/). -------------------------------------------------------------------------------- /docs/windows/windows-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/windows/windows-logo-small.png -------------------------------------------------------------------------------- /docs/windows/windows10-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/docs/windows/windows10-logo-small.png -------------------------------------------------------------------------------- /packages/Initialize-SFEnvironment.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | # Copyright © 2014-2021 NetApp, Inc. All Rights Reserved. 3 | # 4 | # CONFIDENTIALITY NOTICE: THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION OF 5 | # NETAPP, INC. USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR 6 | # EXPRESS WRITTEN PERMISSION OF NETAPP, INC. 7 | #> 8 | 9 | # Launch text 10 | Import-Module .\SolidFire.Core.psd1 11 | 12 | $version = (Get-Module SolidFire.Core).Version[0] 13 | 14 | $host.ui.RawUI.WindowTitle ="SolidFire PowerShell Tools $version" 15 | 16 | write-host " " 17 | Write-Host " 777777 " 18 | Write-Host " 777777777 " 19 | Write-Host " 7777777777 " 20 | Write-Host " 7777777777 " 21 | Write-Host " 77777777777 " 22 | Write-Host " 7777777777 " 23 | Write-Host " 77777777777 " 24 | Write-Host " 77777777777 " 25 | Write-Host " 77777777777 " 26 | Write-Host " 77777777777 " 27 | Write-Host " 7777777777 77 " 28 | Write-Host " 777777777 7777 " 29 | Write-Host " 7777777777 77 " 30 | Write-Host " 7777777777 == " 31 | Write-Host " 7777777777 == " 32 | Write-Host " 7777777777 77IIIIIIIIIIIIIIIIII777 " 33 | Write-Host " 77777777777 =7 7= " 34 | Write-Host " 7777777777 7 7 " 35 | Write-Host " 7777777777 =7 7= " 36 | Write-Host " 77777777777 =7 7= " 37 | Write-Host " 77777777777 =77 7777777777777777777 77= " 38 | Write-Host " 7777777777 7777 777777777777777777777 7777 " 39 | Write-Host " 7777777 7777 7777777777777777777 7777 " 40 | Write-Host " 777 =77 77= " 41 | Write-Host " =7 7= " 42 | Write-Host " 7 7 " 43 | Write-Host " 7 7 " 44 | Write-Host " 7= =7 " 45 | Write-Host " 77= =77 " 46 | Write-Host " =7777777777777777777= " 47 | Write-Host " " 48 | Write-Host " ====IIIIIIIIII===== " 49 | Write-Host " =77777= =77777= " 50 | Write-Host " =777= =777= " 51 | Write-Host " =777= =777=" 52 | Write-Host " " 53 | write-host " Welcome to SolidFire PowerShell Tools " -foregroundcolor blue 54 | Write-Host " Version $version " -foregroundcolor blue 55 | Write-Host "" 56 | write-host " To log into a SolidFire Cluster or Node: " -NoNewLine 57 | write-host "Connect-SFCluster" -foregroundcolor blue 58 | write-host " To list available commands, type: " -NoNewLine 59 | write-host "Get-SFCommand" -foregroundcolor blue 60 | write-host " To get help for SolidFire commands use: " -NoNewline 61 | write-host "Get-Help " -foregroundcolor blue 62 | write-host "" 63 | write-host " Copyright © 2014 - 2021 NetApp, Inc. All Rights Reserved." 64 | 65 | function global:Get-SFCommand([string] $Name = "*") { 66 | get-command -Module SolidFire.Core -Name $Name 67 | } 68 | -------------------------------------------------------------------------------- /packages/SolidFire.Core.psd1: -------------------------------------------------------------------------------- 1 | # 2 | # Module manifest for module 'SolidFire.Core' 3 | # 4 | # Generated by: SolidFire Host Integrations 5 | # 6 | # Generated on: 4/19/2021 7 | # 8 | 9 | @{ 10 | 11 | # Script module or binary module file associated with this manifest. 12 | # RootModule = '' 13 | 14 | # Version number of this module. 15 | ModuleVersion = '12.3.0.81' 16 | 17 | # Supported PSEditions 18 | # CompatiblePSEditions = @() 19 | 20 | # ID used to uniquely identify this module 21 | GUID = '08c9f606-5cc2-4552-8bda-89070155304e' 22 | 23 | # Author of this module 24 | Author = 'SolidFire Host Integrations' 25 | 26 | # Company or vendor of this module 27 | CompanyName = 'NetApp, Inc.' 28 | 29 | # Copyright statement for this module 30 | Copyright = 'Copyright © 2014-2021 NetApp, Inc. All Rights Reserved.' 31 | 32 | # Description of the functionality provided by this module 33 | Description = 'Dotnet Core version. The SolidFire PowerShell Tools is a collection of Microsoft® Windows® PowerShell functions that use SolidFire API to control a SolidFire storage system.' 34 | 35 | # Minimum version of the PowerShell engine required by this module 36 | PowerShellVersion = '6.1.0' 37 | 38 | # Name of the PowerShell host required by this module 39 | # PowerShellHostName = '' 40 | 41 | # Minimum version of the PowerShell host required by this module 42 | # PowerShellHostVersion = '' 43 | 44 | # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. 45 | # DotNetFrameworkVersion = '' 46 | 47 | # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. 48 | # CLRVersion = '' 49 | 50 | # Processor architecture (None, X86, Amd64) required by this module 51 | # ProcessorArchitecture = '' 52 | 53 | # Modules that must be imported into the global environment prior to importing this module 54 | # RequiredModules = @() 55 | 56 | # Assemblies that must be loaded prior to importing this module 57 | # RequiredAssemblies = @() 58 | 59 | # Script files (.ps1) that are run in the caller's environment prior to importing this module. 60 | # ScriptsToProcess = @() 61 | 62 | # Type files (.ps1xml) to be loaded when importing this module 63 | # TypesToProcess = @() 64 | 65 | # Format files (.ps1xml) to be loaded when importing this module 66 | # FormatsToProcess = @() 67 | 68 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess 69 | NestedModules = @('SolidFire.dll') 70 | 71 | # 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. 72 | FunctionsToExport = '*' 73 | 74 | # 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. 75 | CmdletsToExport = '*' 76 | 77 | # Variables to export from this module 78 | VariablesToExport = '*' 79 | 80 | # 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. 81 | AliasesToExport = '*' 82 | 83 | # DSC resources to export from this module 84 | # DscResourcesToExport = @() 85 | 86 | # List of all modules packaged with this module 87 | # ModuleList = @() 88 | 89 | # List of all files packaged with this module 90 | # FileList = @() 91 | 92 | # 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. 93 | PrivateData = @{ 94 | 95 | PSData = @{ 96 | 97 | # Tags applied to this module. These help with module discovery in online galleries. 98 | # Tags = @() 99 | 100 | # A URL to the license for this module. 101 | LicenseUri = 'https://github.com/solidfire/PowerShell' 102 | 103 | # A URL to the main website for this project. 104 | ProjectUri = 'https://github.com/solidfire/PowerShell' 105 | 106 | # A URL to an icon representing this module. 107 | # IconUri = '' 108 | 109 | # ReleaseNotes of this module 110 | # ReleaseNotes = '' 111 | 112 | } # End of PSData hashtable 113 | 114 | } # End of PrivateData hashtable 115 | 116 | # HelpInfo URI of this module 117 | # HelpInfoURI = '' 118 | 119 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. 120 | # DefaultCommandPrefix = '' 121 | 122 | } 123 | 124 | 125 | # SIG # Begin signature block 126 | # MIIaPQYJKoZIhvcNAQcCoIIaLjCCGioCAQExDzANBglghkgBZQMEAgEFADB5Bgor 127 | # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG 128 | # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD4B1wbcFAXwPTr 129 | # rbvZmK8GMji/cYE7J9Tiu8s+eRxep6CCFK4wggUAMIID6KADAgECAgEHMA0GCSqG 130 | # SIb3DQEBCwUAMIGPMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTETMBEG 131 | # A1UEBxMKU2NvdHRzZGFsZTElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2ll 132 | # cywgSW5jLjEyMDAGA1UEAxMpU3RhcmZpZWxkIFJvb3QgQ2VydGlmaWNhdGUgQXV0 133 | # aG9yaXR5IC0gRzIwHhcNMTEwNTAzMDcwMDAwWhcNMzEwNTAzMDcwMDAwWjCBxjEL 134 | # MAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2Rh 135 | # bGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMzAxBgNV 136 | # BAsTKmh0dHA6Ly9jZXJ0cy5zdGFyZmllbGR0ZWNoLmNvbS9yZXBvc2l0b3J5LzE0 137 | # MDIGA1UEAxMrU3RhcmZpZWxkIFNlY3VyZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkg 138 | # LSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOWQZkvs+UZxqSCD 139 | # vulsv0rJSGmBdU5tJPbLFxP4sHFZhHprK4WkNLUW5cvM6UFwLKQu1voyfeGo3pQQ 140 | # rDHBwNhq/1knq3bW/At0a7inrj/EVPS0MUTdk1aMpExem4nLJIOb4ld9t9gSH8mF 141 | # bfTRgPFQm4eu1AsQBfsnuihtF+kO1k25OVUG/wokBX4vxh1ybNSLKYxXfdrZ62Ya 142 | # 00+n339SxDDFpckOAsVTv3c4aAYkw2bIN34wHkVxIzX/kNgqnY3nsJJNPH8qCpPc 143 | # zRZGZfdghIt2S5EncxSS4OrujxbqjQ4+dhe/fYmAgERD5y3gQwl12jborduJOvVd 144 | # Eo4jBIMCAwEAAaOCASwwggEoMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD 145 | # AgEGMB0GA1UdDgQWBBQlRYFoUCY4PTstLL7Natm2PbNmYzAfBgNVHSMEGDAWgBR8 146 | # DDIfp9kwf8R9aKNiqKHOqwdbJzA6BggrBgEFBQcBAQQuMCwwKgYIKwYBBQUHMAGG 147 | # Hmh0dHA6Ly9vY3NwLnN0YXJmaWVsZHRlY2guY29tLzA7BgNVHR8ENDAyMDCgLqAs 148 | # hipodHRwOi8vY3JsLnN0YXJmaWVsZHRlY2guY29tL3Nmcm9vdC1nMi5jcmwwTAYD 149 | # VR0gBEUwQzBBBgRVHSAAMDkwNwYIKwYBBQUHAgEWK2h0dHBzOi8vY2VydHMuc3Rh 150 | # cmZpZWxkdGVjaC5jb20vcmVwb3NpdG9yeS8wDQYJKoZIhvcNAQELBQADggEBAFZl 151 | # yv7zPwqok4sYx95DaRM0IL5OX3ioa5zbak1B28ET7NwxACJe9wCeDOA0ZTT5sTpO 152 | # SMgSgYhcWz4IU3r3GmTfuFBhzFNRQClLwvSuOl/kyq0mzE5hQ+X9V6Y3cM5DK7CU 153 | # w5Lp4V+qEEm3aeTg0B9kpCvNH2+g+IQkGM55PamRv1QYE4mZVBENVcUmC3lPWhxu 154 | # +WPbFICkB6v6sqW5iN2R/mU7pKN5volN4dCw9MgXDAqWFHwJt2zhwthV1BigqkFp 155 | # cCSjue/pWtw+65RK8LfeXw52+vv7aQNFQFDucgykEoaBzRPRTsQ8yk4N0ibxALe0 156 | # pqLhbnqB/TCseh/HWXswggUFMIID7aADAgECAhEAtTPllraQMEYAAAAAVWavIzAN 157 | # BgkqhkiG9w0BAQsFADCBtDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3Qs 158 | # IEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx 159 | # OTA3BgNVBAsTMChjKSAyMDE1IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl 160 | # ZCB1c2Ugb25seTEoMCYGA1UEAxMfRW50cnVzdCBDb2RlIFNpZ25pbmcgQ0EgLSBP 161 | # VkNTMTAeFw0xOTEyMTAyMTEwMDNaFw0yMjEyMTAyMTM5NThaMGIxCzAJBgNVBAYT 162 | # AlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRIwEAYDVQQHEwlTdW5ueXZhbGUxFDAS 163 | # BgNVBAoTC05ldEFwcCwgSW5jMRQwEgYDVQQDEwtOZXRBcHAsIEluYzCCASIwDQYJ 164 | # KoZIhvcNAQEBBQADggEPADCCAQoCggEBANNKwgTpPGZmLfM4OBFeooro5VmDHx/4 165 | # WvgmU94LAwQPxt5t1HrCqiMGEipIkPYh5mlTNmDiy6yVzJ7uOXIIMKY3Nmtk99LA 166 | # RzNcCWnGi9jf8ATuhXQWomy8ZcVHBjzbMBkDILi3BhibJI4z023r5A0zglEo0wlA 167 | # NbAWDWeUHJcTHT2lW3Le7oun53PCYmJsCs7cIZzuAUChutC2NrXMrVMSOvizh4yb 168 | # XR1kbvDF6LSx17/gmvuUzzy0ctHIhFxS+sXLW5+/uSr0Tx5naRwcBT/r+VJT0skb 169 | # w1reTe/iwytrI65n9r0tMyoGhr/+wvC/VEyWOQ9UUM0gibXPcIJdTvECAwEAAaOC 170 | # AWEwggFdMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzBqBggr 171 | # BgEFBQcBAQReMFwwIwYIKwYBBQUHMAGGF2h0dHA6Ly9vY3NwLmVudHJ1c3QubmV0 172 | # MDUGCCsGAQUFBzAChilodHRwOi8vYWlhLmVudHJ1c3QubmV0L292Y3MxLWNoYWlu 173 | # MjU2LmNlcjAxBgNVHR8EKjAoMCagJKAihiBodHRwOi8vY3JsLmVudHJ1c3QubmV0 174 | # L292Y3MxLmNybDBMBgNVHSAERTBDMDcGCmCGSAGG+mwKAQMwKTAnBggrBgEFBQcC 175 | # ARYbaHR0cDovL3d3dy5lbnRydXN0Lm5ldC9ycGEgMAgGBmeBDAEEATAfBgNVHSME 176 | # GDAWgBR+Gh8aEXRcZMkMH5QBq/2BZC6hLDAdBgNVHQ4EFgQUzKXl3rkIszKGmBpY 177 | # osvi7kmtWN0wCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAxYwfFtS5tDJl 178 | # Ca6IjWT/K2H1ypI3vTZPM75ZRp7udW1sWk/XtlF85xZLY5FYOClykuoewkyu7UsA 179 | # fwUaxPab7qUCr1TD7O7x81Bzcfraq29RohT0TxgetZ+Mk8q4/mcAIsUM0l09jE59 180 | # XHzFfljnLLNka2FFr4mfCRKjw/gkAPkxzKvx5+miGY7hkQYTG77B+1Gj8HMA4Z0A 181 | # t2dWFnn2oa0xnzqXlKaDZmTuCApYCo8seRNaNHzh3d93/HQ+Za6I1c5IcApcnv+9 182 | # 3eQjYn+sOEyi/bYcUXQ5tLX5UsxBSlYrvcbGWnXmPE0jo8eWohIct3QwQ+81bSsS 183 | # WdVO7qH7qDCCBR0wggQFoAMCAQICDEPBCxwAAAAAUdNz2jANBgkqhkiG9w0BAQsF 184 | # ADCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNV 185 | # BAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChj 186 | # KSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEy 187 | # MDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0g 188 | # RzIwHhcNMTUwNjEwMTM0NjA1WhcNMzAxMTEwMTQxNjA1WjCBtDELMAkGA1UEBhMC 189 | # VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50 190 | # cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDE1IEVudHJ1c3Qs 191 | # IEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEoMCYGA1UEAxMfRW50cnVz 192 | # dCBDb2RlIFNpZ25pbmcgQ0EgLSBPVkNTMTCCASIwDQYJKoZIhvcNAQEBBQADggEP 193 | # ADCCAQoCggEBANiGDaBkCmr1jpa6O5poattEQN71LfzrbURYz45yw3AtXlrU+QvY 194 | # ETWXwCnxO+4XodZEub8fSpjgGQ6141kIHVKMoLCKKEGkoYZAULNNx4hB2jaTp0w9 195 | # YywDy6+NACURaVAi9ksAzsOyLoGF3SPdTk218MCodPzrbGApmHGPaPe3HfP4Q4ti 196 | # lTKGT8rITEtT/lEgMB7/AETHXnGapRuJdEr+Uz6E6rGjiZ34LUJY2AoGUCNwFhwC 197 | # d5cYPNkQfQx65gUsGggWZhI4bHEd1mTXVsCNNsO4tQC43S+1er+xpG54+m0SduSZ 198 | # dxGmJOSCuUZ5qbCjSVvTU3RDgXRvofguLyUCAwEAAaOCASEwggEdMA4GA1UdDwEB 199 | # /wQEAwIBBjATBgNVHSUEDDAKBggrBgEFBQcDAzASBgNVHRMBAf8ECDAGAQH/AgEA 200 | # MDMGCCsGAQUFBwEBBCcwJTAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZW50cnVz 201 | # dC5uZXQwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL2NybC5lbnRydXN0Lm5ldC9n 202 | # MmNhLmNybDA7BgNVHSAENDAyMDAGBFUdIAAwKDAmBggrBgEFBQcCARYaaHR0cDov 203 | # L3d3dy5lbnRydXN0Lm5ldC9ycGEwHQYDVR0OBBYEFH4aHxoRdFxkyQwflAGr/YFk 204 | # LqEsMB8GA1UdIwQYMBaAFGpyJnrQHu995ztpUdRsjZ+QEmarMA0GCSqGSIb3DQEB 205 | # CwUAA4IBAQC3dGe0PkwlL2I1gZzSduWn4ih4dMPsGeUT+bYjlE9ip0zmTnLCJJDQ 206 | # ebqozddE3wA5MPEoxHJveKyQCy2j6oWtFMILFJk/+yN0raiqzCJjMiUBK8rQFkZC 207 | # WqdER1gdBEHi0TG+l2E7rgQYbHp6gV+rIv4I1jWOpw317CDc3G3HonbY+2aoQwMB 208 | # Iaig9kzm1ILO1w0B1jOskKPgkrsYAnVDAnoEtNgV7VeRPBLnjWb4vRTMRoLW+gPA 209 | # Cg18sYAP66EaNqV1HzzYOurnlYHerFr7nbXMEU4qdBHWf3lCYcohQWAepN3x2XSw 210 | # 1aXoC0yBid/MhhYlGaUUV5WiiiJ7sWWNMIIFfDCCBGSgAwIBAgIIC+Y6yZLvZ7ow 211 | # DQYJKoZIhvcNAQELBQAwgcYxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25h 212 | # MRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVjaG5v 213 | # bG9naWVzLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydHMuc3RhcmZpZWxkdGVj 214 | # aC5jb20vcmVwb3NpdG9yeS8xNDAyBgNVBAMTK1N0YXJmaWVsZCBTZWN1cmUgQ2Vy 215 | # dGlmaWNhdGUgQXV0aG9yaXR5IC0gRzIwHhcNMjAwOTA5MDcwMDAwWhcNMjUwOTA5 216 | # MDcwMDAwWjCBhzELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNV 217 | # BAcTClNjb3R0c2RhbGUxJDAiBgNVBAoTG1N0YXJmaWVsZCBUZWNobm9sb2dpZXMs 218 | # IExMQzErMCkGA1UEAxMiU3RhcmZpZWxkIFRpbWVzdGFtcCBBdXRob3JpdHkgLSBH 219 | # MjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALon4MOqu6KEXlmadcf6 220 | # Vc9xVcvnjfIiyBbdp4TTuY8tXVhHKHFrI6IrB4ye3Eqek/1HyIwzkrid8nsJ1nzE 221 | # WPuHUTtjAMEMm2C6XcF9mCEbMsbsEi5KBW+/rnGkdJUlhs4oGTBWm9sTeVzUjw/l 222 | # nu/AcKNyP/+Xhdp3sSULQtFqOGSn+/g9v72rBdSSLUzYzDh6PXAaoVh+slhTTBU5 223 | # z1lTJmntomeQ3txRE9cAgFLcpyYT/OVHzJczL9Ya1UVfEgvdsdOzMsxUo26ejorX 224 | # ecIgKRsa58ZN/Eg520oBGKcdhrv/vWkmrxlqvg8SLysbJEauUMvQWif0BTi7fG8e 225 | # 2TsCAwEAAaOCAakwggGlMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgbAMBYG 226 | # A1UdJQEB/wQMMAoGCCsGAQUFBwMIMB0GA1UdDgQWBBT6DlZio+vLf7r6oeHTruUy 227 | # owGsoTAfBgNVHSMEGDAWgBQlRYFoUCY4PTstLL7Natm2PbNmYzCBhAYIKwYBBQUH 228 | # AQEEeDB2MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5zdGFyZmllbGR0ZWNoLmNv 229 | # bS8wSAYIKwYBBQUHMAKGPGh0dHA6Ly9jcmwuc3RhcmZpZWxkdGVjaC5jb20vcmVw 230 | # b3NpdG9yeS9zZl9pc3N1aW5nX2NhLWcyLmNydDBUBgNVHR8ETTBLMEmgR6BFhkNo 231 | # dHRwOi8vY3JsLnN0YXJmaWVsZHRlY2guY29tL3JlcG9zaXRvcnkvbWFzdGVyc3Rh 232 | # cmZpZWxkMmlzc3VpbmcuY3JsMFAGA1UdIARJMEcwRQYLYIZIAYb9bgEHFwIwNjA0 233 | # BggrBgEFBQcCARYoaHR0cDovL2NybC5zdGFyZmllbGR0ZWNoLmNvbS9yZXBvc2l0 234 | # b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAxhcu+G7OXRsN/Xhgk7BFeMskTcZUz8GD 235 | # cW+aVs+bBLwUsb2ND2XA0y4tlAoH1ZHDvNgo71vr0wxZMs1clBhW8TQ1EiUAkgZf 236 | # ucvvghxw3P/IQPEBvHcGVmB+CwjyuJZDsERIijQ1rhHot9WjXhEhtSVSZVRwCp7X 237 | # c9jXgJWufPmIgA8Dyz/C5wC/ac4AZn5jP77m7GMc5RGs1bD3WUCk/14FExKEpPSA 238 | # Qge06KZDl4u6KeEVIhaIEsRW9kheDWYvG7oN+ppBMiVlNS3hoXjGtYD8KCgskToB 239 | # ttoEwlNSurfTkZW+gtfV3DcjsVyQaxXuu0wY4kUypYAqDje/5lBxCDGCBOUwggTh 240 | # AgEBMIHKMIG0MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNRW50cnVzdCwgSW5jLjEo 241 | # MCYGA1UECxMfU2VlIHd3dy5lbnRydXN0Lm5ldC9sZWdhbC10ZXJtczE5MDcGA1UE 242 | # CxMwKGMpIDIwMTUgRW50cnVzdCwgSW5jLiAtIGZvciBhdXRob3JpemVkIHVzZSBv 243 | # bmx5MSgwJgYDVQQDEx9FbnRydXN0IENvZGUgU2lnbmluZyBDQSAtIE9WQ1MxAhEA 244 | # tTPllraQMEYAAAAAVWavIzANBglghkgBZQMEAgEFAKB8MBAGCisGAQQBgjcCAQwx 245 | # AjAAMBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAM 246 | # BgorBgEEAYI3AgEVMC8GCSqGSIb3DQEJBDEiBCB6Qom3p5O0WJO7qELbBzQSCzRx 247 | # 6xfY6mlLis2bf4WOhzANBgkqhkiG9w0BAQEFAASCAQCxXP1fNrezf76gtrvc3Phi 248 | # Bv5cR/nXmhZw8GAo3tU9fGJYUQw9Fiux086Pq2m47+DcWSKtXYYdFv83vCdcnNZ+ 249 | # zzasLy4dRfPgJ2t4vpzQ7LE+mLFZu5oJMNS4j1YwUPh4qZ0GpNxMlfOgLZSGgPdm 250 | # W8QDo3vEPOcYnK2LKNuq5XrRVWbLXU5cyk1GkyWU1LpcozhV23ju3YLIUEOXxuh+ 251 | # 5icNenZSd/coYzBTEoIgf7gL3Oa6eiiyNxnPNPBDP+Z8jC8TJo8uD6y3jo04YkJv 252 | # fG7WJt1gDSM8cWVthhUKjE7Jzd2f8aYBNfu9GbcpjcdSFCZCYN7FbsxcDH37O+Ea 253 | # oYICbTCCAmkGCSqGSIb3DQEJBjGCAlowggJWAgEBMIHTMIHGMQswCQYDVQQGEwJV 254 | # UzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTElMCMGA1UE 255 | # ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEzMDEGA1UECxMqaHR0cDov 256 | # L2NlcnRzLnN0YXJmaWVsZHRlY2guY29tL3JlcG9zaXRvcnkvMTQwMgYDVQQDEytT 257 | # dGFyZmllbGQgU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyAggL5jrJ 258 | # ku9nujAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq 259 | # hkiG9w0BCQUxDxcNMjEwNDE5MTIwMzMyWjAjBgkqhkiG9w0BCQQxFgQUpHGY2afI 260 | # eDGbB4ErZZYlPFPIpeswDQYJKoZIhvcNAQEBBQAEggEAM5XBPNO+y1j+38bDQsMS 261 | # 3HOEoI9N7NAWgGYHkVUCMzmYMq2r8lG5lbk4aB8onKfnLiITsnsA+OW3zGUsUJ+p 262 | # +ZXBvG71yf3fYYinQUUKGQo9grH/zoU4LsCKmBLAP5QLhHZAb75TZJEMbHrJNq7A 263 | # aLLNfqpEleSNZSxWAUM7gcPaKcxsL5IvgAlOAN4HMNrehvI0q3ZgrYUCuIhSumps 264 | # qbxlGCEKCXyzFIU3skwxgcYc9h31nyUnP7RI5s7mtBFVMBIEQWenM5X5/2stlQ+S 265 | # PNaGDopRLr7fE+POeSilB9dZIM8aedQNejxDi3U0ZkGki17HI7clHYU9zZRjEF15 266 | # gA== 267 | # SIG # End signature block 268 | -------------------------------------------------------------------------------- /packages/SolidFire.SDK.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/packages/SolidFire.SDK.dll -------------------------------------------------------------------------------- /packages/SolidFire.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidfire/PowerShell/aa2af19bdbd9c33aeda88c8f130f21e7af15fbee/packages/SolidFire.dll --------------------------------------------------------------------------------