{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/xStorage/issues/102","repository_url":"https://api.github.com/repos/PowerShell/xStorage","labels_url":"https://api.github.com/repos/PowerShell/xStorage/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xStorage/issues/102/comments","events_url":"https://api.github.com/repos/PowerShell/xStorage/issues/102/events","html_url":"https://github.com/PowerShell/xStorage/issues/102","id":237087333,"number":102,"title":"xDiskAccessPath - One or more parameter values passed to the method were invalid","user":{"login":"Zuldan","id":12680150,"avatar_url":"https://avatars1.githubusercontent.com/u/12680150?v=3","gravatar_id":"","url":"https://api.github.com/users/Zuldan","html_url":"https://github.com/Zuldan","followers_url":"https://api.github.com/users/Zuldan/followers","following_url":"https://api.github.com/users/Zuldan/following{/other_user}","gists_url":"https://api.github.com/users/Zuldan/gists{/gist_id}","starred_url":"https://api.github.com/users/Zuldan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zuldan/subscriptions","organizations_url":"https://api.github.com/users/Zuldan/orgs","repos_url":"https://api.github.com/users/Zuldan/repos","events_url":"https://api.github.com/users/Zuldan/events{/privacy}","received_events_url":"https://api.github.com/users/Zuldan/received_events","type":"User","site_admin":false},"labels":[{"id":224179549,"url":"https://api.github.com/repos/PowerShell/xStorage/labels/bug","name":"bug","color":"fc2929","default":true},{"id":240210286,"url":"https://api.github.com/repos/PowerShell/xStorage/labels/in%20progress","name":"in progress","color":"99ffcc","default":false}],"state":"open","locked":false,"assignee":{"login":"PlagueHO","id":7589164,"avatar_url":"https://avatars1.githubusercontent.com/u/7589164?v=3","gravatar_id":"","url":"https://api.github.com/users/PlagueHO","html_url":"https://github.com/PlagueHO","followers_url":"https://api.github.com/users/PlagueHO/followers","following_url":"https://api.github.com/users/PlagueHO/following{/other_user}","gists_url":"https://api.github.com/users/PlagueHO/gists{/gist_id}","starred_url":"https://api.github.com/users/PlagueHO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PlagueHO/subscriptions","organizations_url":"https://api.github.com/users/PlagueHO/orgs","repos_url":"https://api.github.com/users/PlagueHO/repos","events_url":"https://api.github.com/users/PlagueHO/events{/privacy}","received_events_url":"https://api.github.com/users/PlagueHO/received_events","type":"User","site_admin":false},"assignees":[{"login":"PlagueHO","id":7589164,"avatar_url":"https://avatars1.githubusercontent.com/u/7589164?v=3","gravatar_id":"","url":"https://api.github.com/users/PlagueHO","html_url":"https://github.com/PlagueHO","followers_url":"https://api.github.com/users/PlagueHO/followers","following_url":"https://api.github.com/users/PlagueHO/following{/other_user}","gists_url":"https://api.github.com/users/PlagueHO/gists{/gist_id}","starred_url":"https://api.github.com/users/PlagueHO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PlagueHO/subscriptions","organizations_url":"https://api.github.com/users/PlagueHO/orgs","repos_url":"https://api.github.com/users/PlagueHO/repos","events_url":"https://api.github.com/users/PlagueHO/events{/privacy}","received_events_url":"https://api.github.com/users/PlagueHO/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2017-06-20T04:07:16Z","updated_at":"2017-06-20T09:04:07Z","closed_at":null,"body":"When use xDiskAccessPath I get the error \"**One or more parameter values passed to the method were invalid**\" and \"**The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.**\" I had previously tested 2.9.0.0 and 3.1.0.0 and found both version working but I've realized today that they were being used lab servers that already had Mount Points created. Today, I created a production server (disks offline and uninitialized) and the above errors appeared with both 2.9.0.0 and 3.1.0.0. The issue exists with both disk types, DiskNumber and UniqueId.\r\n\r\nFirst consistency check\r\n```\r\nVERBOSE: [LABSERVER02]: LCM:  [ Start  Set      ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Setting disk with Number '4' status for access path 'C:\\MountPoint\\SQLDATA01'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Checking disk with Number '4' partition style.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' is already initialized with GPT.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' does not contain a partition assigned to access path 'C:\\MountPoint\\SQLDATA01\\'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Creating partition on disk with Number '4' using all free space.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Formatting the volume as 'NTFS'.\r\nInvoke-CimMethod : One or more parameter values passed to the method were invalid.\r\nAt C:\\DSC\\SQLTest.ps1:20 char:5\r\n+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidArgument: (MSFT_Volume (Ob...0-8343-9e9f...):) [Invoke-CimMethod], CimException\r\n    + FullyQualifiedErrorId : MI RESULT 4,Format-Volume,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand\r\n    + PSComputerName        : LABSERVER02\r\n \r\nInvoke-CimMethod : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.\r\nAt C:\\DSC\\SQLTest.ps1:20 char:5\r\n+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidArgument: (MSFT_Disk (Obje...d_virtual_d...):) [Invoke-CimMethod], CimException\r\n    + FullyQualifiedErrorId : InputObjectNotBound,Add-PartitionAccessPath,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand\r\n    + PSComputerName        : LABSERVER02\r\n \r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Successfully initialized volume and assigned to access path 'C:\\MountPoint\\SQLDATA01\\'.\r\nVERBOSE: [LABSERVER02]: LCM:  [ End    Set      ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]  in 3.4250 seconds.\r\nInvoke-CimMethod : The PowerShell DSC resource '[xDiskAccessPath]DiskAccessPathSQLDATA01' with SourceInfo 'C:\\Program \r\nFiles\\WindowsPowerShell\\Modules\\BVISMServerEnforcer\\Files\\Roles\\BaseSQLServerStandalone\\BaseSQLServerStandaloneConfig.ps1::140::17::xDiskAccessPath' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors \r\nare logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.\r\nAt C:\\DSC\\SQLTest.ps1:20 char:5\r\n+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (:) [Invoke-CimMethod], CimException\r\n    + FullyQualifiedErrorId : NonTerminatingErrorFromProvider,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand\r\n    + PSComputerName        : LABSERVER02\r\n```\r\n\r\nSecond consistency check (not changing anything)\r\n\r\n```\r\nVERBOSE: [LABSERVER02]: LCM:  [ Start  Set      ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Setting disk with Number '4' status for access path 'C:\\MountPoint\\SQLDATA01'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Checking disk with Number '4' partition style.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' is already initialized with GPT.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' does not contain a partition assigned to access path 'C:\\MountPoint\\SQLDATA01\\'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Creating partition on disk with Number '4' using all free space.\r\nInvoke-CimMethod : Not enough available capacity\r\nAt C:\\DSC\\SQLTest.ps1:20 char:5\r\n+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : NotSpecified: (StorageWMI:) [Invoke-CimMethod], CimException\r\n    + FullyQualifiedErrorId : StorageWMI 40000,New-Partition,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand\r\n    + PSComputerName        : LABSERVER02\r\n \r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Volume assigned to access path 'C:\\MountPoint\\SQLDATA01\\' filesystem format '' does not match expected format 'NTFS'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Changing Volume assigned to access path 'C:\\MountPoint\\SQLDATA01\\' label to 'SQLDATA01'.\r\nInvoke-CimMethod : Cannot validate argument on parameter 'PartitionNumber'. The argument is null. Provide a valid value for the argument, and then try running the command again.\r\nAt C:\\DSC\\SQLTest.ps1:20 char:5\r\n+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (:) [Invoke-CimMethod], CimException\r\n```\r\n\r\nThird consistency check (manually used Disk Management to map the mount points to various directories in C:\\MountPoint)\r\n\r\n```\r\nVERBOSE: [LABSERVER02]: LCM:  [ Start  Resource ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]\r\nVERBOSE: [LABSERVER02]: LCM:  [ Start  Test     ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Test-TargetResource: Testing disk with Number '4' status for access path 'C:\\MountPoint\\SQLDATA01'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Test-TargetResource: Checking if disk with Number '4' is initialized.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT BlockSize from Win32_Volume WHERE Name = 'C:\\\\MountPoint\\\\SQLDATA\r\n01\\\\','queryDialect' = WQL,'namespaceName' = root\\cimv2'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Operation 'Query CimInstances' complete.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Test-TargetResource: Volume assigned to access path 'C:\\MountPoint\\SQLDATA01\\' filesystem format '' does not match expected format 'NTFS'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Test-TargetResource: Volume assigned to access path 'C:\\MountPoint\\SQLDATA01\\' label '' does not match expected label 'SQLDATA01'.\r\nVERBOSE: [LABSERVER02]: LCM:  [ End    Test     ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]  in 0.2030 seconds.\r\nVERBOSE: [LABSERVER02]: LCM:  [ Start  Set      ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Setting disk with Number '4' status for access path 'C:\\MountPoint\\SQLDATA01'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Checking disk with Number '4' partition style.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Disk with Number '4' is already initialized with GPT.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Partition 'System.Object[]' is already assigned to access path 'C:\\MountPoint\\SQLDATA01\\'.\r\nVERBOSE: [LABSERVER02]:                            [[xDiskAccessPath]DiskAccessPathSQLDATA01] Set-TargetResource: Formatting the volume as 'NTFS'.\r\nInvoke-CimMethod : No matching MSFT_Volume objects found by CIM query for enumerating instances of the ROOT/Microsoft/Windows/Storage/MSFT_Volume class on the  CIM server, that are associated with the following instance: MSFT_Partition (DiskId = \r\n\"\\\\?\\scsi#disk&ven_vmware&prod_virtual_d..., Offset = 17408). Verify query parameters and retry.\r\nAt C:\\DSC\\SQLTest.ps1:20 char:5\r\n+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...\r\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : ObjectNotFound: (MSFT_Volume:) [Invoke-CimMethod], CimException\r\n    + FullyQualifiedErrorId : CmdletizationQuery_NotFound,Format-Volume,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand\r\n    + PSComputerName        : LABSERVER02\r\n \r\nVERBOSE: [LABSERVER02]: LCM:  [ End    Set      ]  [[xDiskAccessPath]DiskAccessPathSQLDATA01]  in 1.8900 seconds.\r\n```\r\nForth consistency check (100% compliant)"},"comment":{"url":"https://api.github.com/repos/PowerShell/xStorage/issues/comments/309691571","html_url":"https://github.com/PowerShell/xStorage/issues/102#issuecomment-309691571","issue_url":"https://api.github.com/repos/PowerShell/xStorage/issues/102","id":309691571,"user":{"login":"Zuldan","id":12680150,"avatar_url":"https://avatars1.githubusercontent.com/u/12680150?v=3","gravatar_id":"","url":"https://api.github.com/users/Zuldan","html_url":"https://github.com/Zuldan","followers_url":"https://api.github.com/users/Zuldan/followers","following_url":"https://api.github.com/users/Zuldan/following{/other_user}","gists_url":"https://api.github.com/users/Zuldan/gists{/gist_id}","starred_url":"https://api.github.com/users/Zuldan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zuldan/subscriptions","organizations_url":"https://api.github.com/users/Zuldan/orgs","repos_url":"https://api.github.com/users/Zuldan/repos","events_url":"https://api.github.com/users/Zuldan/events{/privacy}","received_events_url":"https://api.github.com/users/Zuldan/received_events","type":"User","site_admin":false},"created_at":"2017-06-20T09:04:07Z","updated_at":"2017-06-20T09:04:07Z","body":"Fantastic @PlagueHO I was about to spin up another VM to try replicate the problem again. I thought the resource might be seeing something unexpected. Notice the 'System.Object[]' in the Verbose message.\r\n\r\n`Set-TargetResource: Partition 'System.Object[]' is already assigned to access path 'C:\\MountPoint\\SQLDATA01\\'.`"}}
{"actor":{"display_login":"Zuldan"}}