复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。
当你需要创建使用 GoreloAction 的脚本时,将以下提示复制并粘贴到 Claude 或类似的 AI 助手中。请务必将 [describe your monitoring need] 替换为你的具体需求。
示例 1:“监控磁盘空间使用情况,当驱动器空闲空间低于 10% 时发出告警。”
示例 2:“每天轮换本地管理员密码并将其写入自定义字段。”
I need to create a simple PowerShell script that integrates with Gorelo RMM using GoreloAction. The script should [describe your monitoring need].GoreloAction supports the following functions:1. Generate Alerts:GoreloAction -Alert -Severity <Int> -Name <String> -Description <String> -Suppress <Int>Severity levels:- 1: Critical- 2: Error- 3: WarningExample: GoreloAction -Alert -Severity 1 -Name "Critical Error" -Description "Details here" -Suppress 242. Write to Custom Fields:GoreloAction -SetCustomField -Name <String> -Value <String>Example: GoreloAction -SetCustomField -Name 'asset.lastCheckTime' -Value "2025-03-09 10:30"3. Read from Custom Fields:Custom fields can be read using the $gorelo: prefix:- Client-level: $gorelo:client.fieldName- Asset-level: $gorelo:asset.fieldName- File access: $gorelo:file.fileName (Gorelo will automatically download any referenced files before running the script)Example: if($gorelo:client.customToken){ # Use the token for actions $token = $gorelo:client.customToken}Example with file:if($gorelo:file.Installer){ # Run the installer that was uploaded to Gorelo Files Start-Process -FilePath $gorelo:file.Installer -ArgumentList "/quiet" -Wait}Please include proper error handling, clear comments, and appropriate alert severity based on the issue detected. Also, please advise on any custom fields or files that need to be created/uploaded in Gorelo before running this script.
生成脚本后,与 AI 助手来回对话,确保它完全满足你的需求。在 Gorelo 中测试脚本,并将任何错误复制/粘贴到 AI 助手以进行故障排除(在测试期间务必将所有 -Suppress 更改为 0)。
此页面对您有帮助吗?
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Gorelo Documentation","colors":{"primary":"#1DAF94","light":"#8AEFDD","dark":"#1DAF94"},"logo":{"light":"https://mintcdn.com/gorelo/J8h_fLstMj_tYUTJ/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=J8h_fLstMj_tYUTJ\u0026q=85\u0026s=3c12ffa7afbcef131d2c6fb36f00e159","dark":"https://mintcdn.com/gorelo/J8h_fLstMj_tYUTJ/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=J8h_fLstMj_tYUTJ\u0026q=85\u0026s=2dc592c604dd68bb156e97c047088df2"},"favicon":"https://mintcdn.com/gorelo/eK-NlDv-DeG3Jk2m/favicon.svg?fit=max\u0026auto=format\u0026n=eK-NlDv-DeG3Jk2m\u0026q=85\u0026s=99510712391acd38a7057cf358869244","api":{"url":"full"},"appearance":{"default":"dark"},"background":{"color":{"light":"#FBFBFB","dark":"#1F2023"}},"navbar":{"links":[{"href":"https://feedback.gorelo.io/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.mintlify.com"}},"footer":{"socials":{"x":"https://twitter.com/Goreloio","facebook":"https://www.facebook.com/gorelo.io","linkedin":"https://www.linkedin.com/company/gorelo","youtube":"https://www.youtube.com/@gorelotech","discord":"https://discord.com/invite/BpmP8BSrj6","website":"https://www.gorelo.io/"}},"seo":{"indexing":"navigable"},"fonts":{"family":"Inter","weight":400},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"what-is-gorelo"},{"language":"ar","href":"ar/what-is-gorelo"},{"language":"pt-BR","href":"pt-BR/what-is-gorelo"},{"language":"fr-CA","href":"fr-CA/what-is-gorelo"},{"language":"ca","href":"ca/what-is-gorelo"},{"language":"cn","href":"cn/what-is-gorelo"},{"language":"zh","href":"zh/what-is-gorelo"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gorelo","hasAudioNarration":false,"actualSubdomain":"gorelo","customDomains":["help.gorelo.io"],"gitSource":{"type":"github","owner":"gorelo","repo":"gorelo_public_docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae8d4d10fa11179c6ce1fe3","collectionId":"b88c05f9-ba3d-4ccb-a428-07a004a1c734","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae8d4d10fa11179c6ce1fe3"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae8d4d10fa11179c6ce1fe3","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"en","tag":"API","count":172},{"language":"ar","tag":"API","count":172},{"language":"ca","tag":"API","count":172},{"language":"cn","tag":"API","count":172},{"language":"fr-CA","tag":"API","count":172},{"language":"pt-BR","tag":"API","count":172},{"language":"zh","tag":"API","count":172},{"language":"en","tag":"API reference","count":169},{"language":"ar","tag":"مرجع API","count":169},{"language":"ca","tag":"Referència de l'API","count":169},{"language":"cn","tag":"API 参考","count":169},{"language":"fr-CA","tag":"Référence de l'API","count":169},{"language":"pt-BR","tag":"Referência da API","count":169},{"language":"zh","tag":"API 參考","count":169},{"language":"en","tag":"Billing","count":44},{"language":"en","tag":"Service Delivery","count":40},{"language":"ar","tag":"تقديم الخدمة","count":40},{"language":"ca","tag":"Prestació de servei","count":40},{"language":"cn","tag":"服务交付","count":40},{"language":"fr-CA","tag":"Prestation de services","count":40},{"language":"pt-BR","tag":"Entrega de serviços","count":40},{"language":"zh","tag":"服務交付","count":40},{"language":"en","tag":"Remote Management","count":35},{"language":"ar","tag":"الإدارة عن بُعد","count":35},{"language":"ca","tag":"Gestió remota","count":35},{"language":"cn","tag":"远程管理","count":35},{"language":"fr-CA","tag":"Gestion à distance","count":35},{"language":"pt-BR","tag":"Gerenciamento remoto","count":35},{"language":"zh","tag":"遠端管理","count":35},{"language":"en","tag":"Projects","count":34},{"language":"en","tag":"Assets","count":34},{"language":"ar","tag":"Billing","count":34},{"language":"ca","tag":"Billing","count":34},{"language":"cn","tag":"Billing","count":34},{"language":"fr-CA","tag":"Billing","count":34},{"language":"pt-BR","tag":"Billing","count":34},{"language":"zh","tag":"Billing","count":34},{"language":"ar","tag":"Projects","count":31},{"language":"ca","tag":"Projects","count":31},{"language":"cn","tag":"Projects","count":31},{"language":"fr-CA","tag":"Projects","count":31},{"language":"pt-BR","tag":"Projects","count":31},{"language":"zh","tag":"Projects","count":31},{"language":"ar","tag":"Assets","count":30},{"language":"ca","tag":"Assets","count":30},{"language":"cn","tag":"Assets","count":30},{"language":"fr-CA","tag":"Assets","count":30},{"language":"pt-BR","tag":"Assets","count":30},{"language":"zh","tag":"Assets","count":30},{"language":"en","tag":"Tickets","count":25},{"language":"pt-BR","tag":"Tickets","count":25},{"language":"en","tag":"How-to guides","count":19},{"language":"en","tag":"Documents","count":19},{"language":"ar","tag":"أدلة الكيفية","count":19},{"language":"ar","tag":"Tickets","count":19},{"language":"ca","tag":"Guies pràctiques","count":19},{"language":"ca","tag":"Documents","count":19},{"language":"ca","tag":"Tickets","count":19},{"language":"cn","tag":"操作指南","count":19},{"language":"cn","tag":"Tickets","count":19},{"language":"fr-CA","tag":"Guides pratiques","count":19},{"language":"fr-CA","tag":"Documents","count":19},{"language":"fr-CA","tag":"Tickets","count":19},{"language":"pt-BR","tag":"Guias práticos","count":19},{"language":"zh","tag":"操作指南","count":19},{"language":"zh","tag":"Tickets","count":19},{"language":"ar","tag":"Documents","count":16},{"language":"cn","tag":"Documents","count":16},{"language":"pt-BR","tag":"Documents","count":16},{"language":"zh","tag":"Documents","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"help@gorelo.io","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cn/example-prompt-to-generate-a-script-with-ai","slug":"/cn/example-prompt-to-generate-a-script-with-ai","pageMetadata":{"title":"使用 AI 生成脚本的示例提示","description":"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。","href":"/cn/example-prompt-to-generate-a-script-with-ai"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`当你需要创建使用 GoreloAction 的脚本时,将以下提示复制并粘贴到 Claude 或类似的 AI 助手中。请务必将 `,_jsx(_components.code,{children:`[describe your monitoring need]`}),` 替换为你的具体需求。`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`示例 1:“监控磁盘空间使用情况,当驱动器空闲空间低于 10% 时发出告警。”`}),`\n`,_jsx(_components.li,{children:`示例 2:“每天轮换本地管理员密码并将其写入自定义字段。”`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`39`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`39`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`I need to create a simple PowerShell script that integrates with Gorelo RMM using GoreloAction. The script should [describe your monitoring need].`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GoreloAction supports the following functions:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Generate Alerts:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GoreloAction -Alert -Severity \u003cInt> -Name \u003cString> -Description \u003cString> -Suppress \u003cInt>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Severity levels:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 1: Critical`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 2: Error`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 3: Warning`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Example: GoreloAction -Alert -Severity 1 -Name \"Critical Error\" -Description \"Details here\" -Suppress 24`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Write to Custom Fields:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GoreloAction -SetCustomField -Name \u003cString> -Value \u003cString>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Example: GoreloAction -SetCustomField -Name 'asset.lastCheckTime' -Value \"2025-03-09 10:30\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. Read from Custom Fields:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Custom fields can be read using the $gorelo: prefix:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Client-level: $gorelo:client.fieldName`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Asset-level: $gorelo:asset.fieldName`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- File access: $gorelo:file.fileName (Gorelo will automatically download any referenced files before running the script)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Example: `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`if($gorelo:client.customToken){`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` # Use the token for actions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` $token = $gorelo:client.customToken`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Example with file:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`if($gorelo:file.Installer){`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` # Run the installer that was uploaded to Gorelo Files`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Start-Process -FilePath $gorelo:file.Installer -ArgumentList \"/quiet\" -Wait`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Please include proper error handling, clear comments, and appropriate alert severity based on the issue detected. Also, please advise on any custom fields or files that need to be created/uploaded in Gorelo before running this script.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`生成脚本后,与 AI 助手来回对话,确保它完全满足你的需求。在 Gorelo 中测试脚本,并将任何错误复制/粘贴到 AI 助手以进行故障排除(在测试期间务必将所有 -Suppress 更改为 0)。`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"使用 AI 生成脚本的示例提示","description":"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。","href":"/cn/example-prompt-to-generate-a-script-with-ai"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"gorelo","siteName":"Gorelo Documentation","title":"使用 AI 生成脚本的示例提示 - Gorelo Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/example-prompt-to-generate-a-script-with-ai","matchLevel":1},"ar":{"href":"/ar/example-prompt-to-generate-a-script-with-ai","matchLevel":1},"pt-BR":{"href":"/pt-BR/example-prompt-to-generate-a-script-with-ai","matchLevel":1},"fr-CA":{"href":"/fr-CA/example-prompt-to-generate-a-script-with-ai","matchLevel":1},"ca":{"href":"/ca/example-prompt-to-generate-a-script-with-ai","matchLevel":1},"cn":{"href":"/cn/example-prompt-to-generate-a-script-with-ai","matchLevel":0},"zh":{"href":"/zh/example-prompt-to-generate-a-script-with-ai","matchLevel":1}}},"lastModified":"2026-06-17T21:34:25.394Z","originalFileLocation":"cn/example-prompt-to-generate-a-script-with-ai.mdx","locale":"cn"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gorelo Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"使用 AI 生成脚本的示例提示 - Gorelo Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gorelo Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gorelo.mintlify.site/_mintlify/api/og/v2?division=%E8%84%9A%E6%9C%AC%E7%A4%BA%E4%BE%8B\u0026amp;title=%E4%BD%BF%E7%94%A8+AI+%E7%94%9F%E6%88%90%E8%84%9A%E6%9C%AC%E7%9A%84%E7%A4%BA%E4%BE%8B%E6%8F%90%E7%A4%BA\u0026amp;description=%E5%A4%8D%E5%88%B6%E4%B8%BA+Claude+%E6%88%96%E5%85%B6%E4%BB%96+AI+%E5%8A%A9%E6%89%8B%E5%87%86%E5%A4%87%E7%9A%84%E7%8E%B0%E6%88%90%E6%8F%90%E7%A4%BA%EF%BC%8C%E7%94%A8%E4%BA%8E%E7%94%9F%E6%88%90%E4%BD%BF%E7%94%A8+GoreloAction+%E5%A4%84%E7%90%86%E5%91%8A%E8%AD%A6%E5%92%8C%E8%87%AA%E5%AE%9A%E4%B9%89%E8%B5%84%E4%BA%A7%E5%AD%97%E6%AE%B5%E7%9A%84+PowerShell+%E8%84%9A%E6%9C%AC%E3%80%82\u0026amp;theme=13a01696fc0cf71f5fdb322b\u0026amp;signature=768ca54ec03a01cf250ff8347c3c72125feddb3bce3e8895cea17c6f3951c395\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"使用 AI 生成脚本的示例提示 - Gorelo Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gorelo.mintlify.site/_mintlify/api/og/v2?division=%E8%84%9A%E6%9C%AC%E7%A4%BA%E4%BE%8B\u0026amp;title=%E4%BD%BF%E7%94%A8+AI+%E7%94%9F%E6%88%90%E8%84%9A%E6%9C%AC%E7%9A%84%E7%A4%BA%E4%BE%8B%E6%8F%90%E7%A4%BA\u0026amp;description=%E5%A4%8D%E5%88%B6%E4%B8%BA+Claude+%E6%88%96%E5%85%B6%E4%BB%96+AI+%E5%8A%A9%E6%89%8B%E5%87%86%E5%A4%87%E7%9A%84%E7%8E%B0%E6%88%90%E6%8F%90%E7%A4%BA%EF%BC%8C%E7%94%A8%E4%BA%8E%E7%94%9F%E6%88%90%E4%BD%BF%E7%94%A8+GoreloAction+%E5%A4%84%E7%90%86%E5%91%8A%E8%AD%A6%E5%92%8C%E8%87%AA%E5%AE%9A%E4%B9%89%E8%B5%84%E4%BA%A7%E5%AD%97%E6%AE%B5%E7%9A%84+PowerShell+%E8%84%9A%E6%9C%AC%E3%80%82\u0026amp;theme=13a01696fc0cf71f5fdb322b\u0026amp;signature=768ca54ec03a01cf250ff8347c3c72125feddb3bce3e8895cea17c6f3951c395\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gorelo/WDrabCfHIb0Y7HhN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gorelo Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1DAF94\">\u003clink data-mint-head rel=\"canonical\" href=\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cn/example-prompt-to-generate-a-script-with-ai.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://help.gorelo.io/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://help.gorelo.io/ar/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://help.gorelo.io/pt-BR/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr-CA\" href=\"https://help.gorelo.io/fr-CA/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ca\" href=\"https://help.gorelo.io/ca/example-prompt-to-generate-a-script-with-ai\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://help.gorelo.io/example-prompt-to-generate-a-script-with-ai\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://help.gorelo.io/#organization\",\"name\":\"Gorelo Documentation\",\"url\":\"https://help.gorelo.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gorelo/J8h_fLstMj_tYUTJ/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=J8h_fLstMj_tYUTJ\u0026q=85\u0026s=3c12ffa7afbcef131d2c6fb36f00e159\"}},{\"@type\":\"WebSite\",\"@id\":\"https://help.gorelo.io#website\",\"name\":\"Gorelo Documentation\",\"url\":\"https://help.gorelo.io\",\"publisher\":{\"@id\":\"https://help.gorelo.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai#webpage\",\"url\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai\",\"name\":\"使用 AI 生成脚本的示例提示\",\"description\":\"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。\",\"dateModified\":\"2026-06-17T21:34:25.394Z\",\"isPartOf\":{\"@id\":\"https://help.gorelo.io#website\"},\"breadcrumb\":{\"@id\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"操作指南\",\"item\":\"https://help.gorelo.io/cn/write-to-a-custom-asset\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"脚本示例\",\"item\":\"https://help.gorelo.io/cn/write-to-a-custom-asset\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"使用 AI 生成脚本的示例提示\",\"item\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai#article\",\"headline\":\"使用 AI 生成脚本的示例提示\",\"name\":\"使用 AI 生成脚本的示例提示\",\"description\":\"复制为 Claude 或其他 AI 助手准备的现成提示,用于生成使用 GoreloAction 处理告警和自定义资产字段的 PowerShell 脚本。\",\"url\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai\",\"mainEntityOfPage\":{\"@id\":\"https://help.gorelo.io/cn/example-prompt-to-generate-a-script-with-ai#webpage\"},\"dateModified\":\"2026-06-17T21:34:25.394Z\",\"publisher\":{\"@id\":\"https://help.gorelo.io/#organization\"},\"isPartOf\":{\"@id\":\"https://help.gorelo.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gorelo Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Gorelo Documentation","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/example-prompt-to-generate-a-script-with-ai"}]},{"language":"ar","pages":[{"title":"ar","href":"/ar/example-prompt-to-generate-a-script-with-ai"}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-BR/example-prompt-to-generate-a-script-with-ai"}]},{"language":"fr-CA","pages":[{"title":"fr-CA","href":"/fr-CA/example-prompt-to-generate-a-script-with-ai"}]},{"language":"ca","pages":[{"title":"ca","href":"/ca/example-prompt-to-generate-a-script-with-ai"}]},{"language":"cn","tabs":[{"tab":"入门","icon":"rocket-launch","pages":[{"title":"入门","href":"/cn/what-is-gorelo"}]},{"tab":"服务交付","icon":"bell","pages":[{"title":"服务交付","href":"/cn/sd-overview"}]},{"tab":"远程管理","icon":"desktop","pages":[{"title":"远程管理概述","icon":"lightbulb","href":"/cn/remote-management-overview"},{"group":"安装监控工具","icon":"terminal","pages":[{"group":"Gorelo Agent","icon":"alien-8bit","pages":[{"title":"什么是 Gorelo Agent","hidden":true,"href":"/cn/what-is-gorelo-agent"},{"title":"部署 Gorelo Agent","href":"/cn/deploy-gorelo-agent"},{"title":"部署 Gorelo Agent 的其他方式","href":"/cn/alternatives-to-deploy-the-gorelo-agent"},{"title":"卸载 Gorelo Agent","href":"/cn/uninstall-gorelo-agent"},{"group":"故障排除","pages":[{"title":"Gorelo Agent 无法安装","href":"/cn/gorelo-agent-wont-install"},{"title":"无法创建 SSL/TLS 安全通道","href":"/cn/could-not-create-ssl-tls-secure-channel"}]}]},{"group":"Gorelo Connect","icon":"wifi","pages":[{"title":"什么是 Gorelo Connect","href":"/cn/what-is-gorelo-connect"},{"title":"安装 Gorelo Connect(远程控制)","href":"/cn/install-gorelo-connect"},{"title":"安装 Gorelo Connect 插件","href":"/cn/install-the-gorelo-connect-plugin"},{"title":"卸载 Gorelo Connect","href":"/cn/uninstall-gorelo-connect"},{"group":"故障排除","pages":[{"title":"Gorelo Connect 在 Windows 上显示黑屏","href":"/cn/gorelo-connect-shows-a-black-screen-on-windows-tech-side"},{"title":"Malwarebytes ThreatDown 阻止 Gorelo Connect","href":"/cn/malwarebytes-threat-down-blocks-gorelo-connect"}]}]}]},{"group":"监控","icon":"amp-guitar","expanded":true,"pages":[{"group":"正常运行时间","icon":"chart-mixed","pages":[{"title":"可用性监控的工作原理","href":"/cn/how-uptime-works"},{"title":"创建可用性检查","href":"/cn/create-an-uptime-check"}]},{"group":"脚本","icon":"angle-right","pages":[{"title":"脚本的工作原理","href":"/cn/how-scripts-work"},{"title":"编写和测试脚本","href":"/cn/write-and-test-a-script"},{"title":"GoreloAction CLI(通过 PowerShell)","href":"/cn/gorelo-action-cli"},{"title":"实时终端","href":"/cn/live-terminal"}]},{"group":"策略","icon":"flask","pages":[{"title":"策略的工作原理","href":"/cn/how-policies-work"},{"title":"在所有资产上部署策略","href":"/cn/deploy-policy-on-all-assets"}]},{"group":"资产","icon":"tag","pages":[{"title":"什么是资产","href":"/cn/what-are-assets"},{"title":"Gorelo 中的资产标签","href":"/cn/what-are-tags"},{"title":"使用标签分组资产","href":"/cn/group-assets-with-tags"},{"group":"故障排除","pages":[{"title":"神秘资产","href":"/cn/mystery-assets"}]}]}]},{"group":"操作指南","icon":"book","pages":[{"group":"脚本示例","pages":[{"title":"使用脚本写入自定义资产字段","href":"/cn/write-to-a-custom-asset"},{"title":"通过自定义客户字段安装软件","href":"/cn/install-via-custom-fields"},{"title":"与现有远程访问工具集成","href":"/cn/existing-remote-access-tools"},{"title":"创建 Windows 11 兼容资产列表","href":"/cn/windows-11"},{"title":"轮换本地管理员密码","href":"/cn/rotate-local-admin-passwords"},{"title":"安装 Slide Agent 用于备份","href":"/cn/install-slide-agent-for-backups"},{"title":"运行时使用变量","description":"使用 Gorelo 脚本变量,在设计时留空,在通过 CLI 按需运行时提示输入,非常适合 Wake on LAN 和临时 PowerShell 任务。","href":"/cn/use-variables-at-runtime"},{"title":"使用 AI 生成脚本的示例提示","href":"/cn/example-prompt-to-generate-a-script-with-ai"}]},{"title":"部署 Gorelo Agent 的其他方式","description":"使用 ImmyBot、Action1 和 NinjaOne 等第三方工具部署 Gorelo Agent,适用于无法使用 PowerShell 或手动安装的环境。","href":"/cn/alternatives-to-deploy-the-gorelo-agent"},{"title":"在 Windows 系统托盘中显示图标","href":"/cn/display-an-icon-in-the-windows-system-tray"},{"title":"使用 Windows Patch Management 自动化更新","href":"/cn/perform-automatic-updates-with-windows-patch-management-plugin"}]},{"group":"故障排除","icon":"triangle-exclamation","pages":[{"title":"防病毒标签页显示旧条目","href":"/cn/antivirus-tab-shows-old-entries"},{"title":"无法创建 SSL/TLS 安全通道","href":"/cn/could-not-create-ssl-tls-secure-channel"}]}]},{"tab":"计费","icon":"sack-dollar","pages":[{"title":"计费","href":"/cn/how-billing-works"}]},{"tab":"集成","icon":"plug","pages":[{"title":"集成","href":"/cn/integrations-overview"}]},{"tab":"API","icon":"satellite-dish","pages":[{"title":"API","href":"/cn/api-overview"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/example-prompt-to-generate-a-script-with-ai"}]}]},"basePath":"","title":"使用 AI 生成脚本的示例提示 - Gorelo Documentation","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":[],"chunks":[]}