Get-Iscsi Target exite with error code 1

Mak122 1 Reputation point
2022-09-16T12:21:35.637+00:00

I am trying to create a python script to create a disk automatically when the script is run. When I run my code I receive the following error:

Get-IscsiTarget : The Microsoft iSCSI Initiator Service is not running. Please start the service and retry.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe exited on DEV01 with error code 1.

Here are my imports:
import os
import subprocess

Here are the instructions I used for creating the disk. When I follow the steps in here the disk creation is successful, I have passed the same steps in to my python code, but am receiving the error above.

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.