Not able to perform 'shutdown without sysprep' using powershell in windows server 2022

Anonymous
2024-06-18T06:17:35+00:00

Hi Everyone,

I am in the process of creating AWS AMIs and GCE Instance Templates for Windows Server 2022. After configuring the machine, I need to perform a 'shutdown without sysprep' using PowerShell with Launch V2. I can perform this action using the wizard, but I'm having trouble with the PowerShell command.

Any help or assistance in this regard would be highly appreciated.

Thanks!

Windows for business | Windows Server | Windows cloud | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

11 answers

Sort by: Most helpful
  1. Anonymous
    2024-06-18T07:01:42+00:00

    Hi Suriya_Invisibl,

    Thank you for posting in the Microsoft Community Forums.

    May I ask what problem you are experiencing? Is the script not executing?

    Or is it that you cannot open the Power shell scripting interface to write.

    Best regards

    Neuvi Jiang

    0 comments No comments
  2. Anonymous
    2024-06-18T11:27:16+00:00

    Hi NeuviJ,

    We are trying to achieve a "shutdown without sysprep" using PowerShell. We found a reference link from the AWS community that describes the same issue we are encountering. As shown in the attached screenshot, we can perform a 'shutdown without sysprep,' but we haven't found any documentation guiding us on how to do it via PowerShell. I am specifically looking for a PowerShell command to accomplish this.

    Thanks
    Suriya

    0 comments No comments
  3. Anonymous
    2024-06-19T00:54:47+00:00

    Hi Suriya_Invisibl,

    Have a nice day!

    If you are using AWS or GCE command line tools (such as the AWS CLI or gcloud) and want to shut down instances through those tools, you should use the appropriate commands from those tools instead of running PowerShell scripts inside the instances.

    For AWS, you can use the ec2 stop-instances command from the AWS CLI:

    aws ec2 stop-instances --instance-ids i-1234567890abcdef0

    For GCE, you can use the compute instances stop command from the gcloud CLI:

    gcloud compute instances stop INSTANCE_NAME --zone=ZONE

    Be sure to replace i-1234567890abcdef0 with your AWS instance ID, INSTANCE_NAME with your GCE instance name, and ZONE with the zone where the instance is located.

    Best regards

    Neuvi Jiang

    0 comments No comments
  4. Anonymous
    2024-06-19T07:18:26+00:00

    Hi NeuviJ,

    We are trying to achieve a "shutdown without sysprep" using PowerShell. Apologies for the misunderstanding; the link we shared for reference mentioned someone asking about shutdown without sysprep in PowerShell, but there was no answer provided. Our ultimate aim is to perform a shutdown without sysprep using PowerShell.

    Thanks,
    Suriya

    0 comments No comments
  5. Anonymous
    2024-06-28T15:46:32+00:00

    Hi NeuviJ,

    We are trying to achieve a "shutdown without sysprep" using PowerShell. Apologies for the misunderstanding; the link we shared for reference mentioned someone asking about shutdown without sysprep in PowerShell, but there was no answer provided. Our ultimate aim is to perform a shutdown without sysprep using PowerShell.

    This matter is quite important for us, so your prompt assistance would be greatly appreciated.

    Thanks,

    Suriya

    0 comments No comments