Skip to content

Commit 0871855

Browse files
authored
Refactor storage pool commands for clarity
1 parent 15920c7 commit 0871855

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

AzureLocal/Deploy_Node.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ $ServerList = "<NodeName>"
3333

3434
Invoke-Command ($ServerList) {
3535
Update-StorageProviderCache
36-
Get-StoragePool | ? IsPrimordial -eq $false | Set-StoragePool -IsReadOnly:$false -ErrorAction SilentlyContinue
37-
Get-StoragePool | ? IsPrimordial -eq $false | Get-VirtualDisk | Remove-VirtualDisk -Confirm:$false -ErrorAction SilentlyContinue
38-
Get-StoragePool | ? IsPrimordial -eq $false | Remove-StoragePool -Confirm:$false -ErrorAction SilentlyContinue
36+
Get-StoragePool | Where-Object IsPrimordial -eq $false | Set-StoragePool -IsReadOnly:$false -ErrorAction SilentlyContinue
37+
Get-StoragePool | Where-Object IsPrimordial -eq $false | Get-VirtualDisk | Remove-VirtualDisk -Confirm:$false -ErrorAction SilentlyContinue
38+
Get-StoragePool | Where-Object IsPrimordial -eq $false | Remove-StoragePool -Confirm:$false -ErrorAction SilentlyContinue
3939
Get-PhysicalDisk | Reset-PhysicalDisk -ErrorAction SilentlyContinue
40-
Get-Disk | ? Number -ne $null | ? IsBoot -ne $true | ? IsSystem -ne $true | ? PartitionStyle -ne RAW | ? BusType -ne USB | % {
40+
Get-Disk | Where-Object Number -ne $null | Where-Object IsBoot -ne $true | Where-Object IsSystem -ne $true | Where-Object PartitionStyle -ne RAW | Where-Object BusType -ne USB | % {
4141
$_ | Set-Disk -isoffline:$false
4242
$_ | Set-Disk -isreadonly:$false
4343
$_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false

0 commit comments

Comments
 (0)