rubrikinc / rubrik-scripts-for-powershell

Collection of PowerShell Scripts created to interact to Rubrik CDM
MIT License
50 stars 58 forks source link

Parse-RubrikSizing.ps1 syntax error #78

Closed ghost closed 5 years ago

ghost commented 5 years ago

What happened: Line 24 contains "./1024" which is throwing a syntax error.

Line 24:
'Total DB Size (GB)' = (($rawdata | Measure-Object -Property DBTotalSizeMB -Sum)./1024).ToString('0.00')

May should be the follow, not sure of the actual math being done here. 'Total DB Size (GB)' = ((($rawdata | Measure-Object -Property DBTotalSizeMB -Sum).Sum)/1024).ToString('0.00')

At C:\Users\adam.turner\Downloads\RubrikSQLProfile-DBInfoV2\Parse-RubrikSizing.ps1:24 char:95
+ ... = ((($rawdata | Measure-Object -Property DBTotalSizeMB -Sum)./1024).T ...
+                                                                  ~
Missing property name after reference operator.
At C:\Users\adam.turner\Downloads\RubrikSQLProfile-DBInfoV2\Parse-RubrikSizing.ps1:24 char:118
+ ...  Measure-Object -Property DBTotalSizeMB -Sum)./1024).ToString('0.00')
+                                                                          ~
Missing closing ')' in expression.
At C:\Users\adam.turner\Downloads\RubrikSQLProfile-DBInfoV2\Parse-RubrikSizing.ps1:25 char:13
+             'Avg Full Backup Time(Sec)' = ($rawdata | Measure-Object  ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token ''Avg Full Backup Time(Sec)'' in expression or statement.
At C:\Users\adam.turner\Downloads\RubrikSQLProfile-DBInfoV2\Parse-RubrikSizing.ps1:24 char:118
+ ...  Measure-Object -Property DBTotalSizeMB -Sum)./1024).ToString('0.00')

What you expected to happen: Script successfully runs How to reproduce it (as minimally and precisely as possible): Execute normally. Anything else we need to know?: