Snippets/Dialogs/msgboxYesNo.snippets.ps1xml

<?xml version='1.0' encoding='utf-8' ?>
    <Snippets xmlns='http://schemas.microsoft.com/PowerShell/Snippets'>
        <Snippet Version='1.0.0'>
            <Header>
                <Title>Simple Yes-No-Dialog</Title>
                <Description>Opens a MsgBox with Yes and No buttons.</Description>
                <Shortcut></Shortcut>
                <Keywords>Comment,Parameter,Attribute,Pipeline,ScriptBlock,Editor,Console</Keywords>
                <Author>Tobias Weltner</Author>
                <DifficultyLevel>1</DifficultyLevel>
                <SnippetTypes>
                    <SnippetType>Expansion</SnippetType>
                    <SnippetType>SurroundsWith</SnippetType>
                </SnippetTypes>
                <Requirements>
                    <MinimumPowerShellVersion>0</MinimumPowerShellVersion>
                    <RequiredModules></RequiredModules>
                    <AdminPrivileges>False</AdminPrivileges>
                    <ProcessorArchitecture>x86,x64</ProcessorArchitecture>
                </Requirements>
            </Header>
            <Declarations>
                <Literal>
                   <ID><![CDATA[17;13;0]]></ID>
                   <Default></Default>
                   <ToolTip><![CDATA[]]></ToolTip>
                   <ToolTipStatusbar><![CDATA[text to prompt]]></ToolTipStatusbar>
                   <EncloseSelection>true</EncloseSelection>
                </Literal>
                <Literal>
                   <ID><![CDATA[56;15;0]]></ID>
                   <Default></Default>
                   <ToolTip><![CDATA[]]></ToolTip>
                   <ToolTipStatusbar><![CDATA[dialog window header text]]></ToolTipStatusbar>
                </Literal>
            </Declarations>
 
 
            <Code>
                <Script Language='PowerShell' SubLanguage='VBScript' CaretOffset='75'>
                    <![CDATA[result = MsgBox("Are you sure?", vbYesNo + vbQuestion, "Simple Question")
]]>
                </Script>
            </Code>
 
    </Snippet>
</Snippets>