EtherAssist
  • Administration
  • Agent mode
  • Integrations
  • Getting Started
  • Models and AI
  • Partner portal
  • Security & Compliance
  • Settings
  • Support
  • Supported topics
  • Tools
  • Using EtherAssist
  • Windows 11 readiness
  • PowerShell
  • Release Notes

Create PowerShell scripts

EtherAssist can help draft, explain, and review PowerShell for Microsoft 365, Graph, Azure, Windows, and operational automation.

Before you begin

  • Confirm the target platform, such as Microsoft Graph, Azure, Exchange Online, Intune, or Windows.
  • Decide whether the script must be read-only or can make changes.
  • Know the PowerShell version you need, such as Windows PowerShell 5.1 or PowerShell 7.
  • Review authentication, permissions, and test environment requirements before running generated code.

Create a script

PowerShell script request in chat

  1. Open Chat.
  2. Select Coding for code-focused output, or Standard for simple script drafts.
  3. State the PowerShell version, target service, permission model, expected input, and expected output.
  4. Ask for a read-only script first unless you explicitly need a change script.
  5. Request comments, assumptions, and safety checks.
  6. Review the generated script before saving or running it.

Example:

Create a PowerShell 7 read-only script that accepts a CSV of device names and outputs a table of readiness status. Include comments where Microsoft Graph calls would be added after approval.

Expected result: EtherAssist returns a script with the requested inputs, outputs, and review notes.

Refine the script

Generated PowerShell script output

  1. Ask EtherAssist to explain the script line by line.
  2. Request error handling, logging, or -WhatIf support where useful.
  3. Ask for the minimum permissions required.
  4. Ask for a rollback or validation step before using the script in production.

Safety checklist

  • Test in a non-production tenant, lab, or limited pilot group first.
  • Do not run generated scripts blindly in production.
  • Check modules, scopes, and tenant identifiers before execution.
  • Remove secrets, tokens, and customer data before sharing script examples.
  • Have a peer review destructive commands such as remove, delete, revoke, disable, or reset.

Troubleshooting

IssueWhat to check
Module import failsConfirm the module name, version, and installation source.
Authentication failsCheck tenant, app registration, delegated scopes, and admin consent.
Output is incompleteProvide sample input and ask EtherAssist to handle missing or malformed rows.
Script is too riskyAsk for a read-only assessment version before requesting remediation code.

Next steps

Tips

  • Keep prompts, names, and configuration values specific to the task you are performing.