Quantcast
Channel: File Services and Storage forum
Viewing all articles
Browse latest Browse all 13565

New-iscsiservertarget returns with an UnauthorizedAccessException

$
0
0

Hello all

Can you help me get through an exception that happens on a Server 2016 box?

I'm using the guide from here:
https://model-technology.com/blog/creating-a-ramdisk-in-server-2016-for-io-benchmarking/

New-iscsiservertarget -TargetName “testramdisk”

... generates the output:

New-iscsiservertarget : An unexpected error occurred.
At line:1 char:1+ New-iscsiservertarget -TargetName “testramdisk”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : InvalidArgument: (Microsoft.Iscsi...rd errorRecord):IscsiCmdException) [New-IscsiServerTarget], IscsiCmdException+ FullyQualifiedErrorId : GetIscsiTargetServerSetting_FetchVersion:System.UnauthorizedAccessException:00000000,Microsoft.Iscsi.Target.Commands.NewIscsiServerTargetCommand

Using $error[0]|format-list -force

Exception             : Microsoft.Iscsi.Target.Commands.IscsiCmdException: An unexpected error occurred. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
                           at System.Management.ThreadDispatch.Start()
                           at System.Management.ManagementScope.Initialize()
                           at System.Management.ManagementObject.Initialize(Boolean getObject)
                           at System.Management.ManagementBaseObject.get_Properties()
                           at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
                           at Microsoft.Iscsi.Target.Commands.Utility.GetValueOrDefault[T](ManagementBaseObject mo, String name)
                           at Microsoft.Iscsi.Target.Commands.Utility.<>c__DisplayClass23_0.<GetAndCheckIscsiTargetServerVersion>b__0(ManagementBaseObject mo)
                           at Microsoft.Iscsi.Target.Commands.Utility.<>c__DisplayClass16_0`1.<QuerySingleWmiObject>b__0(PSCmdlet )
                           at Microsoft.Iscsi.Target.Commands.Utility.TryPerformWmiOperation(Action`1 operation, PSCmdlet cmdlet, String context, ErrorRecord& error)
                           --- End of inner exception stack trace ---
                           at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
TargetObject          : Microsoft.Iscsi.Target.Commands.IscsiCmdException: An unexpected error occurred. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
                           at System.Management.ThreadDispatch.Start()
                           at System.Management.ManagementScope.Initialize()
                           at System.Management.ManagementObject.Initialize(Boolean getObject)
                           at System.Management.ManagementBaseObject.get_Properties()
                           at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
                           at Microsoft.Iscsi.Target.Commands.Utility.GetValueOrDefault[T](ManagementBaseObject mo, String name)
                           at Microsoft.Iscsi.Target.Commands.Utility.<>c__DisplayClass23_0.<GetAndCheckIscsiTargetServerVersion>b__0(ManagementBaseObject mo)
                           at Microsoft.Iscsi.Target.Commands.Utility.<>c__DisplayClass16_0`1.<QuerySingleWmiObject>b__0(PSCmdlet )
                           at Microsoft.Iscsi.Target.Commands.Utility.TryPerformWmiOperation(Action`1 operation, PSCmdlet cmdlet, String context, ErrorRecord& error)
                           --- End of inner exception stack trace ---
                           at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
CategoryInfo          : InvalidArgument: (Microsoft.Iscsi...rd errorRecord):IscsiCmdException) [New-IscsiServerTarget], IscsiCmdException
FullyQualifiedErrorId : GetIscsiTargetServerSetting_FetchVersion:System.UnauthorizedAccessException:00000000,Microsoft.Iscsi.Target.Commands.NewIscsiServerTargetCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails      :

Can anybody help me fix this?


Viewing all articles
Browse latest Browse all 13565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>