diff --git a/docs/en-us/Get-DiskSmartInfo.md b/docs/en-us/Get-DiskSmartInfo.md index 4ce8979..16a7d18 100644 --- a/docs/en-us/Get-DiskSmartInfo.md +++ b/docs/en-us/Get-DiskSmartInfo.md @@ -14,7 +14,7 @@ Gets disk SMART information ### ComputerName (Default) ``` -Get-DiskSmartInfo [[-ComputerName] ] [-ShowConverted] [-CriticalAttributesOnly] +Get-DiskSmartInfo [[-ComputerName] ] [-Convert] [-CriticalAttributesOnly] [-DiskNumber ] [-DiskModel ] [-AttributeID ] [-AttributeIDHex ] [-AttributeName ] [-Quiet] [-ShowHistory] [-UpdateHistory] [-Credential ] [] @@ -22,7 +22,7 @@ Get-DiskSmartInfo [[-ComputerName] ] [-ShowConverted] [-CriticalAttrib ### CimSession ``` -Get-DiskSmartInfo -CimSession [-ShowConverted] [-CriticalAttributesOnly] +Get-DiskSmartInfo -CimSession [-Convert] [-CriticalAttributesOnly] [-DiskNumber ] [-DiskModel ] [-AttributeID ] [-AttributeIDHex ] [-AttributeName ] [-Quiet] [-ShowHistory] [-UpdateHistory] [] ``` @@ -64,7 +64,7 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -ShowConverted +### -Convert Adds converted data for some of the attributes. These conversions are defined as ConvertScriptBlock property of attributes, listed in @@ -352,7 +352,7 @@ The command gets disk SMART information. ### Example 2: Converted data ```powershell -Get-DiskSmartInfo -ShowConverted +Get-DiskSmartInfo -Convert ``` ``` diff --git a/docs/ru-ru/Get-DiskSmartInfo.md b/docs/ru-ru/Get-DiskSmartInfo.md index 6e7ae2b..11cec85 100644 --- a/docs/ru-ru/Get-DiskSmartInfo.md +++ b/docs/ru-ru/Get-DiskSmartInfo.md @@ -14,7 +14,7 @@ schema: 2.0.0 ### ComputerName (Default) ``` -Get-DiskSmartInfo [[-ComputerName] ] [-ShowConverted] [-CriticalAttributesOnly] +Get-DiskSmartInfo [[-ComputerName] ] [-Convert] [-CriticalAttributesOnly] [-DiskNumber ] [-DiskModel ] [-AttributeID ] [-AttributeIDHex ] [-AttributeName ] [-Quiet] [-ShowHistory] [-UpdateHistory] [-Credential ] [] @@ -22,7 +22,7 @@ Get-DiskSmartInfo [[-ComputerName] ] [-ShowConverted] [-CriticalAttrib ### CimSession ``` -Get-DiskSmartInfo -CimSession [-ShowConverted] [-CriticalAttributesOnly] +Get-DiskSmartInfo -CimSession [-Convert] [-CriticalAttributesOnly] [-DiskNumber ] [-DiskModel ] [-AttributeID ] [-AttributeIDHex ] [-AttributeName ] [-Quiet] [-ShowHistory] [-UpdateHistory] [] ``` @@ -64,7 +64,7 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -ShowConverted +### -Convert Параметр добавляет ковертированные данные для определенных атрибутов. Механизмы конвертации заданы в качестве свойства ConvertScriptBlock атрибутов, @@ -361,7 +361,7 @@ SMARTData: ### Example 2: Конвертированные данные ```powershell -Get-DiskSmartInfo -ShowConverted +Get-DiskSmartInfo -Convert ``` ``` diff --git a/en-us/DiskSmartInfo-help.xml b/en-us/DiskSmartInfo-help.xml index 0ab5da1..acd632a 100644 --- a/en-us/DiskSmartInfo-help.xml +++ b/en-us/DiskSmartInfo-help.xml @@ -219,7 +219,7 @@ Description : (Vendor-specific raw value.) The raw value has different struct None - ShowConverted + Convert Adds converted data for some of the attributes. These conversions are defined as ConvertScriptBlock property of attributes, listed in attributes/default.ps1 and attributes/proprietary.ps1 files. @@ -381,7 +381,7 @@ Description : (Vendor-specific raw value.) The raw value has different struct None - ShowConverted + Convert Adds converted data for some of the attributes. These conversions are defined as ConvertScriptBlock property of attributes, listed in attributes/default.ps1 and attributes/proprietary.ps1 files. @@ -555,7 +555,7 @@ Description : (Vendor-specific raw value.) The raw value has different struct None - ShowConverted + Convert Adds converted data for some of the attributes. These conversions are defined as ConvertScriptBlock property of attributes, listed in attributes/default.ps1 and attributes/proprietary.ps1 files. @@ -779,7 +779,7 @@ SMARTData: ------------------ Example 2: Converted data ------------------ - Get-DiskSmartInfo -ShowConverted + Get-DiskSmartInfo -Convert Disk: 0: Disk model PNPDeviceId: Disk PNPDeviceId diff --git a/en-us/about_DiskSmartInfo_attributes.help.txt b/en-us/about_DiskSmartInfo_attributes.help.txt index fdd7e93..cb72815 100644 --- a/en-us/about_DiskSmartInfo_attributes.help.txt +++ b/en-us/about_DiskSmartInfo_attributes.help.txt @@ -33,7 +33,7 @@ DataType is an enum type value, that defines attribute data structure. IsCritical is a boolean, specifying whether an attribute is critical. ConvertScriptBlock is a ScriptBlock type value, that defines conversion process, -that is used by the the Get-DiskSmartInfo command with the -ShowConverted parameter. +that is used by the the Get-DiskSmartInfo command with the -Convert parameter. PROPRIETARY ATTRIBUTES diff --git a/functions/DiskSmartInfo.functions.internal.ps1 b/functions/DiskSmartInfo.functions.internal.ps1 index 49c5e26..5ec2a43 100644 --- a/functions/DiskSmartInfo.functions.internal.ps1 +++ b/functions/DiskSmartInfo.functions.internal.ps1 @@ -2,7 +2,7 @@ function inGetDiskSmartInfo { Param ( [Microsoft.Management.Infrastructure.CimSession[]]$Session, - [switch]$ShowConverted, + [switch]$Convert, [switch]$CriticalAttributesOnly, [int[]]$DiskNumbers, [string[]]$DiskModels, @@ -137,7 +137,7 @@ function inGetDiskSmartInfo $attribute.Add("DataHistory", $null) } } - if ($ShowConverted) + if ($Convert) { $attribute.Add("DataConverted", $(inConvertData -attribute $attribute)) } @@ -145,7 +145,7 @@ function inGetDiskSmartInfo $attributeObject = [PSCustomObject]$attribute $attributeObject | Add-Member -TypeName "DiskSmartAttribute" - if ($ShowHistory -and $ShowConverted) + if ($ShowHistory -and $Convert) { $attributeObject | Add-Member -TypeName 'DiskSmartAttribute#DataHistoryDataConverted' } @@ -153,7 +153,7 @@ function inGetDiskSmartInfo { $attributeObject | Add-Member -TypeName 'DiskSmartAttribute#DataHistory' } - elseif ($ShowConverted) + elseif ($Convert) { $attributeObject | Add-Member -TypeName 'DiskSmartAttribute#DataConverted' } diff --git a/functions/DiskSmartInfo.functions.ps1 b/functions/DiskSmartInfo.functions.ps1 index 265b386..d3bf52c 100644 --- a/functions/DiskSmartInfo.functions.ps1 +++ b/functions/DiskSmartInfo.functions.ps1 @@ -7,7 +7,7 @@ function Get-DiskSmartInfo [string[]]$ComputerName, [Parameter(ValueFromPipeline,ParameterSetName='CimSession')] [CimSession[]]$CimSession, - [switch]$ShowConverted, + [switch]$Convert, [switch]$CriticalAttributesOnly, [Alias('Index','Number','DeviceId')] [Parameter(ValueFromPipelineByPropertyName)] @@ -172,7 +172,7 @@ function Get-DiskSmartInfo inGetDiskSmartInfo ` -Session $scd.CimSession ` - -ShowConverted:$ShowConverted ` + -Convert:$Convert ` -CriticalAttributesOnly:$CriticalAttributesOnly ` -DiskNumbers $scd.DiskNumber ` -DiskModels $DiskModel ` diff --git a/ru-ru/DiskSmartInfo-help.xml b/ru-ru/DiskSmartInfo-help.xml index 02e6d6e..b93b707 100644 --- a/ru-ru/DiskSmartInfo-help.xml +++ b/ru-ru/DiskSmartInfo-help.xml @@ -219,7 +219,7 @@ Description : (Vendor-specific raw value.) The raw value has different struct None - ShowConverted + Convert Параметр добавляет ковертированные данные для определенных атрибутов. Механизмы конвертации заданы в качестве свойства ConvertScriptBlock атрибутов, перечисленных в файлах attributes/default.ps1 и attributes/proprietary.ps1. @@ -381,7 +381,7 @@ Description : (Vendor-specific raw value.) The raw value has different struct None - ShowConverted + Convert Параметр добавляет ковертированные данные для определенных атрибутов. Механизмы конвертации заданы в качестве свойства ConvertScriptBlock атрибутов, перечисленных в файлах attributes/default.ps1 и attributes/proprietary.ps1. @@ -555,7 +555,7 @@ Description : (Vendor-specific raw value.) The raw value has different struct None - ShowConverted + Convert Параметр добавляет ковертированные данные для определенных атрибутов. Механизмы конвертации заданы в качестве свойства ConvertScriptBlock атрибутов, перечисленных в файлах attributes/default.ps1 и attributes/proprietary.ps1. @@ -779,7 +779,7 @@ SMARTData: -------------- Example 2: Конвертированные данные -------------- - Get-DiskSmartInfo -ShowConverted + Get-DiskSmartInfo -Convert Disk: 0: Disk model PNPDeviceId: Disk PNPDeviceId diff --git a/ru-ru/about_DiskSmartInfo_attributes.help.txt b/ru-ru/about_DiskSmartInfo_attributes.help.txt index dbee29c..8e9d8d9 100644 --- a/ru-ru/about_DiskSmartInfo_attributes.help.txt +++ b/ru-ru/about_DiskSmartInfo_attributes.help.txt @@ -34,7 +34,7 @@ DataType - это значение типа enum, указывающее стр IsCritical - это логическое значение, определяющее, является ли атрибут критическим. ConvertScriptBlock - это значение типа ScriptBlock, задающее механизм конвертации -значения атрибута, используемый параметром -ShowConverted команды Get-DiskSmartInfo. +значения атрибута, используемый параметром -Convert команды Get-DiskSmartInfo. СОБСТВЕННЫЕ АТРИБУТЫ ПРОИЗВОДИТЕЛЕЙ diff --git a/tests/DiskSmartInfo.history.tests.ps1 b/tests/DiskSmartInfo.history.tests.ps1 index 2483e35..9170d36 100644 --- a/tests/DiskSmartInfo.history.tests.ps1 +++ b/tests/DiskSmartInfo.history.tests.ps1 @@ -329,7 +329,7 @@ Describe "History" { } } - Context "-ShowHistory -ShowConverted" { + Context "-ShowHistory -Convert" { BeforeAll { mock Get-CimInstance -MockWith { $diskSmartDataHDD1, $diskSmartDataHDD2, $diskSmartDataSSD1 } -ParameterFilter { $Namespace -eq $namespaceWMI -and $ClassName -eq $classSmartData } -ModuleName DiskSmartInfo @@ -353,7 +353,7 @@ Describe "History" { (Get-Content -Path 'TestDrive:/localhost.txt') -replace '"Data": 358', '"Data": 357' | Set-Content -Path 'TestDrive:/localhost.txt' } - $diskSmartInfo = Get-DiskSmartInfo -ShowHistory -ShowConverted + $diskSmartInfo = Get-DiskSmartInfo -ShowHistory -Convert } It "Object is of proper type" { diff --git a/tests/DiskSmartInfo.tests.ps1 b/tests/DiskSmartInfo.tests.ps1 index 13f91ac..b338146 100644 --- a/tests/DiskSmartInfo.tests.ps1 +++ b/tests/DiskSmartInfo.tests.ps1 @@ -119,14 +119,14 @@ Describe "Get-DiskSmartInfo" { } } - Context "-ShowConverted" { + Context "-Convert" { BeforeAll { mock Get-CimInstance -MockWith { $diskSmartDataHDD1, $diskSmartDataSSD1 } -ParameterFilter { $Namespace -eq $namespaceWMI -and $ClassName -eq $classSmartData } -ModuleName DiskSmartInfo mock Get-CimInstance -MockWith { $diskThresholdsHDD1, $diskThresholdsSSD1 } -ParameterFilter { $Namespace -eq $namespaceWMI -and $ClassName -eq $classThresholds } -ModuleName DiskSmartInfo mock Get-CimInstance -MockWith { $diskFailurePredictStatusHDD1, $diskFailurePredictStatusSSD1 } -ParameterFilter { $Namespace -eq $namespaceWMI -and $ClassName -eq $classFailurePredictStatus } -ModuleName DiskSmartInfo mock Get-CimInstance -MockWith { $diskDriveHDD1, $diskDriveSSD1 } -ParameterFilter { $ClassName -eq $classDiskDrive } -ModuleName DiskSmartInfo - $diskSmartInfo = Get-DiskSmartInfo -ShowConverted + $diskSmartInfo = Get-DiskSmartInfo -Convert } It "Converts Spin-Up Time" { @@ -322,7 +322,7 @@ Describe "Get-DiskSmartInfo" { mock Get-CimInstance -MockWith { $diskThresholdsSSD1, $diskThresholdsHFSSSD1, $diskThresholdsSSD2 } -ParameterFilter { $Namespace -eq $namespaceWMI -and $ClassName -eq $classThresholds } -ModuleName DiskSmartInfo mock Get-CimInstance -MockWith { $diskFailurePredictStatusSSD1, $diskFailurePredictStatusHFSSSD1, $diskFailurePredictStatusSSD2 } -ParameterFilter { $Namespace -eq $namespaceWMI -and $ClassName -eq $classFailurePredictStatus } -ModuleName DiskSmartInfo mock Get-CimInstance -MockWith { $diskDriveSSD1, $diskDriveHFSSSD1, $diskDriveSSD2 } -ParameterFilter { $ClassName -eq $classDiskDrive } -ModuleName DiskSmartInfo - $diskSmartInfo = Get-DiskSmartInfo -ShowConverted + $diskSmartInfo = Get-DiskSmartInfo -Convert } It "Has 3 DiskSmartInfo objects" {