├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── ---bug-report.md │ └── --feature-request.md └── workflows │ ├── build-and-release.yml │ └── codeql-analysis.yml ├── .gitignore ├── .postcssrc.js ├── .stylintrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── Lazy Admin.VisualElementsManifest.xml ├── README.md ├── SECURITY.md ├── Square150x150Logo.png ├── Square71x71Logo.png ├── app-icon.png ├── app-splashscreen.png ├── babel.config.js ├── build ├── Start-ParamProcess.ps1 ├── houby-studio-eu-ca.crt ├── installer.nsh └── psexec.nsh ├── package.json ├── policies ├── Lazy Admin ADM ADMX Templates.zip ├── README.md ├── adm │ └── LazyAdmin.adm └── admx │ ├── LazyAdmin.admx │ ├── cs-CZ │ └── LazyAdmin.adml │ └── en-US │ └── LazyAdmin.adml ├── quasar.conf.js ├── quasar.extensions.json ├── scripts-definitions ├── README.md ├── active-directory-module-example.json ├── base-module-example.json ├── docs │ ├── Get-Disk.md │ ├── Get-Help.md │ ├── Invoke-Command.md │ ├── README.md │ ├── Start-Process.md │ ├── Stop-Process.md │ └── Test-Connection.md └── master-definition-example.json ├── src-electron ├── electron-flag.d.ts ├── icons │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── StoreLogo.png │ ├── icon.icns │ ├── icon.ico │ ├── icon.png │ ├── linux-128x128.png │ ├── linux-16x16.png │ ├── linux-24x24.png │ ├── linux-32x32.png │ ├── linux-48x48.png │ ├── linux-512x512.png │ ├── linux-64x64.png │ └── linux-96x96.png └── main-process │ ├── electron-main.dev.js │ └── electron-main.js ├── src ├── App.vue ├── assets │ └── prism_tomorrowlight.css ├── boot │ ├── auto-updater.js │ ├── axios.js │ ├── clipboard2.js │ ├── components.js │ ├── electron-log.js │ ├── i18n.js │ ├── powershell.js │ ├── titlebar-color.js │ └── utils.js ├── components │ ├── CommandDialog.vue │ ├── ExecuteDialog.vue │ ├── HelpDialog.vue │ ├── HistoryDrawer.vue │ ├── LanguagePicker.vue │ ├── ProgressDialog.vue │ ├── ResultsDialog.vue │ ├── ScriptsTable.vue │ ├── SettingsItems.vue │ ├── VersionList.vue │ ├── WindowTitlebar.vue │ └── partials │ │ ├── FloatingActions.vue │ │ └── UpdateStatusIcon.vue ├── css │ ├── app.sass │ └── quasar.variables.sass ├── i18n │ ├── cs-cz │ │ └── index.js │ ├── custom-language-partial.json │ ├── custom-language.json │ ├── en-us │ │ └── index.js │ └── index.js ├── index.template.html ├── layouts │ ├── FullLayout.vue │ └── LoginLayout.vue ├── pages │ ├── AboutPage.vue │ ├── Error404.vue │ ├── Index.vue │ ├── LoginPage.vue │ ├── ScriptsPage.vue │ └── SettingsPage.vue ├── router │ ├── index.js │ └── routes.js ├── statics │ └── pwsh │ │ └── scripts │ │ ├── Get-SavedCredentials.js │ │ └── New-PSSessionWithCredentials.js └── store │ ├── index.js │ ├── lazystore │ ├── actions.js │ ├── getters.js │ ├── index.js │ ├── mutations.js │ └── state.js │ └── store-flag.d.ts └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | 4 | parserOptions: { 5 | parser: 'babel-eslint', 6 | sourceType: 'module' 7 | }, 8 | 9 | env: { 10 | browser: true 11 | }, 12 | 13 | extends: [ 14 | // https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention 15 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 16 | 'plugin:vue/essential', 17 | '@vue/standard' 18 | ], 19 | 20 | // required to lint *.vue files 21 | plugins: [ 22 | 'vue' 23 | ], 24 | 25 | globals: { 26 | 'ga': true, // Google Analytics 27 | 'cordova': true, 28 | '__statics': true, 29 | 'process': true, 30 | 'Capacitor': true, 31 | 'chrome': true 32 | }, 33 | 34 | // add your custom rules here 35 | rules: { 36 | // allow async-await 37 | 'generator-star-spacing': 'off', 38 | // allow paren-less arrow functions 39 | 'arrow-parens': 'off', 40 | 'one-var': 'off', 41 | 42 | 'import/first': 'off', 43 | 'import/named': 'error', 44 | 'import/namespace': 'error', 45 | 'import/default': 'error', 46 | 'import/export': 'error', 47 | 'import/extensions': 'off', 48 | 'import/no-unresolved': 'off', 49 | 'import/no-extraneous-dependencies': 'off', 50 | 'prefer-promise-reject-errors': 'off', 51 | 52 | // allow debugger during development only 53 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F41B Bug report" 3 | about: Create a report to help us improve Lazy Admin 4 | title: "\U0001F41B [BUG] " 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/--feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "✨ Feature request" 3 | about: Suggest an idea for this project 4 | title: "✨ [REQUEST] " 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/build-and-release.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of quasar CLI and its dependencies, build the source code and drafts a release 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | # Name of the workflow 5 | name: build 6 | 7 | # Trigger workflow on push and pull request to master branch 8 | on: 9 | push: 10 | branches: [ master ] 11 | pull_request: 12 | branches: [ master ] 13 | 14 | jobs: 15 | build: 16 | name: Build, notarize and release 17 | 18 | runs-on: windows-latest 19 | 20 | env: 21 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | 23 | steps: 24 | - name: Checkout master branch 25 | uses: actions/checkout@v2 26 | # Download VCN CLI and notarize git 27 | - run: Invoke-WebRequest -Uri (((Invoke-WebRequest -Uri "https://api.github.com/repos/vchain-us/vcn/releases/latest").Content | ConvertFrom-Json).Assets | Where-Object browser_download_url -like '*windows-amd64.exe').browser_download_url -OutFile "vcn.exe" 28 | - run: .\vcn login 29 | env: 30 | VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }} 31 | VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }} 32 | VCN_USER: ${{ secrets.VCN_USER }} 33 | - run: .\vcn.exe notarize --public git://. 34 | env: 35 | VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }} 36 | VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }} 37 | VCN_USER: ${{ secrets.VCN_USER }} 38 | - run: .\vcn authenticate git://. 39 | env: 40 | VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }} 41 | VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }} 42 | VCN_USER: ${{ secrets.VCN_USER }} 43 | # If package.json contains higher version, create tag 44 | - name: Create release tag 45 | id: autotag 46 | uses: Klemensas/action-autotag@1.2.3 47 | with: 48 | tag_prefix: "v" 49 | env: 50 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 51 | # If previous step created tag, draft release 52 | - name: Draft Release 53 | id: draft_release 54 | if: ${{ steps.autotag.outputs.tagname }} # if no tag was created, skip creating draft 55 | uses: actions/create-release@latest 56 | env: 57 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 58 | with: 59 | tag_name: ${{ steps.autotag.outputs.tagname }} 60 | release_name: La💤y Admin 🏷${{ steps.autotag.outputs.tagname }} 61 | body: | 62 | # Changelog 63 | 64 | ## 🚀 New Features 65 | - No new features 66 | 67 | ## 🐛 Bug Fixes 68 | - No new bug fixes 69 | 70 | ## ⭐ Improvements 71 | - No new improvements 72 | 73 | ## 📃 Other Changes 74 | - No other changes 75 | 76 | ## 💬 Release Notes 77 | This is a testing release. 78 | 79 | > Brought to you by 🍄 Houby Studio 80 | draft: true 81 | prerelease: false 82 | # Install yarn, quasar CLI, install depedencies and build and publish if tag and draft was created 83 | - name: Setup Node.js 84 | uses: actions/setup-node@v1 85 | with: 86 | node-version: 12.x 87 | - run: npm install -g yarn 88 | - run: yarn global add @quasar/cli 89 | - run: yarn 90 | - run: yarn release 91 | env: 92 | CSC_LINK: ${{ secrets.CSC_LINK }} 93 | CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} 94 | - run: .\vcn notarize --public .\dist\electron\Packaged\$((Get-Item -Path ".\dist\electron\Packaged\Lazy-Admin-Setup-*.exe").Name) 95 | if: ${{ steps.autotag.outputs.tagname }} # if no tag was created, skip notarizing build 96 | env: 97 | VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }} 98 | VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }} 99 | VCN_USER: ${{ secrets.VCN_USER }} 100 | - run: .\vcn authenticate .\dist\electron\Packaged\$((Get-Item -Path ".\dist\electron\Packaged\Lazy-Admin-Setup-*.exe").Name) 101 | if: ${{ steps.autotag.outputs.tagname }} # if no tag was created, skip authenticating build 102 | env: 103 | VCN_NOTARIZATION_PASSWORD: ${{ secrets.VCN_NOTARIZATION_PASSWORD }} 104 | VCN_PASSWORD: ${{ secrets.VCN_PASSWORD }} 105 | VCN_USER: ${{ secrets.VCN_USER }} 106 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: codeql 2 | 3 | on: 4 | push: 5 | pull_request: 6 | schedule: 7 | - cron: '0 16 * * 3' 8 | 9 | jobs: 10 | CodeQL-Build: 11 | 12 | # CodeQL runs on ubuntu-latest and windows-latest 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout repository 17 | uses: actions/checkout@v2 18 | with: 19 | # We must fetch at least the immediate parents so that if this is 20 | # a pull request then we can checkout the head. 21 | fetch-depth: 2 22 | 23 | # If this run was triggered by a pull request event, then checkout 24 | # the head of the pull request instead of the merge commit. 25 | - run: git checkout HEAD^2 26 | if: ${{ github.event_name == 'pull_request' }} 27 | 28 | # Initializes the CodeQL tools for scanning. 29 | - name: Initialize CodeQL 30 | uses: github/codeql-action/init@v1 31 | # Override language selection by uncommenting this and choosing your languages 32 | with: 33 | languages: javascript 34 | 35 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 36 | # If this step fails, then you should remove it and run the build manually (see below) 37 | #- name: Autobuild 38 | # uses: github/codeql-action/autobuild@v1 39 | 40 | # ℹ️ Command-line programs to run using the OS shell. 41 | # 📚 https://git.io/JvXDl 42 | 43 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 44 | # and modify them (or add more) to build your code if your project 45 | # uses a compiled language 46 | 47 | #- run: | 48 | # make bootstrap 49 | # make release 50 | 51 | - name: Perform CodeQL Analysis 52 | uses: github/codeql-action/analyze@v1 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .thumbs.db 3 | node_modules 4 | 5 | # Quasar core related directories 6 | .quasar 7 | /dist 8 | 9 | # Cordova related directories and files 10 | /src-cordova/node_modules 11 | /src-cordova/platforms 12 | /src-cordova/plugins 13 | /src-cordova/www 14 | 15 | # Capacitor related directories and files 16 | /src-capacitor/www 17 | /src-capacitor/node_modules 18 | 19 | # BEX related directories and files 20 | /src-bex/www 21 | /src-bex/js/core 22 | 23 | # Log files 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Editor directories and files 29 | .idea 30 | .vscode 31 | *.suo 32 | *.ntvs* 33 | *.njsproj 34 | *.sln 35 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | plugins: [ 5 | // to edit target browsers: use "browserslist" field in package.json 6 | require('autoprefixer') 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.stylintrc: -------------------------------------------------------------------------------- 1 | { 2 | "blocks": "never", 3 | "brackets": "never", 4 | "colons": "never", 5 | "colors": "always", 6 | "commaSpace": "always", 7 | "commentSpace": "always", 8 | "cssLiteral": "never", 9 | "depthLimit": false, 10 | "duplicates": true, 11 | "efficient": "always", 12 | "extendPref": false, 13 | "globalDupe": true, 14 | "indentPref": 2, 15 | "leadingZero": "never", 16 | "maxErrors": false, 17 | "maxWarnings": false, 18 | "mixed": false, 19 | "namingConvention": false, 20 | "namingConventionStrict": false, 21 | "none": "never", 22 | "noImportant": false, 23 | "parenSpace": "never", 24 | "placeholder": false, 25 | "prefixVarsWithDollar": "always", 26 | "quotePref": "single", 27 | "semicolons": "never", 28 | "sortOrder": false, 29 | "stackedProperties": "never", 30 | "trailingWhitespace": "never", 31 | "universal": "never", 32 | "valid": true, 33 | "zeroUnits": "never", 34 | "zIndexNormalize": false 35 | } 36 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at contact@houby-studio.eu. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. 4 | 5 | Please note we have a code of conduct, please follow it in all your interactions with the project. 6 | 7 | # Pull Request Process 8 | 9 | 1. Ensure you have setup quasar correctly and have proper .gitignore file to emit all build dependencies in commit. 10 | 2. Update the README.md with details of changes to the application in changelog section. 11 | 3. You may request Houby Studio administrator to merge for you. 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Houby Studio 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Lazy Admin.VisualElementsManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lazy Admin 2 | 3 | GUI for PowerShell scripts to simplify day to day IT tasks. 4 | 5 | ![GitHub package.json version](https://img.shields.io/github/package-json/v/houby-studio/lazy-admin) 6 | ![build](https://github.com/houby-studio/lazy-admin/workflows/build/badge.svg) 7 | ![codeql](https://github.com/houby-studio/lazy-admin/workflows/codeql/badge.svg) 8 | ![GitHub All Releases](https://img.shields.io/github/downloads/houby-studio/lazy-admin/total) 9 | ![GitHub](https://img.shields.io/github/license/houby-studio/lazy-admin) 10 | 11 | # Description 12 | 13 | Lazy Admin is application made for handling PowerShell scripts via GUI. It is especially useful in environments, where most administrators are inexperienced PowerShell users. Build your own definitions in simple JSON format to allow everyone to use PowerShell via simple HTML forms. Besides allowing to use shell commands via GUI, Lazy Admin offers additional functions like storing previous commands, parameters and outputs, exporting to CSV or chaining commands together, allowing users to use more complex workflows, and there is much more to come! 14 | 15 | # Learn more 16 | 17 | You can find nearly everything on [Wiki](https://github.com/houby-studio/lazy-admin/wiki). If you have more questions, feel free to open an [Issue](https://github.com/houby-studio/lazy-admin/issues) 18 | 19 | # Developers 20 | 21 | ## Install the dependencies 22 | ```bash 23 | yarn 24 | ``` 25 | 26 | ### Start the app in development mode (hot-code reloading, error reporting, etc.) 27 | ```bash 28 | quasar dev 29 | ``` 30 | 31 | ### Lint the files 32 | ```bash 33 | yarn run lint 34 | ``` 35 | 36 | ### Build the app for production 37 | ```bash 38 | quasar build 39 | ``` 40 | 41 | ### Customize the configuration 42 | See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-js). 43 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Supported version is only the latest one, being this agile project with each commit being new release and having application with enforced auto-update, there is no need to support older versions. 6 | This application is product of creative learning. Any use of this software is at your own risk. 7 | 8 | | Version | Support | 9 | | ------- | ----------- | 10 | | latest | limited | 11 | 12 | ## Reporting a Vulnerability 13 | 14 | If you find any vulnerablity, post to Issues or contact us via e-mail contact@houby-studio.eu 15 | 16 | Any fixable vulnerability at our code will be fixed as soon as possible. 17 | Any vulnerability in dependend package will be updated as soon as package maintainer releases fix. 18 | Given the purpose of this application, it will always be dangerous tool dedicated to experienced administrators. 19 | -------------------------------------------------------------------------------- /Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/Square150x150Logo.png -------------------------------------------------------------------------------- /Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/Square71x71Logo.png -------------------------------------------------------------------------------- /app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/app-icon.png -------------------------------------------------------------------------------- /app-splashscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/app-splashscreen.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@quasar/babel-preset-app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /build/Start-ParamProcess.ps1: -------------------------------------------------------------------------------- 1 | # Obtain non-empty arguments passed to installer and trim possible dashes and slashes 2 | $InstallArguments = $args | Where-Object { $_.trim() -ne "" } | ForEach-Object { if ($_ -match '^[/-]') { $_.Substring(1) } else { $_ } } 3 | 4 | # Possible install arguments with values 5 | $ArgsValues = @( 6 | "Url", 7 | "LangUrl" 8 | ) 9 | 10 | # Possible install arguments without values 11 | $ArgsSwitches = @( 12 | "InstallPwsh", 13 | "InstallCredMgr", 14 | "SetUtf8", 15 | "ImportCert" 16 | ) 17 | 18 | $ParsedArguments = @{} 19 | 20 | # Parse arguments with values 21 | foreach ($Argument in $ArgsValues) { 22 | # Check if passed parameters contain our switch 23 | $Match = $InstallArguments -match "^$Argument" 24 | if ($Match) { 25 | # Check if parameter was passed with = or with space 26 | if ($Match -match "^$Argument=") { 27 | $ParsedArguments.Add($Argument, $Match.Split("=", 2)[1]) 28 | } 29 | else { 30 | $ParsedArguments.Add($Argument, $InstallArguments[$InstallArguments.IndexOf("$Match") + 1]) 31 | } 32 | } 33 | } 34 | 35 | # Parse arguments switches 36 | foreach ($Argument in $ArgsSwitches) { 37 | # Check if passed parameters contain our switch 38 | $Match = $InstallArguments -match "^$Argument" 39 | if ($Match) { 40 | $ParsedArguments.Add($Argument, $true) 41 | } 42 | } 43 | 44 | ##### Process parameters ##### 45 | # Master definition url 46 | if ($ParsedArguments["Url"]) { 47 | New-Item -Path "HKLM:\SOFTWARE" -Name "LazyAdmin" 48 | Set-ItemProperty -Path "HKLM:\Software\" -Name "MasterDefinitionUrl" -Value $ParsedArguments["Url"] 49 | } 50 | 51 | # Custom language url 52 | if ($ParsedArguments["LangUrl"]) { 53 | New-Item -Path "HKLM:\SOFTWARE" -Name "LazyAdmin" 54 | Set-ItemProperty -Path "HKLM:\Software\LazyAdmin" -Name "CustomLanguageUrl" -Value $ParsedArguments["LangUrl"] 55 | } 56 | 57 | # Install PowerShell Core 58 | if ($ParsedArguments["InstallPwsh"]) { 59 | Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -AddExplorerContextMenu -Quiet -UseMSI" 60 | } 61 | 62 | # Install Credential Manager from powershellgallery.com 63 | if ($ParsedArguments["InstallCredMgr"]) { 64 | Install-Module -Name CredentialManager -Scope AllUsers -Force 65 | } 66 | 67 | # Switch locale to UTF-8 68 | if ($ParsedArguments["SetUtf8"]) { 69 | $CodePageProperties = @{ 70 | ACP = 65001 71 | MACCP = 65001 72 | OEMCP = 65001 73 | } 74 | foreach ($Item in $CodePageProperties.Keys) { 75 | [void](New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage" -Name $Item -PropertyType String -Value $CodePageProperties[$Item] -Force) 76 | } 77 | } 78 | 79 | # Import Houby Studio root CA to trusted certificates 80 | if ($ParsedArguments["ImportCert"]) { 81 | $Hex = "04,00,00,00,01,00,00,00,10,00,00,00,5c,4a,73,1f,11,b7,dd,41,94,03,7b,66,9f,f2,2e,90,0f,00,00,00,01,00,00,00,20,00,00,00,27,1e,1a,91,b7,d1,8d,10,ca,4a,8c,bc,ec,e2,6a,dc,39,90,f9,69,40,fa,2c,7c,d6,ab,33,6d,52,40,9b,b0,14,00,00,00,01,00,00,00,14,00,00,00,8e,cd,84,9e,ec,a6,a8,7c,38,31,58,7d,14,78,c8,7c,5a,d6,f2,4d,19,00,00,00,01,00,00,00,10,00,00,00,6f,82,2e,42,62,f7,9f,b0,15,bb,e0,f1,4a,a1,4e,11,03,00,00,00,01,00,00,00,14,00,00,00,7a,64,5a,eb,80,16,71,db,9c,e1,c3,e4,21,fd,11,e0,b5,2d,6c,2f,5c,00,00,00,01,00,00,00,04,00,00,00,00,10,00,00,20,00,00,00,01,00,00,00,56,06,00,00,30,82,06,52,30,82,04,3a,a0,03,02,01,02,02,14,57,ca,8a,dc,84,07,b2,6f,c0,55,18,71,73,e2,38,73,3c,29,ee,32,30,0d,06,09,2a,86,48,86,f7,0d,01,01,0b,05,00,30,81,b1,31,0b,30,09,06,03,55,04,06,13,02,43,5a,31,17,30,15,06,03,55,04,08,0c,0e,43,7a,65,63,68,20,52,65,70,75,62,6c,69,63,31,0f,30,0d,06,03,55,04,07,0c,06,50,72,61,67,75,65,31,15,30,13,06,03,55,04,0a,0c,0c,48,6f,75,62,79,20,53,74,75,64,69,6f,31,1f,30,1d,06,03,55,04,0b,0c,16,44,65,76,65,6c,6f,70,6d,65,6e,74,20,44,65,70,61,72,74,6d,65,6e,74,31,18,30,16,06,03,55,04,03,0c,0f,68,6f,75,62,79,2d,73,74,75,64,69,6f,2e,65,75,31,26,30,24,06,09,2a,86,48,86,f7,0d,01,09,01,16,17,63,6f,6e,74,61,63,74,40,68,6f,75,62,79,2d,73,74,75,64,69,6f,2e,65,75,30,1e,17,0d,32,30,30,36,30,33,31,32,35,31,33,33,5a,17,0d,34,30,30,35,32,39,31,32,35,31,33,33,5a,30,81,b1,31,0b,30,09,06,03,55,04,06,13,02,43,5a,31,17,30,15,06,03,55,04,08,0c,0e,43,7a,65,63,68,20,52,65,70,75,62,6c,69,63,31,0f,30,0d,06,03,55,04,07,0c,06,50,72,61,67,75,65,31,15,30,13,06,03,55,04,0a,0c,0c,48,6f,75,62,79,20,53,74,75,64,69,6f,31,1f,30,1d,06,03,55,04,0b,0c,16,44,65,76,65,6c,6f,70,6d,65,6e,74,20,44,65,70,61,72,74,6d,65,6e,74,31,18,30,16,06,03,55,04,03,0c,0f,68,6f,75,62,79,2d,73,74,75,64,69,6f,2e,65,75,31,26,30,24,06,09,2a,86,48,86,f7,0d,01,09,01,16,17,63,6f,6e,74,61,63,74,40,68,6f,75,62,79,2d,73,74,75,64,69,6f,2e,65,75,30,82,02,22,30,0d,06,09,2a,86,48,86,f7,0d,01,01,01,05,00,03,82,02,0f,00,30,82,02,0a,02,82,02,01,00,d7,92,29,68,63,3d,25,8e,74,fe,4a,3f,24,b4,ee,cc,7d,fd,ba,2a,2f,4f,a4,c9,c8,10,11,ff,fe,20,70,8e,b6,b0,22,21,86,b9,99,29,be,a4,0d,a2,82,8f,d1,0a,ee,f1,bb,ac,73,a1,27,eb,dc,13,b1,30,95,8d,ba,3e,7e,14,04,38,4e,67,38,53,62,f1,e7,91,0b,eb,6a,1c,39,a5,f9,02,5c,3e,d2,81,94,02,fa,01,d6,3f,b1,61,5f,68,cc,6b,b7,b6,37,63,09,05,04,28,ce,e7,55,cd,31,bd,21,45,15,43,04,5f,7a,a9,0d,a4,6e,d7,ca,be,79,ff,f4,8b,91,21,4c,fb,2e,9e,2b,89,1b,a6,31,90,21,2a,9b,06,de,aa,14,23,12,cb,5f,9e,1e,de,9d,4a,18,a9,86,9f,1f,80,d9,d1,33,04,33,fe,32,75,3e,11,12,30,0c,9a,49,7d,5a,27,0b,67,a1,da,0d,c6,08,38,e8,92,d0,15,86,96,21,75,8a,eb,45,f8,5a,0d,81,33,12,3a,4f,ad,72,12,95,fa,77,42,a1,63,38,64,11,9c,68,a4,5a,32,22,46,85,17,a8,44,de,ab,77,27,7a,65,d2,80,eb,4d,34,3e,d7,83,95,ca,e1,78,11,fd,7d,f4,d1,7a,07,b7,2f,78,3a,e1,8b,54,11,81,56,f3,89,25,39,48,1f,f9,10,72,07,a1,a3,0c,14,c4,10,4d,50,da,65,ec,d2,a8,25,b0,a7,2a,77,9f,36,28,8d,7a,41,1f,5f,bc,e8,3f,f4,73,00,68,25,f3,bb,0f,84,bd,39,14,54,f9,30,31,a8,d8,8a,b4,d5,69,31,61,b0,84,51,69,7e,32,1b,ca,3e,aa,b3,7b,ca,ad,50,11,1e,6c,9d,82,4f,32,4a,6e,31,c2,53,7e,7a,49,51,ab,4a,ff,b0,60,9a,a6,fe,1e,6f,c9,53,81,bf,21,b8,6f,66,27,4b,77,ab,4c,db,4d,76,60,e7,6c,12,1c,d2,5c,9a,42,ae,2e,bd,4b,ab,2f,27,dc,0d,29,ed,06,8b,20,36,3a,6a,60,ea,ec,47,34,ac,c0,8a,7a,22,92,b7,bf,e9,cd,94,1b,81,96,0b,2e,48,e3,dc,b8,a7,be,dd,6a,36,e2,5c,ac,0b,d5,3f,3a,74,fb,b4,44,f9,36,2f,83,a1,3c,3b,f5,d6,ce,03,3e,02,fa,ae,9e,7c,cd,48,97,84,66,02,11,38,4a,b6,56,87,ef,90,31,a2,0a,93,a7,03,e8,98,fe,42,e6,9c,c6,44,3d,cd,eb,cd,a0,06,a8,f1,1d,1b,17,02,03,01,00,01,a3,60,30,5e,30,1d,06,03,55,1d,0e,04,16,04,14,8e,cd,84,9e,ec,a6,a8,7c,38,31,58,7d,14,78,c8,7c,5a,d6,f2,4d,30,1f,06,03,55,1d,23,04,18,30,16,80,14,8e,cd,84,9e,ec,a6,a8,7c,38,31,58,7d,14,78,c8,7c,5a,d6,f2,4d,30,0f,06,03,55,1d,13,01,01,ff,04,05,30,03,01,01,ff,30,0b,06,03,55,1d,0f,04,04,03,02,01,06,30,0d,06,09,2a,86,48,86,f7,0d,01,01,0b,05,00,03,82,02,01,00,1a,f2,c4,2c,d7,8b,b8,79,99,d4,72,79,a2,d0,52,c1,d6,93,ca,9f,42,f1,0e,ab,2d,41,e4,08,c4,d9,de,25,ed,36,2e,1c,0a,c0,9a,9b,f7,2d,1a,cd,c4,9d,33,1b,56,79,5a,a6,4b,8f,47,63,f7,a6,a6,76,6d,40,5e,1c,da,7c,b4,eb,01,20,ea,51,45,22,8e,a9,d1,d1,39,4b,0f,b2,ba,06,e6,c5,60,31,1e,ba,62,f8,f9,9a,21,29,c8,8c,4f,53,3d,55,4d,a6,1e,27,f7,ca,ef,52,2f,8d,94,12,2c,f5,7e,2c,69,f0,83,27,6c,be,66,63,3c,d9,f1,59,ac,23,42,94,16,5b,72,06,08,cb,ad,08,b8,b3,68,74,e0,1a,0a,b6,dd,ee,67,2e,e0,28,8c,11,87,c0,11,2b,fe,33,31,4d,4a,ed,24,ae,92,09,b8,ac,fa,7e,fd,f8,97,e9,a0,a0,6f,22,91,4b,43,72,98,8e,8e,a0,ab,4c,cc,b4,a2,e3,08,8b,af,d2,47,f2,cd,9a,61,7b,98,3e,1f,1b,7f,d3,1d,de,ad,9f,37,59,12,09,70,75,50,ca,cf,01,33,64,39,a4,87,c5,6c,9e,f6,61,55,7b,76,c2,d6,ce,4e,84,f5,64,b2,d7,8e,9d,e8,96,38,ad,d3,df,ec,25,60,82,75,15,91,a9,43,36,ec,e2,05,aa,66,18,af,63,ff,bc,9a,2c,3d,1a,ab,87,31,0e,c4,82,dd,b8,12,2a,5f,72,4d,3b,47,3b,c3,3c,9b,af,21,03,b5,18,c1,85,c5,c1,88,4f,8e,78,a2,b8,ec,22,17,fb,25,30,35,e2,38,c3,3d,54,44,fc,46,40,78,4b,68,35,53,a3,bc,51,75,82,f5,3e,2d,68,15,2c,2e,72,c4,2c,a0,5c,6f,b8,02,31,da,ac,ec,b9,1c,58,0f,21,13,b4,9f,34,c9,e9,4d,45,2c,81,6c,89,e1,20,a9,d3,54,3f,a3,42,90,2a,bd,01,25,cc,f2,d8,01,13,b4,b8,d0,5a,e3,59,48,6b,77,69,29,6b,2f,a2,83,0a,32,68,dc,87,90,5c,96,e6,c9,fb,f6,89,4d,ec,7e,17,10,84,5c,fa,68,b9,b9,d4,bb,f2,94,94,22,90,8a,70,4e,95,1a,ed,35,a0,2a,c5,97,8e,90,fe,49,a4,83,69,a1,9c,85,98,e6,cc,63,7f,8c,ac,d2,50,99,96,b6,bc,ca,1a,fe,cc,ca,b6,5a,b0,0e,f8,65,06,3c,58,aa,4b,62,b1,50,15,78,af,1f,1f,70,f2,d9,c8,5d,3e,f5,a0,d2,52,75,24" 82 | $FormatedHex = $Hex.Split(',') | ForEach-Object { "0x$_" } 83 | New-Item -Path "HKLM:\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\Certificates" -Name "7A645AEB801671DB9CE1C3E421FD11E0B52D6C2F" -Force 84 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\Certificates\7A645AEB801671DB9CE1C3E421FD11E0B52D6C2F" -Name "Blob" -Value ([byte[]]$FormatedHex) 85 | } 86 | -------------------------------------------------------------------------------- /build/houby-studio-eu-ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGUjCCBDqgAwIBAgIUV8qK3IQHsm/AVRhxc+I4czwp7jIwDQYJKoZIhvcNAQEL 3 | BQAwgbExCzAJBgNVBAYTAkNaMRcwFQYDVQQIDA5DemVjaCBSZXB1YmxpYzEPMA0G 4 | A1UEBwwGUHJhZ3VlMRUwEwYDVQQKDAxIb3VieSBTdHVkaW8xHzAdBgNVBAsMFkRl 5 | dmVsb3BtZW50IERlcGFydG1lbnQxGDAWBgNVBAMMD2hvdWJ5LXN0dWRpby5ldTEm 6 | MCQGCSqGSIb3DQEJARYXY29udGFjdEBob3VieS1zdHVkaW8uZXUwHhcNMjAwNjAz 7 | MTI1MTMzWhcNNDAwNTI5MTI1MTMzWjCBsTELMAkGA1UEBhMCQ1oxFzAVBgNVBAgM 8 | DkN6ZWNoIFJlcHVibGljMQ8wDQYDVQQHDAZQcmFndWUxFTATBgNVBAoMDEhvdWJ5 9 | IFN0dWRpbzEfMB0GA1UECwwWRGV2ZWxvcG1lbnQgRGVwYXJ0bWVudDEYMBYGA1UE 10 | AwwPaG91Ynktc3R1ZGlvLmV1MSYwJAYJKoZIhvcNAQkBFhdjb250YWN0QGhvdWJ5 11 | LXN0dWRpby5ldTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeSKWhj 12 | PSWOdP5KPyS07sx9/boqL0+kycgQEf/+IHCOtrAiIYa5mSm+pA2igo/RCu7xu6xz 13 | oSfr3BOxMJWNuj5+FAQ4Tmc4U2Lx55EL62ocOaX5Alw+0oGUAvoB1j+xYV9ozGu3 14 | tjdjCQUEKM7nVc0xvSFFFUMEX3qpDaRu18q+ef/0i5EhTPsuniuJG6YxkCEqmwbe 15 | qhQjEstfnh7enUoYqYafH4DZ0TMEM/4ydT4REjAMmkl9WicLZ6HaDcYIOOiS0BWG 16 | liF1iutF+FoNgTMSOk+tchKV+ndCoWM4ZBGcaKRaMiJGhReoRN6rdyd6ZdKA6000 17 | PteDlcrheBH9ffTRege3L3g64YtUEYFW84klOUgf+RByB6GjDBTEEE1Q2mXs0qgl 18 | sKcqd582KI16QR9fvOg/9HMAaCXzuw+EvTkUVPkwMajYirTVaTFhsIRRaX4yG8o+ 19 | qrN7yq1QER5snYJPMkpuMcJTfnpJUatK/7Bgmqb+Hm/JU4G/IbhvZidLd6tM2012 20 | YOdsEhzSXJpCri69S6svJ9wNKe0GiyA2Ompg6uxHNKzAinoikre/6c2UG4GWCy5I 21 | 49y4p77dajbiXKwL1T86dPu0RPk2L4OhPDv11s4DPgL6rp58zUiXhGYCEThKtlaH 22 | 75AxogqTpwPomP5C5pzGRD3N682gBqjxHRsXAgMBAAGjYDBeMB0GA1UdDgQWBBSO 23 | zYSe7KaofDgxWH0UeMh8WtbyTTAfBgNVHSMEGDAWgBSOzYSe7KaofDgxWH0UeMh8 24 | WtbyTTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsF 25 | AAOCAgEAGvLELNeLuHmZ1HJ5otBSwdaTyp9C8Q6rLUHkCMTZ3iXtNi4cCsCam/ct 26 | Gs3EnTMbVnlapkuPR2P3pqZ2bUBeHNp8tOsBIOpRRSKOqdHROUsPsroG5sVgMR66 27 | Yvj5miEpyIxPUz1VTaYeJ/fK71IvjZQSLPV+LGnwgydsvmZjPNnxWawjQpQWW3IG 28 | CMutCLizaHTgGgq23e5nLuAojBGHwBEr/jMxTUrtJK6SCbis+n79+JfpoKBvIpFL 29 | Q3KYjo6gq0zMtKLjCIuv0kfyzZphe5g+Hxt/0x3erZ83WRIJcHVQys8BM2Q5pIfF 30 | bJ72YVV7dsLWzk6E9WSy146d6JY4rdPf7CVggnUVkalDNuziBapmGK9j/7yaLD0a 31 | q4cxDsSC3bgSKl9yTTtHO8M8m68hA7UYwYXFwYhPjniiuOwiF/slMDXiOMM9VET8 32 | RkB4S2g1U6O8UXWC9T4taBUsLnLELKBcb7gCMdqs7LkcWA8hE7SfNMnpTUUsgWyJ 33 | 4SCp01Q/o0KQKr0BJczy2AETtLjQWuNZSGt3aSlrL6KDCjJo3IeQXJbmyfv2iU3s 34 | fhcQhFz6aLm51LvylJQikIpwTpUa7TWgKsWXjpD+SaSDaaGchZjmzGN/jKzSUJmW 35 | trzKGv7MyrZasA74ZQY8WKpLYrFQFXivHx9w8tnIXT71oNJSdSQ= 36 | -----END CERTIFICATE----- 37 | -------------------------------------------------------------------------------- /build/installer.nsh: -------------------------------------------------------------------------------- 1 | ; References: https://nsis.sourceforge.io/Docs/AppendixE.html https://nsis.sourceforge.io/Docs/Chapter4.html 2 | !include x64.nsh 3 | !include ${PROJECT_DIR}\build\psexec.nsh 4 | 5 | !macro preInit 6 | 7 | !define regkey "Software\LazyAdmin" 8 | !define masterdefinitionkey "MasterDefinitionUrl" 9 | !define customlanguagekey "CustomLanguageUrl" 10 | 11 | !define exampleMasterDefinition "https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/master-definition-example.json" 12 | 13 | ${ifNot} ${isUpdated} 14 | ; Application is 64-bit, NSIS installer is 32-bit 15 | ${If} ${RunningX64} 16 | SetRegView 64 17 | ${EndIf} 18 | ; Check if registry key already exists, if not, create with defaults 19 | ReadRegStr $0 HKLM "${regkey}" "${masterdefinitionkey}" 20 | ${If} $0 == "" 21 | WriteRegStr HKLM "${regkey}" "${masterdefinitionkey}" "${exampleMasterDefinition}" 22 | ${EndIf} 23 | ; Launch PowerShell script to process command line arguments 24 | ${GetParameters} $R0 25 | InitPluginsDir 26 | SetOutPath "$PLUGINSDIR\PowerShell" 27 | File "${PROJECT_DIR}\build\Start-ParamProcess.ps1" 28 | ${PowerShellExecFile} "$PLUGINSDIR\PowerShell\Start-ParamProcess.ps1" $R0 29 | ${endIf} 30 | 31 | !macroend -------------------------------------------------------------------------------- /build/psexec.nsh: -------------------------------------------------------------------------------- 1 | ; Modified version of https://nsis.sourceforge.io/PowerShell_support allowing PowerShell script to accept params 2 | !include x64.nsh 3 | !ifndef PSEXEC_INCLUDED 4 | !define PSEXEC_INCLUDED 5 | 6 | !macro PowerShellExecFileMacro PSFile Args 7 | !define PSExecID ${__LINE__} 8 | Push $R0 9 | 10 | ${If} ${RunningX64} 11 | nsExec::ExecToStack '$WINDIR\sysnative\windowspowershell\v1.0\powershell.exe -inputformat none -ExecutionPolicy RemoteSigned -File "${PSFile}" ${Args}' 12 | ${Else} 13 | nsExec::ExecToStack 'powershell -inputformat none -ExecutionPolicy Bypass -File "${PSFile}" ${Args}' 14 | ${EndIf} 15 | 16 | Pop $R0 ;return value is first on stack 17 | ;script output is second on stack, leave on top of it 18 | IntCmp $R0 0 finish_${PSExecID} 19 | SetErrorLevel 2 20 | 21 | finish_${PSExecID}: 22 | Exch ;now $R0 on top of stack, followed by script output 23 | Pop $R0 24 | !undef PSExecID 25 | !macroend 26 | 27 | !define PowerShellExecFile `!insertmacro PowerShellExecFileMacro` 28 | 29 | !endif -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lazy-admin", 3 | "version": "0.7.0", 4 | "description": "GUI for PowerShell scripts to simplify day to day IT tasks.", 5 | "productName": "Lazy Admin", 6 | "cordovaId": "eu.houby-studio.lazy-admin", 7 | "capacitorId": "", 8 | "author": "Jakub Šindelář <25355950+megastary@users.noreply.github.com>", 9 | "private": true, 10 | "scripts": { 11 | "lint": "eslint --ext .js,.vue src", 12 | "test": "echo \"No test specified\" && exit 0", 13 | "release": "quasar build --mode electron --publish onTagOrDraft" 14 | }, 15 | "dependencies": { 16 | "@electron/remote": "^1.0.4", 17 | "@quasar/extras": "^1.9.17", 18 | "axios": "^0.21.1", 19 | "csv": "^5.3.2", 20 | "electron-log": "^4.3.2", 21 | "electron-updater": "^4.3.5", 22 | "lodash": "^4.17.19", 23 | "node-powershell": "^4.0.0", 24 | "quasar": "^1.15.4", 25 | "regedit": "^3.0.3", 26 | "vue-clipboard2": "^0.3.1", 27 | "vue-i18n": "^8.0.0", 28 | "vue-prismjs": "^1.2.0", 29 | "vuex-persist": "^2.2.0" 30 | }, 31 | "devDependencies": { 32 | "@quasar/app": "^1.9.6", 33 | "@quasar/quasar-app-extension-qmarkdown": "^1.4.1", 34 | "@vue/eslint-config-standard": "^4.0.0", 35 | "awesome-node-loader": "^1.1.1", 36 | "babel-eslint": "^10.0.1", 37 | "devtron": "^1.4.0", 38 | "electron": "^11.3.0", 39 | "electron-builder": "^22.4.0", 40 | "electron-debug": "^3.0.0", 41 | "electron-devtools-installer": "^2.2.4", 42 | "electron-packager": "^14.1.1", 43 | "eslint": "^5.10.0", 44 | "eslint-loader": "^2.1.1", 45 | "eslint-plugin-vue": "^5.0.0" 46 | }, 47 | "engines": { 48 | "node": ">= 10.18.1", 49 | "npm": ">= 6.13.4", 50 | "yarn": ">= 1.21.1" 51 | }, 52 | "browserslist": [ 53 | "last 1 version, not dead, ie >= 11" 54 | ] 55 | } -------------------------------------------------------------------------------- /policies/Lazy Admin ADM ADMX Templates.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/policies/Lazy Admin ADM ADMX Templates.zip -------------------------------------------------------------------------------- /policies/README.md: -------------------------------------------------------------------------------- 1 | # Policy object 2 | 3 | To simplify deployment in corporate environment, you can silently deploy application and take advantage of our ADM and AMDX templates to take care of settings for application. 4 | 5 | # How to deploy ADM template 6 | 7 | Open Group Policy console (or Local policy) and right-click **Administrative templates** and choose **Add or remove templates**, then navigate to .adm file and add it. You can then find settings under Computer Policies/Classic Administrative Templates/Lazy Admin 8 | 9 | # How to deploy ADMX template 10 | 11 | Assuming you have central store on your DC, copy **LazyAdmin.admx** and **en-US** folder to: 12 | \\\\{DOMAIN}\SYSVOL\{DOMAIN.FQDN}\policies\PolicyDefinitions\ 13 | 14 | Alternatively if installing on local computer copy to C:\Windows\PolicyDefinitions 15 | 16 | ## For developers 17 | 18 | Yes, we are lazy admins too, so we store command to migrate ADM to ADMX in git repo to save time. 19 | It may be useful to you if you need to modify our policies. 20 | 21 | `"%PROGRAMFILES(x86)%\FullArmor\ADMX Migrator\faAdmxConv.exe" "C:\git\lazy-admin\policies\adm\LazyAdmin.adm" "C:\git\lazy-admin\policies\admx"` -------------------------------------------------------------------------------- /policies/adm/LazyAdmin.adm: -------------------------------------------------------------------------------- 1 | ;Configure Lazy Admin application 2 | ;Created by Houby-Studio 3 | ;Last Update 2020-08-29 4 | ;ADMX Migrator: https://www.microsoft.com/en-us/download/details.aspx?id=15058 5 | ;After making changes, run command 6 | ;"%PROGRAMFILES(x86)%\FullArmor\ADMX Migrator\faAdmxConv.exe" "{pathToAdm}\LazyAdmin.adm" "{pathToAdmx}" 7 | CLASS MACHINE 8 | 9 | CATEGORY "Lazy Admin" 10 | POLICY !!MasterDefinitionUrlPolicy 11 | KEYNAME "Software\LazyAdmin" 12 | SUPPORTED !!MasterDefinitionUrlSupported 13 | EXPLAIN !!MasterDefinitionUrlExplain 14 | PART !!MasterDefinitionUrlPathText TEXT 15 | END PART 16 | PART "Url:" EDITTEXT REQUIRED 17 | VALUENAME "MasterDefinitionUrl" 18 | END PART 19 | END POLICY 20 | POLICY !!CustomLanguageUrlPolicy 21 | KEYNAME "Software\LazyAdmin" 22 | SUPPORTED !!CustomLanguageUrlSupported 23 | EXPLAIN !!CustomLanguageUrlExplain 24 | PART !!CustomLanguageUrlPathText TEXT 25 | END PART 26 | PART "Url:" EDITTEXT REQUIRED 27 | VALUENAME "CustomLanguageUrl" 28 | END PART 29 | END POLICY 30 | END CATEGORY 31 | 32 | [strings] 33 | MasterDefinitionUrlPolicy="Scripts Definition URL" 34 | MasterDefinitionUrlPathText="Specify full URL path to your definitions file." 35 | MasterDefinitionUrlSupported="Windows Vista and above" 36 | MasterDefinitionUrlExplain="Full URL Path to scripts definition in JSON format for Lazy Admin.\n\nExample: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/definition-lazy-admin-base.json\n\nExample: \\fileserver.local\share\definition-lazy-admin-base.json\n\nNote: You should create your own definitions file and point your administrators to it to use all your company's PowerShell Cmdlets in Lazy Admin.\n\nIf you enable this policy, the URL you specify will be used by Lazy Admin to download latest definitions.\n\nIf you disable this policy, Lazy Admin won't be able to download any definitions.\n\nIf you do not configure this policy, user has to configure definitions URL manually or use default example URL.\n\nYou can read more about Lazy Admin policies by visiting the following URL: https://github.com/houby-studio/lazy-admin/wiki" 37 | CustomLanguageUrlPolicy="Custom Language URL" 38 | CustomLanguageUrlPathText="Specify full URL path to your custom translation file." 39 | CustomLanguageUrlSupported="Windows Vista and above" 40 | CustomLanguageUrlExplain="Full URL Path to custom translation in JSON format for Lazy Admin.\n\nExample: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/src/i18n/custom-language.json\n\nExample: \\fileserver.local\share\custom-language.json\n\nNote: You should create your translation file if you want to use language, which is not provided with Lazy Admin. Feel free to provide us with your translation and we will include it in next version.\n\nIf you enable this policy, the URL you specify will be used by Lazy Admin to download custom translation.\n\nIf you disable or do not configure this policy, Lazy Admin won't download custom languages.\n\nYou can read more about Lazy Admin custom translation by visiting the following URL: https://github.com/houby-studio/lazy-admin/wiki" -------------------------------------------------------------------------------- /policies/admx/LazyAdmin.admx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /policies/admx/cs-CZ/LazyAdmin.adml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Lazy Admin 8 | URL definice skriptů 9 | Zadejte plnou URL cestu k souboru s definicemi skriptů. 10 | Minimálně Windows Vista 11 | Plná URL Cesta k definicím skriptů ve formátu JSON pro Lazy Admina. 12 | 13 | Příklad: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/definition-lazy-admin-base.json 14 | Příklad: \\fileserver.local\share\definition-lazy-admin-base.json 15 | 16 | Poznámka: Měli byste vytvořit vlastní soubor definic a odkazovat na něj vaše administrátory, abyste využili všechny vaše firemní PowerShell Cmdlety v Lazy Adminovi. 17 | 18 | Pokud nastavení této zásady povolíte, zadaná URL adresa bude použita aplikací Lazy Admin ke stažení nejnovějších definic. 19 | 20 | Pokud nastavení této zásady zakážete, Lazy Admin nebude schopen žádné definice stáhnout. 21 | 22 | Pokud nastavení této zásady nenakonfigurujete, uživatel bude muset URL vyplnit manuálně nebo se použije ukázková URL. 23 | 24 | O aplikaci Lazy Admin se můžete dočíst více na URL adrese: https://github.com/houby-studio/lazy-admin/wiki 25 | URL vlastního jazyka 26 | Zadejte plnou URL cestu k souboru s vlastním překladem. 27 | Minimálně Windows Vista 28 | Plná URL Cesta k vlastními překladu ve formátu JSON pro Lazy Admina. 29 | 30 | Příklad: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/src/i18n/custom-language.json 31 | Příklad: \\fileserver.local\share\custom-language.json 32 | 33 | Poznámka: Vytvořit vlastní soubor překladů můžete v případě, pokud chcete používat jazyk, který není součástí Lazy Admina. Pokud vytvoříte nějaký překlad, zašlete nám jej prosím a my jej zahrneme v další verzi. 34 | 35 | Pokud nastavení této zásady povolíte, zadaná URL adresa bude použita aplikací Lazy Admin ke stažení vlastního překladu. 36 | 37 | Pokud nastavení této zásady zakážete nebo nenakonfigurujete, Lazy Admin nestáhne žádné vlastní překlady. 38 | 39 | O aplikaci Lazy Admin se můžete dočíst více na URL adrese: https://github.com/houby-studio/lazy-admin/wiki 40 | ADMX Migrator encountered a string that is not present in the source ADM string table. 41 | ADMX Migrator encountered a policy that does not have a supportedOn value. 42 | 43 | 44 | 45 | Zadejte plnou URL cestu k vašemu souboru definicí. 46 | 47 | 48 | 49 | 50 | 51 | Zadejte plnou URL cestu k vašemu souboru s vlastním překladem. 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /policies/admx/en-US/LazyAdmin.adml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Lazy Admin 8 | Scripts Definition URL 9 | Specify full URL path to your definitions file. 10 | Windows Vista and above 11 | Full URL Path to scripts definition in JSON format for Lazy Admin. 12 | 13 | Example: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/definition-lazy-admin-base.json 14 | Example: \\fileserver.local\share\definition-lazy-admin-base.json 15 | 16 | Note: You should create your own definitions file and point your administrators to it to use all your company's PowerShell Cmdlets in Lazy Admin. 17 | 18 | If you enable this policy, the URL you specify will be used by Lazy Admin to download latest definitions. 19 | 20 | If you disable this policy, Lazy Admin won't be able to download any definitions. 21 | 22 | If you do not configure this policy, user has to configure definitions URL manually or use default example URL. 23 | 24 | You can read more about Lazy Admin policies by visiting the following URL: https://github.com/houby-studio/lazy-admin/wiki 25 | Custom Language URL 26 | Specify full URL path to your custom translation file. 27 | Windows Vista and above 28 | Full URL Path to custom translation in JSON format for Lazy Admin. 29 | 30 | Example: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/src/i18n/custom-language.json 31 | Example: \\fileserver.local\share\custom-language.json 32 | 33 | Note: You should create your translation file if you want to use language, which is not provided with Lazy Admin. Feel free to provide us with your translation and we will include it in next version. 34 | 35 | If you enable this policy, the URL you specify will be used by Lazy Admin to download custom translation. 36 | 37 | If you disable or do not configure this policy, Lazy Admin won't download custom languages. 38 | 39 | You can read more about Lazy Admin custom translation by visiting the following URL: https://github.com/houby-studio/lazy-admin/wiki 40 | ADMX Migrator encountered a string that is not present in the source ADM string table. 41 | ADMX Migrator encountered a policy that does not have a supportedOn value. 42 | 43 | 44 | 45 | Specify full URL path to your definitions file. 46 | 47 | 48 | 49 | 50 | 51 | Specify full URL path to your custom translation file. 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /quasar.conf.js: -------------------------------------------------------------------------------- 1 | // Configuration for your app 2 | // https://quasar.dev/quasar-cli/quasar-conf-js 3 | 4 | module.exports = function (ctx) { 5 | return { 6 | // app boot file (/src/boot) 7 | // --> boot files are part of "main.js" 8 | // https://quasar.dev/quasar-cli/cli-documentation/boot-files 9 | boot: ['electron-log', 'i18n', 'powershell', 'titlebar-color', 'clipboard2', 'auto-updater', 'utils', 'components'], 10 | 11 | // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css 12 | css: ['app.sass'], 13 | 14 | // https://github.com/quasarframework/quasar/tree/dev/extras 15 | extras: [ 16 | 'ionicons-v4', 17 | 'mdi-v4', 18 | 'fontawesome-v5', 19 | 'eva-icons', 20 | 'themify', 21 | 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! 22 | 23 | // 'roboto-font', // optional, you are not bound to it 24 | 'material-icons' // optional, you are not bound to it 25 | ], 26 | 27 | // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework 28 | framework: { 29 | iconSet: 'material-icons', // Quasar icon set 30 | lang: 'cs', // Quasar language pack 31 | config: { 32 | dark: 'auto' // or Boolean true/false 33 | }, 34 | // Possible values for "all": 35 | // * 'auto' - Auto-import needed Quasar components & directives 36 | // (slightly higher compile time; next to minimum bundle size; most convenient) 37 | // * false - Manually specify what to import 38 | // (fastest compile time; minimum bundle size; most tedious) 39 | // * true - Import everything from Quasar 40 | // (not treeshaking Quasar; biggest bundle size; convenient) 41 | all: 'auto', 42 | 43 | components: [], 44 | directives: [], 45 | 46 | // Quasar plugins 47 | plugins: ['Dialog', 'Notify', 'Loading', 'QSeparator', 'QTable', 'QPageSticky', 'QSpinner'] 48 | }, 49 | 50 | // https://quasar.dev/quasar-cli/cli-documentation/supporting-ie 51 | supportIE: false, 52 | 53 | // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build 54 | build: { 55 | scopeHoisting: true, 56 | vueRouterMode: 'hash', // available values: 'hash', 'history' 57 | showProgress: true, 58 | gzip: false, 59 | analyze: false, 60 | // Options below are automatically set depending on the env, set them if you want to override 61 | // preloadChunks: false, 62 | // extractCSS: false, 63 | 64 | // https://quasar.dev/quasar-cli/cli-documentation/handling-webpack 65 | extendWebpack (cfg) { 66 | cfg.module.rules.push({ 67 | enforce: 'pre', 68 | test: /\.(js|vue)$/, 69 | loader: 'eslint-loader', 70 | exclude: /node_modules/, 71 | options: { 72 | formatter: require('eslint').CLIEngine.getFormatter('stylish') 73 | } 74 | }) 75 | } 76 | }, 77 | 78 | // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer 79 | devServer: { 80 | watchOptions: { poll: true }, 81 | https: false, 82 | port: 8080, 83 | open: true // opens browser window automatically 84 | }, 85 | 86 | // animations: 'all', // --- includes all animations 87 | // https://quasar.dev/options/animations 88 | animations: 'all', 89 | 90 | // https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr 91 | ssr: { 92 | pwa: false 93 | }, 94 | 95 | // https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa 96 | pwa: { 97 | workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest' 98 | workboxOptions: {}, // only for GenerateSW 99 | manifest: { 100 | name: 'Lazy Admin', 101 | short_name: 'Lazy Admin', 102 | description: 103 | 'GUI for PowerShell scripts to simplify day to day IT tasks.', 104 | display: 'standalone', 105 | orientation: 'portrait', 106 | background_color: '#ffffff', 107 | theme_color: '#027be3', 108 | icons: [ 109 | { 110 | src: 'statics/icons/icon-128x128.png', 111 | sizes: '128x128', 112 | type: 'image/png' 113 | }, 114 | { 115 | src: 'statics/icons/icon-192x192.png', 116 | sizes: '192x192', 117 | type: 'image/png' 118 | }, 119 | { 120 | src: 'statics/icons/icon-256x256.png', 121 | sizes: '256x256', 122 | type: 'image/png' 123 | }, 124 | { 125 | src: 'statics/icons/icon-384x384.png', 126 | sizes: '384x384', 127 | type: 'image/png' 128 | }, 129 | { 130 | src: 'statics/icons/icon-512x512.png', 131 | sizes: '512x512', 132 | type: 'image/png' 133 | } 134 | ] 135 | } 136 | }, 137 | 138 | // Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova 139 | cordova: { 140 | // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing 141 | id: 'eu.houby-studio.lazy-admin' 142 | }, 143 | 144 | // Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor 145 | capacitor: { 146 | hideSplashscreen: true 147 | }, 148 | 149 | // Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron 150 | electron: { 151 | bundler: 'builder', // 'packager' or 'builder' 152 | 153 | packager: { 154 | // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options 155 | // OS X / Mac App Store 156 | // appBundleId: '', 157 | // appCategoryType: '', 158 | // osxSign: '', 159 | // protocol: 'myapp://path', 160 | // Windows only 161 | // win32metadata: { ... } 162 | }, 163 | 164 | builder: { 165 | // https://www.electron.build/configuration/configuration 166 | 167 | appId: 'eu.houby-studio.lazy-admin', 168 | // eslint-disable-next-line no-template-curly-in-string 169 | artifactName: 'Lazy-Admin-Setup-${version}.${ext}', 170 | win: { 171 | target: 'nsis', 172 | icon: 'src-electron/icons/icon.ico', 173 | requestedExecutionLevel: 'highestAvailable', 174 | publish: 'github', 175 | verifyUpdateCodeSignature: false 176 | }, 177 | nsis: { 178 | perMachine: true, 179 | include: 'build/installer.nsh' 180 | }, 181 | extraFiles: [ 182 | 'Lazy Admin.VisualElementsManifest.xml', 183 | 'Square150x150Logo.png', 184 | 'Square71x71Logo.png' 185 | ], 186 | extraResources: [ 187 | { 188 | 'from': 'node_modules/regedit/vbs', 189 | 'to': 'regedit/vbs', 190 | 'filter': [ 191 | '**/*' 192 | ] 193 | } 194 | ] 195 | }, 196 | 197 | // More info: https://quasar.dev/quasar-cli/developing-electron-apps/node-integration 198 | nodeIntegration: true, 199 | 200 | extendWebpack (cfg) { 201 | // do something with Electron main process Webpack cfg 202 | // chainWebpack also available besides this extendWebpack 203 | } 204 | } 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /quasar.extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "@quasar/qmarkdown": { 3 | "import_md": true, 4 | "import_vmd": false 5 | } 6 | } -------------------------------------------------------------------------------- /scripts-definitions/README.md: -------------------------------------------------------------------------------- 1 | # Scripts definitions 2 | 3 | This folder contains sample definitions, serving as example for how you should setup your definitions for application. 4 | 5 | ## How to test 6 | 7 | You can run Lazy Admin with provided sample definitions for testing purposes, before you create your own definitions. 8 | 9 | 1. Create following registry key: 10 | ``` 11 | Path: HKEY_LOCAL_MACHINE\SOFTWARE\LazyAdmin 12 | Key: MasterDefinitionUrl 13 | Type: REG_SZ 14 | Value: https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/master-definition-example.json 15 | ``` 16 | 2. Launch Lazy Admin and log in 17 | 3. Lazy Admin will automatically download master definitions file, which contains multiple scripts definitions URLs 18 | 4. Lazy Admin will download definitions from each URL and lists them on main page, allowing you to choose and run any script from Lazy Admin 19 | 20 | ## Create custom definitions 21 | 22 | Every environment has its own needs, their own modules, scripts and functions. Lazy Admin has no ambition to provide all or any functions for all environments. It is just a GUI, which you can bend to your own needs and quite easily import your scripts and functions. 23 | 24 | All you need to do is create definitions for each command and point Lazy Admin to your definitions file. 25 | 26 | ### Master definition file 27 | 28 | This is simple JSON file, which contains following keys and values: 29 | 30 | * version: Very important, Lazy Admin compares this value when checking for updates. So when you release newer version of master definition file, you have to increment version to trigger update 31 | * releaseDate: Informative key, may be omitted 32 | * definitionsUrl: Array of URLs, where Lazy Admin should download scripts definitions for each set of commands or modules 33 | 34 | #### Example file 35 | [master-definitions-example.json](master-definition-example.json) 36 | 37 | #### Syntax 38 | 39 | ``` 40 | { 41 | "version": "${version}", 42 | "releaseDate": "${YYYY-MM-DD}", 43 | "definitionsUrl": [ 44 | "${https://URL/file.json}", 45 | "${\\Path\To\JSON\file.json}" 46 | ] 47 | } 48 | ``` 49 | 50 | ### Scripts definitions file 51 | 52 | All the magic happens here. Detailed explanation can be found on [wiki](https://github.com/houby-studio/lazy-admin/wiki/Definitions-files). 53 | 54 | Possible values for definitions file: 55 | 56 | * **unique-definitions-key**: Unique name, preferably kebab-case, but is really up to you, just don't break javascript, various functions access specific definitions module by associative array names. 57 | **IMPORTANT**: All other keys are children of this one 58 | * version: Very important, Lazy Admin compares this value when checking for updates. So when you release newer version of scripts definition file, you have to increment version to trigger update 59 | * icon: name of icon, if omitted, powershell icon is used, this is what user sees on side panel when filtering commands based on definitions/modules 60 | * displayName: provided in languages you want to support, this is what user sees on side panel when filtering commands based on definitions/modules 61 | * description: provided in languages you want to support, this is what user sees on side panel below displayName when filtering commands based on definitions/modules 62 | * definition: array of definitions for each command you define 63 | * commandName: Preferably name of the Cmdlet or function, which this definition uses, displayed to user to get the idea what the command might do 64 | * icon: name of icon, if omitted, powershell icon is used 65 | * returns: type of the result, which application should expect after command is executed ("raw", "PSObject") 66 | * progress: does command output progress before emitting results (true, false) 67 | * insidePsSession: whether command should be run in Remote PSSession or locally (true, false) 68 | * usesLoginObjects: whether command utilizes $CredentialObject or $LazySession created upon logging in (true, false) 69 | * confirm: before executing the command, ask user for confirmation (true, false) 70 | * friendlyName: provided in languages you want to support, this is displayed to user to get better idea what the command might do 71 | * description: provided in languages you want to support, this is displayed to user to best describe what the command might do 72 | * help: provided in languages you want to support, this is displayed to user when clicked on help icon. (url to http) 73 | * login: array of online services, which are required for current command 74 | * name: Preferably name of the Module or service, which is called with this command 75 | * description: provided in languages you want to support, this is what user sees on side panel below displayName when filtering commands based on definitions/modules 76 | * commandBlock: String containing Cmdlet or function 77 | * parameters: array of parameters, which user is supposed to fill 78 | * commandBlock: String containing Cmdlet or function and parameters enclosed in {{double curly braces}} 79 | * workflow: array of commands, when you need to run multiple commands sequentially, passing results from previous ones or asking for another user input in between 80 | * acceptsParams: selection mode for results table from previous command to be passed to this command ('none', 'single', 'multiple') 81 | * joinParamsAsString: whether to join selected parameters to single command or run command for each parameters separately (true, false) 82 | * returns: type of the result, which application should expect after command is executed ("raw", "PSObject") 83 | * insidePsSession: whether command should be run in Remote PSSession or locally (true, false) 84 | * confirm: before executing the command, ask user for confirmation (true, false) 85 | * passedParameters: array of parameters obtained from previous command, referred by the property name 'passedParamName' 86 | * parameters: array of parameters, which user is supposed to fill 87 | * commandBlock: String containing Cmdlet or function and parameters enclosed in {{double curly braces}} 88 | 89 | #### Example file 90 | [base-module-example.json](base-module-example.json) 91 | 92 | #### Parameters 93 | 94 | List of supported input types, which can be used in definitions and explanations: 95 | 96 | * String: Uses q-input of type 'text' 97 | * Number: Uses q-input of type 'number' 98 | * ScriptBlock: Uses q-input of type 'textarea' 99 | * Boolean: Uses q-toggle, which can either output 'true', 'false' or nothing 100 | * Switch: Uses q-toggle, which can either output your format, or not 101 | 102 | > Note: Difference between Boolean and Switch is more discussed on page TODO: Add Page 103 | 104 | #### Syntax 105 | 106 | This is only example, there are many possibilities how to write definitions. 107 | 108 | ``` 109 | 110 | { 111 | "${unique-definitions-key}": { 112 | "version": "${version}", 113 | "icon": "${icon-name}", 114 | "displayName": "${DisplayName}", 115 | "description": "${Description}", 116 | "definition": [ 117 | { 118 | "commandName": "${Verb-Noun}", 119 | "icon": "${icon-name}", 120 | "returns": "${returnType}", 121 | "progress": "${Boolean}", 122 | "insidePsSession": ${Boolean}, 123 | "usesLoginObjects": ${Boolean}, 124 | "friendlyName": "${friendlyName}", 125 | "description": "${Description}", 126 | "help": "${HelpUrls}", 127 | "parameters": [ 128 | { 129 | "parameter": "${parameterName}", 130 | "format": "some format ${parameterName}", 131 | "value": "some default value", 132 | "required": ${Boolean}, 133 | "type": "${inputType}", 134 | "hint": "${hint}" 135 | } 136 | ], 137 | "commandBlock": "${Verb-Noun {{parameterName}}}" 138 | }, 139 | { 140 | "commandName": "${Verb-Noun}", 141 | "type": "workflow", 142 | "icon": "${icon-name}", 143 | "returns": "${returnType}", 144 | "friendlyName": "${friendlyName}", 145 | "description": "${Description}", 146 | "parameters": [ 147 | { 148 | "parameter": "${parameterName}", 149 | "required": ${Boolean}, 150 | "type": "${inputType}", 151 | "hint": "${hint}" 152 | } 153 | ], 154 | "commandBlock": "${Verb-Noun {{parameterName}}}", 155 | "workflow": [ 156 | { 157 | "acceptsParams": ${Boolean}, 158 | "joinParamsAsString": ${Boolean}, 159 | "returns": "${returnType}", 160 | "progress": "${Boolean}", 161 | "insidePsSession": ${Boolean}, 162 | "confirm": ${Boolean}, 163 | "passedParameters": [ 164 | { 165 | "parameter": "${parameterName}", 166 | "passedParamName": "${passedParamName}", 167 | "format": "${passedParamFormat}", 168 | "joinFormat": "${passedParamJoinFormat}", 169 | } 170 | ], 171 | "parameters": [ 172 | { 173 | "parameter": "${parameterName}", 174 | "format": "${format}", 175 | "value": "${value}", 176 | "options": "${options}", 177 | "required": ${Boolean}, 178 | "type": "${inputType}", 179 | "hint": "${hint}" 180 | } 181 | ], 182 | "commandBlock": "${Verb-Noun {{parameterName}}}" 183 | } 184 | ] 185 | } 186 | ] 187 | } 188 | } 189 | ``` -------------------------------------------------------------------------------- /scripts-definitions/active-directory-module-example.json: -------------------------------------------------------------------------------- 1 | { 2 | "active-directory-module-example": { 3 | "version": "0.0.6", 4 | "icon": "mdi-file-tree", 5 | "displayName": { 6 | "default": "Active Directory commands", 7 | "en-us": "Active Directory commands", 8 | "cs-cz": "Active Directory příkazy" 9 | }, 10 | "description": { 11 | "default": "Commands for administering Active Directory", 12 | "en-us": "Commands for administering Active Directory", 13 | "cs-cz": "Příkazy pro práci s Active Directory" 14 | }, 15 | "requires": [ 16 | { 17 | "name": "activedirectory", 18 | "installCommand": "Add-WindowsCapability -Online -Name 'Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0' -ErrorAction SilentlyContinue; Enable-WindowsOptionalFeature -Online -FeatureName RSATClient-Roles-AD-Powershell -ErrorAction SilentlyContinue; Add-WindowsFeature -Name 'RSAT-AD-PowerShell' -IncludeAllSubFeature -ErrorAction SilentlyContinue" 19 | } 20 | ], 21 | "definition": [ 22 | { 23 | "commandName": "Get-ADUser", 24 | "icon": "mdi-account", 25 | "returns": "PSObject", 26 | "insidePsSession": true, 27 | "friendlyName": { 28 | "default": "Get AD user's information", 29 | "en-us": "Get AD user's information", 30 | "cs-cz": "Získat informace o AD uživateli" 31 | }, 32 | "description": { 33 | "default": "Retrievies users' basic information from Active Directory.", 34 | "en-us": "Retrievies users' basic information from Active Directory.", 35 | "cs-cz": "Získá základní informace o uživatelích z Active Directory." 36 | }, 37 | "parameters": [ 38 | { 39 | "parameter": "samAccountName", 40 | "required": true, 41 | "type": "String", 42 | "hint": { 43 | "default": "Full SamAccountName or wildcard expression.", 44 | "en-us": "Full SamAccountName or wildcard expression.", 45 | "cs-cz": "Celý SamAccountName nebo wildcard výraz." 46 | } 47 | } 48 | ], 49 | "commandBlock": "Get-ADUser -Filter 'SamAccountName -like \"{{samAccountName}}\"' -Properties pwdLastSet | Select-Object Name, Enabled, SamAccountName, UserPrincipalName, @{n='PasswordChange';e={([datetime]::FromFileTime($_.pwdLastSet)).DateTime}} | ConvertTo-Json -Compress" 50 | } 51 | ] 52 | } 53 | } -------------------------------------------------------------------------------- /scripts-definitions/docs/Get-Disk.md: -------------------------------------------------------------------------------- 1 | --- 2 | external help file: Disk.cdxml-help.xml 3 | Module Name: Storage 4 | online version: http://go.microsoft.com/fwlink/?LinkId=812860 5 | schema: 2.0.0 6 | --- 7 | 8 | # Get-Disk 9 | 10 | ## SYNOPSIS 11 | Gets one or more disks visible to the operating system. 12 | 13 | ## SYNTAX 14 | 15 | ### ByNumber (Default) 16 | ``` 17 | Get-Disk [[-Number] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 18 | [] 19 | ``` 20 | 21 | ### ByUniqueId 22 | ``` 23 | Get-Disk [-UniqueId ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 24 | [] 25 | ``` 26 | 27 | ### ByName 28 | ``` 29 | Get-Disk [-FriendlyName ] [-SerialNumber ] [-CimSession ] 30 | [-ThrottleLimit ] [-AsJob] [] 31 | ``` 32 | 33 | ### ByPath 34 | ``` 35 | Get-Disk [-Path ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] 36 | ``` 37 | 38 | ### ByPartition 39 | ``` 40 | Get-Disk [-Partition ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 41 | [] 42 | ``` 43 | 44 | ### ByVirtualDisk 45 | ``` 46 | Get-Disk [-VirtualDisk ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 47 | [] 48 | ``` 49 | 50 | ### ByiSCSISession 51 | ``` 52 | Get-Disk [-iSCSISession ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 53 | [] 54 | ``` 55 | 56 | ### ByiSCSIConnection 57 | ``` 58 | Get-Disk [-iSCSIConnection ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 59 | [] 60 | ``` 61 | 62 | ### ByStorageSubSystem 63 | ``` 64 | Get-Disk [-StorageSubSystem ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 65 | [] 66 | ``` 67 | 68 | ### ByStorageNode 69 | ``` 70 | Get-Disk [-StorageNode ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 71 | [] 72 | ``` 73 | 74 | ### ByStorageJob 75 | ``` 76 | Get-Disk [-StorageJob ] [-CimSession ] [-ThrottleLimit ] [-AsJob] 77 | [] 78 | ``` 79 | 80 | ## DESCRIPTION 81 | The Get-Disk cmdlet gets one or more Disk objects visible to the operating system, or optionally a filtered list. 82 | 83 | ## EXAMPLES 84 | 85 | ### Example 1: Get all disks 86 | ``` 87 | PS C:\>Get-Disk 88 | ``` 89 | 90 | This example gets all disks visible to the operating system. 91 | 92 | ### Example 2: Get a disk by disk number 93 | ``` 94 | PS C:\>Get-Disk -Number 6 95 | ``` 96 | 97 | This example gets disk 6. 98 | 99 | ### Example 3: Get all USB disks 100 | ``` 101 | PS C:\>Get-Disk | Where-Object -FilterScript {$_.Bustype -Eq "USB"} 102 | ``` 103 | 104 | This example gets all disks attached via the USB bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the USB value of the Bustype property. 105 | 106 | ### Example 4: Get the iSCSI sessions for all iSCSI disks 107 | ``` 108 | PS C:\>Get-Disk | Where-Object -FilterScript {$_.BusType -Eq "iSCSI"} | 109 | Get-IscsiSession | Format-Table 110 | ``` 111 | 112 | This example gets all disks attached via the iSCSI bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the iSCSI value of the Bustype property. 113 | It then passes the Disk objects in the pipeline to the Get-IscisSession cmdlet, which gets the associated iSCSI sessions, and then pipes the output to the Format-Table cmdlet for simplified display. 114 | 115 | ## PARAMETERS 116 | 117 | ### -CimSession 118 | Runs the cmdlet in a remote session or on a remote computer. 119 | Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. 120 | The default is the current session on the local computer. 121 | 122 | ```yaml 123 | Type: CimSession[] 124 | Parameter Sets: (All) 125 | Aliases: Session 126 | 127 | Required: False 128 | Position: Named 129 | Default value: None 130 | Accept pipeline input: False 131 | Accept wildcard characters: False 132 | ``` 133 | 134 | ### -FriendlyName 135 | Gets the disk with the specified friendly name. 136 | Enter a friendly name, or use wildcard characters to enter a name pattern. 137 | 138 | ```yaml 139 | Type: String[] 140 | Parameter Sets: ByName 141 | Aliases: 142 | 143 | Required: False 144 | Position: Named 145 | Default value: None 146 | Accept pipeline input: False 147 | Accept wildcard characters: False 148 | ``` 149 | 150 | ### -Number 151 | Specifies the disk number for which to get the associated Disk object. 152 | 153 | ```yaml 154 | Type: UInt32[] 155 | Parameter Sets: ByNumber 156 | Aliases: DeviceId 157 | 158 | Required: False 159 | Position: 1 160 | Default value: None 161 | Accept pipeline input: True (ByPropertyName) 162 | Accept wildcard characters: False 163 | ``` 164 | 165 | ### -Partition 166 | Accepts a Partition object as input. 167 | The Partition CIM object is exposed by the Get-Partition cmdlet. 168 | 169 | ```yaml 170 | Type: CimInstance 171 | Parameter Sets: ByPartition 172 | Aliases: 173 | 174 | Required: False 175 | Position: Named 176 | Default value: None 177 | Accept pipeline input: True (ByValue) 178 | Accept wildcard characters: False 179 | ``` 180 | 181 | ### -Path 182 | Contains valid path information. 183 | 184 | ```yaml 185 | Type: String[] 186 | Parameter Sets: ByPath 187 | Aliases: 188 | 189 | Required: False 190 | Position: Named 191 | Default value: None 192 | Accept pipeline input: True (ByPropertyName) 193 | Accept wildcard characters: False 194 | ``` 195 | 196 | ### -SerialNumber 197 | Specifies an array of serial numbers associated with disks that this cmdlet gets. 198 | 199 | ```yaml 200 | Type: String[] 201 | Parameter Sets: ByName 202 | Aliases: 203 | 204 | Required: False 205 | Position: Named 206 | Default value: None 207 | Accept pipeline input: False 208 | Accept wildcard characters: False 209 | ``` 210 | 211 | ### -StorageJob 212 | Specifies a storage job object that is associated with disks that this cmdlet gets. 213 | To obtain a storage job, use the Get-StorageJob cmdlet. 214 | 215 | ```yaml 216 | Type: CimInstance 217 | Parameter Sets: ByStorageJob 218 | Aliases: 219 | 220 | Required: False 221 | Position: Named 222 | Default value: None 223 | Accept pipeline input: True (ByValue) 224 | Accept wildcard characters: False 225 | ``` 226 | 227 | ### -StorageNode 228 | @{Text=} 229 | 230 | ```yaml 231 | Type: CimInstance 232 | Parameter Sets: ByStorageNode 233 | Aliases: 234 | 235 | Required: False 236 | Position: Named 237 | Default value: None 238 | Accept pipeline input: True (ByValue) 239 | Accept wildcard characters: False 240 | ``` 241 | 242 | ### -StorageSubSystem 243 | Specifies the storage subsystem from which this cmdlet gets disks. 244 | To obtain a StorageSubsystem object, use the Get-StorageSubSystem cmdlet. 245 | 246 | ```yaml 247 | Type: CimInstance 248 | Parameter Sets: ByStorageSubSystem 249 | Aliases: 250 | 251 | Required: False 252 | Position: Named 253 | Default value: None 254 | Accept pipeline input: True (ByValue) 255 | Accept wildcard characters: False 256 | ``` 257 | 258 | ### -ThrottleLimit 259 | Specifies the maximum number of concurrent operations that can be established to run the cmdlet. 260 | If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. 261 | The throttle limit applies only to the current cmdlet, not to the session or to the computer. 262 | 263 | ```yaml 264 | Type: Int32 265 | Parameter Sets: (All) 266 | Aliases: 267 | 268 | Required: False 269 | Position: Named 270 | Default value: None 271 | Accept pipeline input: False 272 | Accept wildcard characters: False 273 | ``` 274 | 275 | ### -UniqueId 276 | Gets only the disks with the specified IDs. 277 | Type one or more IDs (separated by commas). 278 | 279 | ```yaml 280 | Type: String[] 281 | Parameter Sets: ByUniqueId 282 | Aliases: Id 283 | 284 | Required: False 285 | Position: Named 286 | Default value: None 287 | Accept pipeline input: False 288 | Accept wildcard characters: False 289 | ``` 290 | 291 | ### -VirtualDisk 292 | Accepts a VirtualDisk object as input. 293 | The Virtual Disk CIM object is exposed by the Get-VirtualDisk cmdlet. 294 | 295 | ```yaml 296 | Type: CimInstance 297 | Parameter Sets: ByVirtualDisk 298 | Aliases: 299 | 300 | Required: False 301 | Position: Named 302 | Default value: None 303 | Accept pipeline input: True (ByValue) 304 | Accept wildcard characters: False 305 | ``` 306 | 307 | ### -iSCSIConnection 308 | Accepts an iSCSIConnection object as input. 309 | The iSCSI Connection CIM object is exposed by the Get-IscsiConnection cmdlet. 310 | 311 | ```yaml 312 | Type: CimInstance 313 | Parameter Sets: ByiSCSIConnection 314 | Aliases: 315 | 316 | Required: False 317 | Position: Named 318 | Default value: None 319 | Accept pipeline input: True (ByValue) 320 | Accept wildcard characters: False 321 | ``` 322 | 323 | ### -iSCSISession 324 | Accepts an iSCSISession object as input. 325 | The iSCSI Session CIM object is exposed by the Get-IscsiSession cmdlet. 326 | 327 | ```yaml 328 | Type: CimInstance 329 | Parameter Sets: ByiSCSISession 330 | Aliases: 331 | 332 | Required: False 333 | Position: Named 334 | Default value: None 335 | Accept pipeline input: True (ByValue) 336 | Accept wildcard characters: False 337 | ``` 338 | 339 | ### -AsJob 340 | {{ Fill AsJob Description }} 341 | 342 | ```yaml 343 | Type: SwitchParameter 344 | Parameter Sets: (All) 345 | Aliases: 346 | 347 | Required: False 348 | Position: Named 349 | Default value: None 350 | Accept pipeline input: False 351 | Accept wildcard characters: False 352 | ``` 353 | 354 | ### CommonParameters 355 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 356 | 357 | ## INPUTS 358 | 359 | ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiConnection 360 | You can pipe an iSCSIConnection object to the iSCSIConnection parameter. 361 | 362 | ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiSession 363 | You can pipe an iSCSISession object to the iSCSISession parameter. 364 | 365 | ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Partition 366 | You can pipe a Partition object to the Partition parameter. 367 | 368 | ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk 369 | You can pipe a VirtualDisk object to the VirtualDisk parameter. 370 | 371 | ## OUTPUTS 372 | 373 | ### Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk 374 | This cmdlet outputs one or more objects representing disks. 375 | 376 | ## NOTES 377 | The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. 378 | The path after the pound sign (#) provides the namespace and class name for the underlying WMI object. 379 | 380 | Some objects such as disks might include trailing spaces in their friendly names. 381 | If you suspect that an object name could have trailing spaces, you can use a wildcard at the end of the name, for example Disk*, or use the Match parameter to instruct Windows PowerShell to include all strings that include the specified characters, instead of only strings that include only the specified characters. 382 | 383 | ## RELATED LINKS 384 | 385 | [Where-Object]() 386 | 387 | [Clear-Disk]() 388 | 389 | [Get-Partition]() 390 | 391 | [Get-StorageJob]() 392 | 393 | [Get-StorageSubSystem]() 394 | 395 | [Initialize-Disk]() 396 | 397 | [Set-Disk]() 398 | 399 | [Update-Disk]() 400 | 401 | -------------------------------------------------------------------------------- /scripts-definitions/docs/Get-Help.md: -------------------------------------------------------------------------------- 1 | --- 2 | external help file: System.Management.Automation.dll-Help.xml 3 | Module Name: Microsoft.PowerShell.Core 4 | online version: https://go.microsoft.com/fwlink/?LinkID=2096483 5 | schema: 2.0.0 6 | --- 7 | 8 | # Get-Help 9 | 10 | ## SYNOPSIS 11 | {{ Fill in the Synopsis }} 12 | 13 | ## SYNTAX 14 | 15 | ### AllUsersView (Default) 16 | ``` 17 | Get-Help [[-Name] ] [-Path ] [-Category ] [-Full] [-Component ] 18 | [-Functionality ] [-Role ] [] 19 | ``` 20 | 21 | ### DetailedView 22 | ``` 23 | Get-Help [[-Name] ] [-Path ] [-Category ] [-Detailed] [-Component ] 24 | [-Functionality ] [-Role ] [] 25 | ``` 26 | 27 | ### Examples 28 | ``` 29 | Get-Help [[-Name] ] [-Path ] [-Category ] [-Examples] [-Component ] 30 | [-Functionality ] [-Role ] [] 31 | ``` 32 | 33 | ### Parameters 34 | ``` 35 | Get-Help [[-Name] ] [-Path ] [-Category ] -Parameter 36 | [-Component ] [-Functionality ] [-Role ] [] 37 | ``` 38 | 39 | ### Online 40 | ``` 41 | Get-Help [[-Name] ] [-Path ] [-Category ] [-Component ] 42 | [-Functionality ] [-Role ] [-Online] [] 43 | ``` 44 | 45 | ### ShowWindow 46 | ``` 47 | Get-Help [[-Name] ] [-Path ] [-Category ] [-Component ] 48 | [-Functionality ] [-Role ] [-ShowWindow] [] 49 | ``` 50 | 51 | ## DESCRIPTION 52 | {{ Fill in the Description }} 53 | 54 | ## EXAMPLES 55 | 56 | ### Example 1 57 | ```powershell 58 | PS C:\> {{ Add example code here }} 59 | ``` 60 | 61 | {{ Add example description here }} 62 | 63 | ## PARAMETERS 64 | 65 | ### -Category 66 | {{ Fill Category Description }} 67 | 68 | ```yaml 69 | Type: String[] 70 | Parameter Sets: (All) 71 | Aliases: 72 | Accepted values: Alias, Cmdlet, Provider, General, FAQ, Glossary, HelpFile, ScriptCommand, Function, Filter, ExternalScript, All, DefaultHelp, DscResource, Class, Configuration 73 | 74 | Required: False 75 | Position: Named 76 | Default value: None 77 | Accept pipeline input: False 78 | Accept wildcard characters: False 79 | ``` 80 | 81 | ### -Component 82 | {{ Fill Component Description }} 83 | 84 | ```yaml 85 | Type: String[] 86 | Parameter Sets: (All) 87 | Aliases: 88 | 89 | Required: False 90 | Position: Named 91 | Default value: None 92 | Accept pipeline input: False 93 | Accept wildcard characters: False 94 | ``` 95 | 96 | ### -Detailed 97 | {{ Fill Detailed Description }} 98 | 99 | ```yaml 100 | Type: SwitchParameter 101 | Parameter Sets: DetailedView 102 | Aliases: 103 | 104 | Required: True 105 | Position: Named 106 | Default value: None 107 | Accept pipeline input: False 108 | Accept wildcard characters: False 109 | ``` 110 | 111 | ### -Examples 112 | {{ Fill Examples Description }} 113 | 114 | ```yaml 115 | Type: SwitchParameter 116 | Parameter Sets: Examples 117 | Aliases: 118 | 119 | Required: True 120 | Position: Named 121 | Default value: None 122 | Accept pipeline input: False 123 | Accept wildcard characters: False 124 | ``` 125 | 126 | ### -Full 127 | {{ Fill Full Description }} 128 | 129 | ```yaml 130 | Type: SwitchParameter 131 | Parameter Sets: AllUsersView 132 | Aliases: 133 | 134 | Required: False 135 | Position: Named 136 | Default value: None 137 | Accept pipeline input: False 138 | Accept wildcard characters: False 139 | ``` 140 | 141 | ### -Functionality 142 | {{ Fill Functionality Description }} 143 | 144 | ```yaml 145 | Type: String[] 146 | Parameter Sets: (All) 147 | Aliases: 148 | 149 | Required: False 150 | Position: Named 151 | Default value: None 152 | Accept pipeline input: False 153 | Accept wildcard characters: False 154 | ``` 155 | 156 | ### -Name 157 | {{ Fill Name Description }} 158 | 159 | ```yaml 160 | Type: String 161 | Parameter Sets: (All) 162 | Aliases: 163 | 164 | Required: False 165 | Position: 0 166 | Default value: None 167 | Accept pipeline input: True (ByPropertyName) 168 | Accept wildcard characters: False 169 | ``` 170 | 171 | ### -Online 172 | {{ Fill Online Description }} 173 | 174 | ```yaml 175 | Type: SwitchParameter 176 | Parameter Sets: Online 177 | Aliases: 178 | 179 | Required: True 180 | Position: Named 181 | Default value: None 182 | Accept pipeline input: False 183 | Accept wildcard characters: False 184 | ``` 185 | 186 | ### -Parameter 187 | {{ Fill Parameter Description }} 188 | 189 | ```yaml 190 | Type: String[] 191 | Parameter Sets: Parameters 192 | Aliases: 193 | 194 | Required: True 195 | Position: Named 196 | Default value: None 197 | Accept pipeline input: False 198 | Accept wildcard characters: False 199 | ``` 200 | 201 | ### -Path 202 | {{ Fill Path Description }} 203 | 204 | ```yaml 205 | Type: String 206 | Parameter Sets: (All) 207 | Aliases: 208 | 209 | Required: False 210 | Position: Named 211 | Default value: None 212 | Accept pipeline input: False 213 | Accept wildcard characters: False 214 | ``` 215 | 216 | ### -Role 217 | {{ Fill Role Description }} 218 | 219 | ```yaml 220 | Type: String[] 221 | Parameter Sets: (All) 222 | Aliases: 223 | 224 | Required: False 225 | Position: Named 226 | Default value: None 227 | Accept pipeline input: False 228 | Accept wildcard characters: False 229 | ``` 230 | 231 | ### -ShowWindow 232 | {{ Fill ShowWindow Description }} 233 | 234 | ```yaml 235 | Type: SwitchParameter 236 | Parameter Sets: ShowWindow 237 | Aliases: 238 | 239 | Required: True 240 | Position: Named 241 | Default value: None 242 | Accept pipeline input: False 243 | Accept wildcard characters: False 244 | ``` 245 | 246 | ### CommonParameters 247 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 248 | 249 | ## INPUTS 250 | 251 | ### System.String 252 | 253 | ## OUTPUTS 254 | 255 | ### System.Object 256 | ## NOTES 257 | 258 | ## RELATED LINKS 259 | 260 | [https://go.microsoft.com/fwlink/?LinkID=2096483](https://go.microsoft.com/fwlink/?LinkID=2096483) 261 | 262 | -------------------------------------------------------------------------------- /scripts-definitions/docs/README.md: -------------------------------------------------------------------------------- 1 | # Generating help in markdown with platyPS 2 | 3 | https://github.com/PowerShell/platyPS/tree/master/docs 4 | 5 | ```powershell 6 | New-MarkdownHelp -Command Get-Help -OutputFolder '.\scripts-definitions\docs\' 7 | ``` -------------------------------------------------------------------------------- /scripts-definitions/docs/Start-Process.md: -------------------------------------------------------------------------------- 1 | --- 2 | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml 3 | Module Name: Microsoft.PowerShell.Management 4 | online version: https://go.microsoft.com/fwlink/?LinkID=2097141 5 | schema: 2.0.0 6 | --- 7 | 8 | # Start-Process 9 | 10 | ## SYNOPSIS 11 | {{ Fill in the Synopsis }} 12 | 13 | ## SYNTAX 14 | 15 | ### Default (Default) 16 | ``` 17 | Start-Process [-FilePath] [[-ArgumentList] ] [-Credential ] 18 | [-WorkingDirectory ] [-LoadUserProfile] [-NoNewWindow] [-PassThru] [-RedirectStandardError ] 19 | [-RedirectStandardInput ] [-RedirectStandardOutput ] [-WindowStyle ] 20 | [-Wait] [-UseNewEnvironment] [-WhatIf] [-Confirm] [] 21 | ``` 22 | 23 | ### UseShellExecute 24 | ``` 25 | Start-Process [-FilePath] [[-ArgumentList] ] [-WorkingDirectory ] [-PassThru] 26 | [-Verb ] [-WindowStyle ] [-Wait] [-WhatIf] [-Confirm] [] 27 | ``` 28 | 29 | ## DESCRIPTION 30 | {{ Fill in the Description }} 31 | 32 | ## EXAMPLES 33 | 34 | ### Example 1 35 | ```powershell 36 | PS C:\> {{ Add example code here }} 37 | ``` 38 | 39 | {{ Add example description here }} 40 | 41 | ## PARAMETERS 42 | 43 | ### -ArgumentList 44 | {{ Fill ArgumentList Description }} 45 | 46 | ```yaml 47 | Type: String[] 48 | Parameter Sets: (All) 49 | Aliases: Args 50 | 51 | Required: False 52 | Position: 1 53 | Default value: None 54 | Accept pipeline input: False 55 | Accept wildcard characters: False 56 | ``` 57 | 58 | ### -Confirm 59 | Prompts you for confirmation before running the cmdlet. 60 | 61 | ```yaml 62 | Type: SwitchParameter 63 | Parameter Sets: (All) 64 | Aliases: cf 65 | 66 | Required: False 67 | Position: Named 68 | Default value: None 69 | Accept pipeline input: False 70 | Accept wildcard characters: False 71 | ``` 72 | 73 | ### -Credential 74 | {{ Fill Credential Description }} 75 | 76 | ```yaml 77 | Type: PSCredential 78 | Parameter Sets: Default 79 | Aliases: RunAs 80 | 81 | Required: False 82 | Position: Named 83 | Default value: None 84 | Accept pipeline input: False 85 | Accept wildcard characters: False 86 | ``` 87 | 88 | ### -FilePath 89 | {{ Fill FilePath Description }} 90 | 91 | ```yaml 92 | Type: String 93 | Parameter Sets: (All) 94 | Aliases: PSPath, Path 95 | 96 | Required: True 97 | Position: 0 98 | Default value: None 99 | Accept pipeline input: False 100 | Accept wildcard characters: False 101 | ``` 102 | 103 | ### -LoadUserProfile 104 | {{ Fill LoadUserProfile Description }} 105 | 106 | ```yaml 107 | Type: SwitchParameter 108 | Parameter Sets: Default 109 | Aliases: Lup 110 | 111 | Required: False 112 | Position: Named 113 | Default value: None 114 | Accept pipeline input: False 115 | Accept wildcard characters: False 116 | ``` 117 | 118 | ### -NoNewWindow 119 | {{ Fill NoNewWindow Description }} 120 | 121 | ```yaml 122 | Type: SwitchParameter 123 | Parameter Sets: Default 124 | Aliases: nnw 125 | 126 | Required: False 127 | Position: Named 128 | Default value: None 129 | Accept pipeline input: False 130 | Accept wildcard characters: False 131 | ``` 132 | 133 | ### -PassThru 134 | {{ Fill PassThru Description }} 135 | 136 | ```yaml 137 | Type: SwitchParameter 138 | Parameter Sets: (All) 139 | Aliases: 140 | 141 | Required: False 142 | Position: Named 143 | Default value: None 144 | Accept pipeline input: False 145 | Accept wildcard characters: False 146 | ``` 147 | 148 | ### -RedirectStandardError 149 | {{ Fill RedirectStandardError Description }} 150 | 151 | ```yaml 152 | Type: String 153 | Parameter Sets: Default 154 | Aliases: RSE 155 | 156 | Required: False 157 | Position: Named 158 | Default value: None 159 | Accept pipeline input: False 160 | Accept wildcard characters: False 161 | ``` 162 | 163 | ### -RedirectStandardInput 164 | {{ Fill RedirectStandardInput Description }} 165 | 166 | ```yaml 167 | Type: String 168 | Parameter Sets: Default 169 | Aliases: RSI 170 | 171 | Required: False 172 | Position: Named 173 | Default value: None 174 | Accept pipeline input: False 175 | Accept wildcard characters: False 176 | ``` 177 | 178 | ### -RedirectStandardOutput 179 | {{ Fill RedirectStandardOutput Description }} 180 | 181 | ```yaml 182 | Type: String 183 | Parameter Sets: Default 184 | Aliases: RSO 185 | 186 | Required: False 187 | Position: Named 188 | Default value: None 189 | Accept pipeline input: False 190 | Accept wildcard characters: False 191 | ``` 192 | 193 | ### -UseNewEnvironment 194 | {{ Fill UseNewEnvironment Description }} 195 | 196 | ```yaml 197 | Type: SwitchParameter 198 | Parameter Sets: Default 199 | Aliases: 200 | 201 | Required: False 202 | Position: Named 203 | Default value: None 204 | Accept pipeline input: False 205 | Accept wildcard characters: False 206 | ``` 207 | 208 | ### -Verb 209 | {{ Fill Verb Description }} 210 | 211 | ```yaml 212 | Type: String 213 | Parameter Sets: UseShellExecute 214 | Aliases: 215 | 216 | Required: False 217 | Position: Named 218 | Default value: None 219 | Accept pipeline input: False 220 | Accept wildcard characters: False 221 | ``` 222 | 223 | ### -Wait 224 | {{ Fill Wait Description }} 225 | 226 | ```yaml 227 | Type: SwitchParameter 228 | Parameter Sets: (All) 229 | Aliases: 230 | 231 | Required: False 232 | Position: Named 233 | Default value: None 234 | Accept pipeline input: False 235 | Accept wildcard characters: False 236 | ``` 237 | 238 | ### -WhatIf 239 | Shows what would happen if the cmdlet runs. 240 | The cmdlet is not run. 241 | 242 | ```yaml 243 | Type: SwitchParameter 244 | Parameter Sets: (All) 245 | Aliases: wi 246 | 247 | Required: False 248 | Position: Named 249 | Default value: None 250 | Accept pipeline input: False 251 | Accept wildcard characters: False 252 | ``` 253 | 254 | ### -WindowStyle 255 | {{ Fill WindowStyle Description }} 256 | 257 | ```yaml 258 | Type: ProcessWindowStyle 259 | Parameter Sets: (All) 260 | Aliases: 261 | Accepted values: Normal, Hidden, Minimized, Maximized 262 | 263 | Required: False 264 | Position: Named 265 | Default value: None 266 | Accept pipeline input: False 267 | Accept wildcard characters: False 268 | ``` 269 | 270 | ### -WorkingDirectory 271 | {{ Fill WorkingDirectory Description }} 272 | 273 | ```yaml 274 | Type: String 275 | Parameter Sets: (All) 276 | Aliases: 277 | 278 | Required: False 279 | Position: Named 280 | Default value: None 281 | Accept pipeline input: False 282 | Accept wildcard characters: False 283 | ``` 284 | 285 | ### CommonParameters 286 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 287 | 288 | ## INPUTS 289 | 290 | ### None 291 | 292 | ## OUTPUTS 293 | 294 | ### System.Diagnostics.Process 295 | 296 | ## NOTES 297 | 298 | ## RELATED LINKS 299 | 300 | [https://go.microsoft.com/fwlink/?LinkID=2097141](https://go.microsoft.com/fwlink/?LinkID=2097141) 301 | 302 | -------------------------------------------------------------------------------- /scripts-definitions/docs/Stop-Process.md: -------------------------------------------------------------------------------- 1 | --- 2 | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml 3 | Module Name: Microsoft.PowerShell.Management 4 | online version: https://go.microsoft.com/fwlink/?LinkID=2097058 5 | schema: 2.0.0 6 | --- 7 | 8 | # Stop-Process 9 | 10 | ## SYNOPSIS 11 | {{ Fill in the Synopsis }} 12 | 13 | ## SYNTAX 14 | 15 | ### Id (Default) 16 | ``` 17 | Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] 18 | ``` 19 | 20 | ### Name 21 | ``` 22 | Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] [] 23 | ``` 24 | 25 | ### InputObject 26 | ``` 27 | Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] 28 | ``` 29 | 30 | ## DESCRIPTION 31 | {{ Fill in the Description }} 32 | 33 | ## EXAMPLES 34 | 35 | ### Example 1 36 | ```powershell 37 | PS C:\> {{ Add example code here }} 38 | ``` 39 | 40 | {{ Add example description here }} 41 | 42 | ## PARAMETERS 43 | 44 | ### -Confirm 45 | Prompts you for confirmation before running the cmdlet. 46 | 47 | ```yaml 48 | Type: SwitchParameter 49 | Parameter Sets: (All) 50 | Aliases: cf 51 | 52 | Required: False 53 | Position: Named 54 | Default value: None 55 | Accept pipeline input: False 56 | Accept wildcard characters: False 57 | ``` 58 | 59 | ### -Force 60 | {{ Fill Force Description }} 61 | 62 | ```yaml 63 | Type: SwitchParameter 64 | Parameter Sets: (All) 65 | Aliases: 66 | 67 | Required: False 68 | Position: Named 69 | Default value: None 70 | Accept pipeline input: False 71 | Accept wildcard characters: False 72 | ``` 73 | 74 | ### -Id 75 | {{ Fill Id Description }} 76 | 77 | ```yaml 78 | Type: Int32[] 79 | Parameter Sets: Id 80 | Aliases: 81 | 82 | Required: True 83 | Position: 0 84 | Default value: None 85 | Accept pipeline input: True (ByPropertyName) 86 | Accept wildcard characters: False 87 | ``` 88 | 89 | ### -InputObject 90 | {{ Fill InputObject Description }} 91 | 92 | ```yaml 93 | Type: Process[] 94 | Parameter Sets: InputObject 95 | Aliases: 96 | 97 | Required: True 98 | Position: 0 99 | Default value: None 100 | Accept pipeline input: True (ByValue) 101 | Accept wildcard characters: False 102 | ``` 103 | 104 | ### -Name 105 | {{ Fill Name Description }} 106 | 107 | ```yaml 108 | Type: String[] 109 | Parameter Sets: Name 110 | Aliases: ProcessName 111 | 112 | Required: True 113 | Position: Named 114 | Default value: None 115 | Accept pipeline input: True (ByPropertyName) 116 | Accept wildcard characters: False 117 | ``` 118 | 119 | ### -PassThru 120 | {{ Fill PassThru Description }} 121 | 122 | ```yaml 123 | Type: SwitchParameter 124 | Parameter Sets: (All) 125 | Aliases: 126 | 127 | Required: False 128 | Position: Named 129 | Default value: None 130 | Accept pipeline input: False 131 | Accept wildcard characters: False 132 | ``` 133 | 134 | ### -WhatIf 135 | Shows what would happen if the cmdlet runs. 136 | The cmdlet is not run. 137 | 138 | ```yaml 139 | Type: SwitchParameter 140 | Parameter Sets: (All) 141 | Aliases: wi 142 | 143 | Required: False 144 | Position: Named 145 | Default value: None 146 | Accept pipeline input: False 147 | Accept wildcard characters: False 148 | ``` 149 | 150 | ### CommonParameters 151 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 152 | 153 | ## INPUTS 154 | 155 | ### System.String[] 156 | 157 | ### System.Int32[] 158 | 159 | ### System.Diagnostics.Process[] 160 | 161 | ## OUTPUTS 162 | 163 | ### System.Diagnostics.Process 164 | 165 | ## NOTES 166 | 167 | ## RELATED LINKS 168 | 169 | [https://go.microsoft.com/fwlink/?LinkID=2097058](https://go.microsoft.com/fwlink/?LinkID=2097058) 170 | 171 | -------------------------------------------------------------------------------- /scripts-definitions/docs/Test-Connection.md: -------------------------------------------------------------------------------- 1 | --- 2 | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml 3 | Module Name: Microsoft.PowerShell.Management 4 | online version: https://go.microsoft.com/fwlink/?LinkID=2097144 5 | schema: 2.0.0 6 | --- 7 | 8 | # Test-Connection 9 | 10 | ## SYNOPSIS 11 | {{ Fill in the Synopsis }} 12 | 13 | ## SYNTAX 14 | 15 | ### DefaultPing (Default) 16 | ``` 17 | Test-Connection [-Ping] [-IPv4] [-IPv6] [-ResolveDestination] [-Source ] [-MaxHops ] 18 | [-Count ] [-Delay ] [-BufferSize ] [-DontFragment] [-TimeoutSeconds ] 19 | [-TargetName] [-Quiet] [] 20 | ``` 21 | 22 | ### RepeatPing 23 | ``` 24 | Test-Connection [-Ping] [-IPv4] [-IPv6] [-ResolveDestination] [-Source ] [-MaxHops ] 25 | [-Delay ] [-BufferSize ] [-DontFragment] [-Repeat] [-TimeoutSeconds ] 26 | [-TargetName] [-Quiet] [] 27 | ``` 28 | 29 | ### TraceRoute 30 | ``` 31 | Test-Connection [-IPv4] [-IPv6] [-ResolveDestination] [-Source ] [-MaxHops ] 32 | [-TimeoutSeconds ] [-TargetName] [-Traceroute] [-Quiet] [] 33 | ``` 34 | 35 | ### MtuSizeDetect 36 | ``` 37 | Test-Connection [-IPv4] [-IPv6] [-ResolveDestination] [-TimeoutSeconds ] [-TargetName] 38 | [-MtuSize] [-Quiet] [] 39 | ``` 40 | 41 | ### TcpPort 42 | ``` 43 | Test-Connection [-IPv4] [-IPv6] [-ResolveDestination] [-Source ] [-TimeoutSeconds ] 44 | [-TargetName] -TcpPort [-Quiet] [] 45 | ``` 46 | 47 | ## DESCRIPTION 48 | {{ Fill in the Description }} 49 | 50 | ## EXAMPLES 51 | 52 | ### Example 1 53 | ```powershell 54 | PS C:\> {{ Add example code here }} 55 | ``` 56 | 57 | {{ Add example description here }} 58 | 59 | ## PARAMETERS 60 | 61 | ### -BufferSize 62 | {{ Fill BufferSize Description }} 63 | 64 | ```yaml 65 | Type: Int32 66 | Parameter Sets: DefaultPing, RepeatPing 67 | Aliases: Size, Bytes, BS 68 | 69 | Required: False 70 | Position: Named 71 | Default value: None 72 | Accept pipeline input: False 73 | Accept wildcard characters: False 74 | ``` 75 | 76 | ### -Count 77 | {{ Fill Count Description }} 78 | 79 | ```yaml 80 | Type: Int32 81 | Parameter Sets: DefaultPing 82 | Aliases: 83 | 84 | Required: False 85 | Position: Named 86 | Default value: None 87 | Accept pipeline input: False 88 | Accept wildcard characters: False 89 | ``` 90 | 91 | ### -Delay 92 | {{ Fill Delay Description }} 93 | 94 | ```yaml 95 | Type: Int32 96 | Parameter Sets: DefaultPing, RepeatPing 97 | Aliases: 98 | 99 | Required: False 100 | Position: Named 101 | Default value: None 102 | Accept pipeline input: False 103 | Accept wildcard characters: False 104 | ``` 105 | 106 | ### -DontFragment 107 | {{ Fill DontFragment Description }} 108 | 109 | ```yaml 110 | Type: SwitchParameter 111 | Parameter Sets: DefaultPing, RepeatPing 112 | Aliases: 113 | 114 | Required: False 115 | Position: Named 116 | Default value: None 117 | Accept pipeline input: False 118 | Accept wildcard characters: False 119 | ``` 120 | 121 | ### -IPv4 122 | {{ Fill IPv4 Description }} 123 | 124 | ```yaml 125 | Type: SwitchParameter 126 | Parameter Sets: (All) 127 | Aliases: 128 | 129 | Required: False 130 | Position: Named 131 | Default value: None 132 | Accept pipeline input: False 133 | Accept wildcard characters: False 134 | ``` 135 | 136 | ### -IPv6 137 | {{ Fill IPv6 Description }} 138 | 139 | ```yaml 140 | Type: SwitchParameter 141 | Parameter Sets: (All) 142 | Aliases: 143 | 144 | Required: False 145 | Position: Named 146 | Default value: None 147 | Accept pipeline input: False 148 | Accept wildcard characters: False 149 | ``` 150 | 151 | ### -MaxHops 152 | {{ Fill MaxHops Description }} 153 | 154 | ```yaml 155 | Type: Int32 156 | Parameter Sets: DefaultPing, RepeatPing, TraceRoute 157 | Aliases: Ttl, TimeToLive, Hops 158 | 159 | Required: False 160 | Position: Named 161 | Default value: None 162 | Accept pipeline input: False 163 | Accept wildcard characters: False 164 | ``` 165 | 166 | ### -MtuSize 167 | {{ Fill MtuSize Description }} 168 | 169 | ```yaml 170 | Type: SwitchParameter 171 | Parameter Sets: MtuSizeDetect 172 | Aliases: MtuSizeDetect 173 | 174 | Required: True 175 | Position: Named 176 | Default value: None 177 | Accept pipeline input: False 178 | Accept wildcard characters: False 179 | ``` 180 | 181 | ### -Ping 182 | {{ Fill Ping Description }} 183 | 184 | ```yaml 185 | Type: SwitchParameter 186 | Parameter Sets: DefaultPing, RepeatPing 187 | Aliases: 188 | 189 | Required: False 190 | Position: Named 191 | Default value: None 192 | Accept pipeline input: False 193 | Accept wildcard characters: False 194 | ``` 195 | 196 | ### -Quiet 197 | {{ Fill Quiet Description }} 198 | 199 | ```yaml 200 | Type: SwitchParameter 201 | Parameter Sets: (All) 202 | Aliases: 203 | 204 | Required: False 205 | Position: Named 206 | Default value: None 207 | Accept pipeline input: False 208 | Accept wildcard characters: False 209 | ``` 210 | 211 | ### -Repeat 212 | {{ Fill Repeat Description }} 213 | 214 | ```yaml 215 | Type: SwitchParameter 216 | Parameter Sets: RepeatPing 217 | Aliases: Continuous 218 | 219 | Required: True 220 | Position: Named 221 | Default value: None 222 | Accept pipeline input: False 223 | Accept wildcard characters: False 224 | ``` 225 | 226 | ### -ResolveDestination 227 | {{ Fill ResolveDestination Description }} 228 | 229 | ```yaml 230 | Type: SwitchParameter 231 | Parameter Sets: (All) 232 | Aliases: 233 | 234 | Required: False 235 | Position: Named 236 | Default value: None 237 | Accept pipeline input: False 238 | Accept wildcard characters: False 239 | ``` 240 | 241 | ### -Source 242 | {{ Fill Source Description }} 243 | 244 | ```yaml 245 | Type: String 246 | Parameter Sets: DefaultPing, RepeatPing, TraceRoute, TcpPort 247 | Aliases: 248 | 249 | Required: False 250 | Position: Named 251 | Default value: None 252 | Accept pipeline input: False 253 | Accept wildcard characters: False 254 | ``` 255 | 256 | ### -TargetName 257 | {{ Fill TargetName Description }} 258 | 259 | ```yaml 260 | Type: String[] 261 | Parameter Sets: (All) 262 | Aliases: ComputerName 263 | 264 | Required: True 265 | Position: 0 266 | Default value: None 267 | Accept pipeline input: True (ByPropertyName, ByValue) 268 | Accept wildcard characters: False 269 | ``` 270 | 271 | ### -TcpPort 272 | {{ Fill TcpPort Description }} 273 | 274 | ```yaml 275 | Type: Int32 276 | Parameter Sets: TcpPort 277 | Aliases: 278 | 279 | Required: True 280 | Position: Named 281 | Default value: None 282 | Accept pipeline input: False 283 | Accept wildcard characters: False 284 | ``` 285 | 286 | ### -TimeoutSeconds 287 | {{ Fill TimeoutSeconds Description }} 288 | 289 | ```yaml 290 | Type: Int32 291 | Parameter Sets: (All) 292 | Aliases: 293 | 294 | Required: False 295 | Position: Named 296 | Default value: None 297 | Accept pipeline input: False 298 | Accept wildcard characters: False 299 | ``` 300 | 301 | ### -Traceroute 302 | {{ Fill Traceroute Description }} 303 | 304 | ```yaml 305 | Type: SwitchParameter 306 | Parameter Sets: TraceRoute 307 | Aliases: 308 | 309 | Required: True 310 | Position: Named 311 | Default value: None 312 | Accept pipeline input: False 313 | Accept wildcard characters: False 314 | ``` 315 | 316 | ### CommonParameters 317 | This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 318 | 319 | ## INPUTS 320 | 321 | ### System.String[] 322 | 323 | ## OUTPUTS 324 | 325 | ### Microsoft.PowerShell.Commands.TestConnectionCommand+PingStatus 326 | 327 | ### Microsoft.PowerShell.Commands.TestConnectionCommand+PingStatus 328 | 329 | ### System.Boolean 330 | 331 | ### Microsoft.PowerShell.Commands.TestConnectionCommand+PingMtuStatus 332 | 333 | ### System.Int32 334 | 335 | ### Microsoft.PowerShell.Commands.TestConnectionCommand+TraceStatus 336 | 337 | ## NOTES 338 | 339 | ## RELATED LINKS 340 | 341 | [https://go.microsoft.com/fwlink/?LinkID=2097144](https://go.microsoft.com/fwlink/?LinkID=2097144) 342 | 343 | -------------------------------------------------------------------------------- /scripts-definitions/master-definition-example.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.2", 3 | "releaseDate": "2020-05-23", 4 | "definitionsUrl": [ 5 | "https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/base-module-example.json", 6 | "https://raw.githubusercontent.com/houby-studio/lazy-admin/master/scripts-definitions/active-directory-module-example.json" 7 | ] 8 | } -------------------------------------------------------------------------------- /src-electron/electron-flag.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FEATURE-FLAG FILE IS AUTOGENERATED, 2 | // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING 3 | import "quasar/dist/types/feature-flag"; 4 | 5 | declare module "quasar/dist/types/feature-flag" { 6 | interface QuasarFeatureFlags { 7 | electron: true; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src-electron/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-electron/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /src-electron/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/StoreLogo.png -------------------------------------------------------------------------------- /src-electron/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/icon.icns -------------------------------------------------------------------------------- /src-electron/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/icon.ico -------------------------------------------------------------------------------- /src-electron/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/icon.png -------------------------------------------------------------------------------- /src-electron/icons/linux-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-128x128.png -------------------------------------------------------------------------------- /src-electron/icons/linux-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-16x16.png -------------------------------------------------------------------------------- /src-electron/icons/linux-24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-24x24.png -------------------------------------------------------------------------------- /src-electron/icons/linux-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-32x32.png -------------------------------------------------------------------------------- /src-electron/icons/linux-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-48x48.png -------------------------------------------------------------------------------- /src-electron/icons/linux-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-512x512.png -------------------------------------------------------------------------------- /src-electron/icons/linux-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-64x64.png -------------------------------------------------------------------------------- /src-electron/icons/linux-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/houby-studio/lazy-admin/989e9ed80a573734b553063e5a3da4df46e0f391/src-electron/icons/linux-96x96.png -------------------------------------------------------------------------------- /src-electron/main-process/electron-main.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is used specifically and only for development. It installs 3 | * `electron-debug` & `vue-devtools`. There shouldn't be any need to 4 | * modify this file, but it can be used to extend your development 5 | * environment. 6 | */ 7 | 8 | // Install `electron-debug` with `devtron` 9 | require('electron-debug')({ showDevTools: true }) 10 | 11 | // Install `vue-devtools` 12 | require('electron').app.on('ready', () => { 13 | let installExtension = require('electron-devtools-installer') 14 | installExtension.default(installExtension.VUEJS_DEVTOOLS) 15 | .then(() => {}) 16 | .catch(err => { 17 | console.log('Unable to install `vue-devtools`: \n', err) 18 | }) 19 | }) 20 | 21 | // Require `main` process to boot app 22 | require('./electron-main') 23 | -------------------------------------------------------------------------------- /src-electron/main-process/electron-main.js: -------------------------------------------------------------------------------- 1 | import { app, BrowserWindow, nativeTheme } from 'electron' 2 | require('@electron/remote/main').initialize() 3 | 4 | try { 5 | if (process.platform === 'win32' && nativeTheme.shouldUseDarkColors === true) { 6 | require('fs').unlinkSync(require('path').join(app.getPath('userData'), 'DevTools Extensions')) 7 | } 8 | } catch (_) { } 9 | 10 | /** 11 | * Set `__statics` path to static files in production; 12 | * The reason we are setting it here is that the path needs to be evaluated at runtime 13 | */ 14 | if (process.env.PROD) { 15 | global.__statics = require('path').join(__dirname, 'statics').replace(/\\/g, '\\\\') 16 | } 17 | 18 | let mainWindow 19 | 20 | function createWindow () { 21 | /** 22 | * Initial window options 23 | */ 24 | mainWindow = new BrowserWindow({ 25 | width: 1300, 26 | height: 760, 27 | useContentSize: true, 28 | frame: false, 29 | webPreferences: { 30 | // Change from /quasar.conf.js > electron > nodeIntegration; 31 | // More info: https://quasar.dev/quasar-cli/developing-electron-apps/node-integration 32 | nodeIntegration: QUASAR_NODE_INTEGRATION, 33 | 34 | // Eanble @electron/remote 35 | enableRemoteModule: true 36 | 37 | // More info: /quasar-cli/developing-electron-apps/electron-preload-script 38 | // preload: path.resolve(__dirname, 'electron-preload.js') 39 | } 40 | }) 41 | 42 | mainWindow.loadURL(process.env.APP_URL) 43 | 44 | mainWindow.on('closed', () => { 45 | mainWindow = null 46 | }) 47 | 48 | // Prevent opening external URL in app, open in default browser instead 49 | mainWindow.webContents.on('new-window', function (e, url) { 50 | e.preventDefault() 51 | require('electron').shell.openExternal(url) 52 | }) 53 | } 54 | 55 | app.on('ready', createWindow) 56 | 57 | app.on('window-all-closed', () => { 58 | if (process.platform !== 'darwin') { 59 | app.quit() 60 | } 61 | }) 62 | 63 | app.on('activate', () => { 64 | if (mainWindow === null) { 65 | createWindow() 66 | } 67 | }) 68 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/assets/prism_tomorrowlight.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.20.0 2 | https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apl+applescript+aql+arduino+arff+asciidoc+aspnet+asm6502+autohotkey+autoit+bash+basic+batch+bbcode+bison+bnf+brainfuck+brightscript+bro+c+csharp+cpp+cil+clojure+cmake+coffeescript+concurnas+csp+crystal+css-extras+cypher+d+dart+dax+diff+django+dns-zone-file+docker+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+firestore-security-rules+flow+fortran+ftl+gml+gcode+gdscript+gedcom+gherkin+git+glsl+go+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+http+hpkp+hsts+ichigojam+icon+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keyman+kotlin+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+lolcode+lua+makefile+markdown+markup-templating+matlab+mel+mizar+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+nasm+neon+nginx+nim+nix+nsis+objectivec+ocaml+opencl+oz+parigp+parser+pascal+pascaligo+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plsql+powerquery+powershell+processing+prolog+properties+protobuf+pug+puppet+pure+purebasic+python+q+qml+qore+r+racket+jsx+tsx+reason+regex+renpy+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+iecst+stylus+swift+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+turtle+twig+typescript+unrealscript+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+wiki+xeora+xml-doc+xojo+xquery+yaml+zig */ 3 | /** 4 | * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML 5 | * Based on https://github.com/chriskempson/tomorrow-theme 6 | * @author Rose Pritchard 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: #ccc; 12 | background: none; 13 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 14 | font-size: 1em; 15 | text-align: left; 16 | white-space: pre; 17 | word-spacing: normal; 18 | word-break: normal; 19 | word-wrap: normal; 20 | line-height: 1.5; 21 | 22 | -moz-tab-size: 4; 23 | -o-tab-size: 4; 24 | tab-size: 4; 25 | 26 | -webkit-hyphens: none; 27 | -moz-hyphens: none; 28 | -ms-hyphens: none; 29 | hyphens: none; 30 | 31 | } 32 | 33 | /* Code blocks */ 34 | pre[class*="language-"] { 35 | padding: 1em; 36 | margin: .5em 0; 37 | overflow: auto; 38 | } 39 | 40 | :not(pre) > code[class*="language-"], 41 | pre[class*="language-"] { 42 | background: #2d2d2d; 43 | } 44 | 45 | /* Inline code */ 46 | :not(pre) > code[class*="language-"] { 47 | padding: .1em; 48 | border-radius: .3em; 49 | white-space: normal; 50 | } 51 | 52 | .token.comment, 53 | .token.block-comment, 54 | .token.prolog, 55 | .token.doctype, 56 | .token.cdata { 57 | color: #999; 58 | } 59 | 60 | .token.punctuation { 61 | color: #ccc; 62 | } 63 | 64 | .token.tag, 65 | .token.attr-name, 66 | .token.namespace, 67 | .token.deleted { 68 | color: #e2777a; 69 | } 70 | 71 | .token.function-name { 72 | color: #6196cc; 73 | } 74 | 75 | .token.boolean, 76 | .token.number, 77 | .token.function { 78 | color: #f08d49; 79 | } 80 | 81 | .token.property, 82 | .token.class-name, 83 | .token.constant, 84 | .token.symbol { 85 | color: #f8c555; 86 | } 87 | 88 | .token.selector, 89 | .token.important, 90 | .token.atrule, 91 | .token.keyword, 92 | .token.builtin { 93 | color: #cc99cd; 94 | } 95 | 96 | .token.string, 97 | .token.char, 98 | .token.attr-value, 99 | .token.regex, 100 | .token.variable { 101 | color: #7ec699; 102 | } 103 | 104 | .token.operator, 105 | .token.entity, 106 | .token.url { 107 | color: #67cdcc; 108 | } 109 | 110 | .token.important, 111 | .token.bold { 112 | font-weight: bold; 113 | } 114 | .token.italic { 115 | font-style: italic; 116 | } 117 | 118 | .token.entity { 119 | cursor: help; 120 | } 121 | 122 | .token.inserted { 123 | color: green; 124 | } 125 | 126 | -------------------------------------------------------------------------------- /src/boot/auto-updater.js: -------------------------------------------------------------------------------- 1 | // Electron-updater 2 | const autoUpdater = require('@electron/remote').require('electron-updater').autoUpdater 3 | 4 | // Register Auto Updater as prototype, to access it anywhere 5 | // This allows for easy calling via this.$autoUpdater anywhere in Vue App 6 | export default async ({ Vue }) => { 7 | Vue.prototype.$autoUpdater = autoUpdater 8 | } 9 | -------------------------------------------------------------------------------- /src/boot/axios.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import axios from 'axios' 3 | 4 | Vue.prototype.$axios = axios 5 | -------------------------------------------------------------------------------- /src/boot/clipboard2.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueClipboard from 'vue-clipboard2' 3 | 4 | // This piece of code allows application to manipulate clipboard content 5 | Vue.use(VueClipboard) 6 | -------------------------------------------------------------------------------- /src/boot/components.js: -------------------------------------------------------------------------------- 1 | // import components 2 | import WindowTitlebar from 'components/WindowTitlebar.vue' 3 | import SettingsItems from 'components/SettingsItems.vue' 4 | import VersionList from 'components/VersionList.vue' 5 | import HistoryDrawer from 'components/HistoryDrawer.vue' 6 | import HelpDialog from 'components/HelpDialog.vue' 7 | import ProgressDialog from 'components/ProgressDialog.vue' 8 | import ResultsDialog from 'components/ResultsDialog.vue' 9 | import ExecuteDialog from 'components/ExecuteDialog.vue' 10 | import CommandDialog from 'components/CommandDialog.vue' 11 | import ScriptsTable from 'components/ScriptsTable.vue' 12 | import LanguagePicker from 'components/LanguagePicker.vue' 13 | 14 | // add components to Vue 15 | export default async ({ Vue }) => { 16 | Vue.component('WindowTitlebar', WindowTitlebar) 17 | Vue.component('SettingsItems', SettingsItems) 18 | Vue.component('VersionList', VersionList) 19 | Vue.component('HistoryDrawer', HistoryDrawer) 20 | Vue.component('HelpDialog', HelpDialog) 21 | Vue.component('ProgressDialog', ProgressDialog) 22 | Vue.component('ResultsDialog', ResultsDialog) 23 | Vue.component('ExecuteDialog', ExecuteDialog) 24 | Vue.component('CommandDialog', CommandDialog) 25 | Vue.component('ScriptsTable', ScriptsTable) 26 | Vue.component('LanguagePicker', LanguagePicker) 27 | } 28 | -------------------------------------------------------------------------------- /src/boot/electron-log.js: -------------------------------------------------------------------------------- 1 | import log from 'electron-log' 2 | 3 | // Override default console function with electron-log functions 4 | Object.assign(console, log.functions) 5 | -------------------------------------------------------------------------------- /src/boot/i18n.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueI18n from 'vue-i18n' 3 | import messages from 'src/i18n' 4 | 5 | Vue.use(VueI18n) 6 | 7 | const i18n = new VueI18n({ 8 | language: 'en-us', 9 | fallbackLocale: 'en-us', 10 | messages, 11 | silentTranslationWarn: true 12 | }) 13 | 14 | export default ({ app, store }) => { 15 | // Set i18n instance on app 16 | app.i18n = i18n 17 | // Read saved value from vuex store and load it 18 | app.i18n.locale = store.getters['lazystore/getLanguage'] 19 | } 20 | 21 | export { i18n } 22 | -------------------------------------------------------------------------------- /src/boot/powershell.js: -------------------------------------------------------------------------------- 1 | // PowerShell Module 2 | import Shell from 'node-powershell' 3 | import NewPSSessionWithCredentials from '../statics/pwsh/scripts/New-PSSessionWithCredentials' 4 | 5 | function CustomShell () { 6 | // Private variable holding scriptblock to create Credential object and PSSession 7 | let _credentialString = '' 8 | 9 | // Public setter for _credentialString allowing app to set value from outside 10 | this.setCredentialString = function (string) { 11 | _credentialString = string 12 | return this 13 | } 14 | 15 | // PowerShell process object 16 | this.shell = {} 17 | 18 | // Function which creates new PowerShell object and stores it to this.shell 19 | this.createShell = function (done) { 20 | // Try to start pwsh shell, fallback to Windows PowerShell 21 | let newShell 22 | try { 23 | newShell = new Shell({ 24 | executionPolicy: 'Bypass', 25 | noProfile: true, 26 | nonInteractive: true, 27 | pwsh: true 28 | }) 29 | } catch { 30 | newShell = new Shell({ 31 | executionPolicy: 'Bypass', 32 | noProfile: true, 33 | nonInteractive: true 34 | }) 35 | // Set fallback to true, so main process knows pwsh failed 36 | newShell.fallback = true 37 | } 38 | // Set new PowerShell to pwsh object 39 | this.shell = newShell 40 | return done('Created shell.') 41 | } 42 | 43 | // When restarting powershell process, loads New-PSSessionWithCredentials to new PS session 44 | this.loadCredFunction = function (done) { 45 | this.shell.addCommand(NewPSSessionWithCredentials) 46 | return done('Loaded New-PSSessionWithCredentials to PowerShell terminal') 47 | } 48 | 49 | // When restarting powershell process, loads command to create Credential object and PSSession 50 | this.loadCredString = function (done) { 51 | this.shell.addCommand(_credentialString) 52 | return done('Loaded Credentials string to PowerShell terminal') 53 | } 54 | } 55 | 56 | // Register CustomShell as prototype and create new PowerShell proccess 57 | // This allows for easy calling via this.$pwsh anywhere in Vue App 58 | export default async ({ Vue }) => { 59 | let pwsh = new CustomShell() 60 | pwsh.createShell(() => { 61 | console.debug('Created Shell') 62 | }) 63 | Vue.prototype.$pwsh = pwsh 64 | } 65 | -------------------------------------------------------------------------------- /src/boot/titlebar-color.js: -------------------------------------------------------------------------------- 1 | import { remote } from 'electron' 2 | import { colors } from 'quasar' 3 | const { setBrand } = colors 4 | 5 | export default async () => { 6 | // function to read accent color from system preferences - we need to strip alpha 7 | function setTitleBarColor () { 8 | let windowColor = remote.systemPreferences.getAccentColor() 9 | const hex = windowColor.substr(0, 6) 10 | setBrand('window-color', `#${hex}`) 11 | } 12 | // set titlebar color on launch 13 | setTitleBarColor() 14 | 15 | // register event in case user changes color theme while app is launched 16 | remote.systemPreferences.on('accent-color-changed', function () { 17 | setTitleBarColor() 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /src/boot/utils.js: -------------------------------------------------------------------------------- 1 | // Definitions updater 2 | // Details regarding script definitions updating can be found on 3 | import axios from 'axios' 4 | import fs from 'fs' 5 | import regedit from 'regedit' 6 | regedit.setExternalVBSLocation('resources/regedit/vbs') 7 | import EventEmitter from 'events' 8 | 9 | const definitionsEmitter = new EventEmitter() 10 | 11 | const utils = { 12 | on: function (event, handler) { 13 | // Allow registering of custom event listeners with custom handlers mimicking electron-updater 14 | definitionsEmitter.on(event, handler) 15 | }, 16 | emit: function (event, args) { 17 | // Allow registering of custom event listeners with custom handlers mimicking electron-updater 18 | definitionsEmitter.emit(event, args) 19 | }, 20 | getDate: function () { 21 | let d = new Date(), 22 | month = '' + (d.getMonth() + 1), 23 | day = '' + d.getDate(), 24 | year = d.getFullYear() 25 | 26 | if (month.length < 2) { month = '0' + month } 27 | if (day.length < 2) { day = '0' + day } 28 | 29 | return [year, month, day].join('-') 30 | }, 31 | getRegUrl (done) { 32 | // Attempt to retrieve registry value containing script definitions url 33 | regedit.list('HKLM\\SOFTWARE\\LazyAdmin', function (err, result) { 34 | if (err) { 35 | return done(Error('Scripts definition update failed. Could not locate LazyAdmin registry hive.')) 36 | } 37 | try { 38 | let defUrl = result['HKLM\\SOFTWARE\\LazyAdmin'].values['MasterDefinitionUrl'].value 39 | if (defUrl) { 40 | return done(null, defUrl) 41 | } else { 42 | return done(Error('Scripts definition update failed. MasterDefinitionUrl registry key has no value.')) 43 | } 44 | } catch { 45 | return done(Error('Scripts definition update failed. Could not read MasterDefinitionUrl registry key value.')) 46 | } 47 | }) 48 | }, 49 | getRegLanguage (done) { 50 | // Attempt to retrieve registry value containing custom language url 51 | regedit.list('HKLM\\SOFTWARE\\LazyAdmin', function (err, result) { 52 | if (err) { 53 | return done(Error('Custom language fetch failed. Could not locate LazyAdmin registry hive.')) 54 | } 55 | try { 56 | let langUrl = result['HKLM\\SOFTWARE\\LazyAdmin'].values['CustomLanguageUrl'].value 57 | if (langUrl) { 58 | return done(null, langUrl) 59 | } else { 60 | return done(Error('Custom language fetch failed. CustomLanguageUrl registry key has no value.')) 61 | } 62 | } catch { 63 | return done(Error('Custom language update failed. Could not read CustomLanguageUrl registry key value.')) 64 | } 65 | }) 66 | }, 67 | downloadUrl (downloadUrl, done) { 68 | if (fs.existsSync(downloadUrl)) { 69 | fs.readFile(downloadUrl, { encoding: 'utf-8' }, function (e, data) { 70 | if (e) { 71 | return done(e) 72 | } else { 73 | try { 74 | let json = { 75 | data: JSON.parse(data) 76 | } 77 | return done(null, json) 78 | } catch { 79 | return done(Error('Could not parse JSON.')) 80 | } 81 | } 82 | }) 83 | } else { 84 | // Resolve URL and attempt to obtain definitions file 85 | axios.get(`${downloadUrl}?date=${new Date().getTime()}`).then(result => { 86 | return done(null, result) 87 | }).catch(e => { 88 | e.url = downloadUrl 89 | return done(e) 90 | }) 91 | } 92 | } 93 | } 94 | 95 | // Register Definitions Updater as prototype, to access it anywhere 96 | // This allows for easy calling via this.$utils anywhere in Vue App 97 | export default async ({ Vue }) => { 98 | Vue.prototype.$utils = utils 99 | } 100 | -------------------------------------------------------------------------------- /src/components/ExecuteDialog.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 76 | -------------------------------------------------------------------------------- /src/components/HelpDialog.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 74 | -------------------------------------------------------------------------------- /src/components/HistoryDrawer.vue: -------------------------------------------------------------------------------- 1 | 84 | 85 | 138 | -------------------------------------------------------------------------------- /src/components/LanguagePicker.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 91 | -------------------------------------------------------------------------------- /src/components/ProgressDialog.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 50 | -------------------------------------------------------------------------------- /src/components/ResultsDialog.vue: -------------------------------------------------------------------------------- 1 | 80 | 81 | 194 | -------------------------------------------------------------------------------- /src/components/ScriptsTable.vue: -------------------------------------------------------------------------------- 1 | 75 | 76 | 122 | -------------------------------------------------------------------------------- /src/components/SettingsItems.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 30 | -------------------------------------------------------------------------------- /src/components/VersionList.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 53 | -------------------------------------------------------------------------------- /src/components/WindowTitlebar.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /src/components/partials/FloatingActions.vue: -------------------------------------------------------------------------------- 1 | 60 | 61 | 71 | -------------------------------------------------------------------------------- /src/components/partials/UpdateStatusIcon.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 37 | -------------------------------------------------------------------------------- /src/css/app.sass: -------------------------------------------------------------------------------- 1 | // app global css in Sass form 2 | 3 | // create default color which should copy system settings 4 | \:root 5 | --q-color-window-color $window-color 6 | 7 | // class for window titlebar 8 | .window-color 9 | background-color: $window-color !important 10 | background-color: var(--q-color-window-color) !important 11 | 12 | @media (max-width: 220px) 13 | .hide-title 14 | display: none !important 15 | 16 | .body--dark .q-toolbar 17 | background: rgba(255, 255, 255, 0.15) 18 | 19 | .q-toolbar 20 | background: rgba(0, 0, 0, 0.2) 21 | 22 | input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button 23 | -webkit-appearance: none 24 | 25 | ::-webkit-scrollbar 26 | display: none 27 | -------------------------------------------------------------------------------- /src/css/quasar.variables.sass: -------------------------------------------------------------------------------- 1 | // Quasar Sass (& SCSS) Variables 2 | // -------------------------------------------------- 3 | // To customize the look and feel of this app, you can override 4 | // the Sass/SCSS variables found in Quasar's source Sass/SCSS files. 5 | 6 | // Check documentation for full list of Quasar variables 7 | 8 | // Your own variables (that are declared here) and Quasar's own 9 | // ones will be available out of the box in your .vue/.scss/.sass files 10 | 11 | // It's highly recommended to change the default colors 12 | // to match your app's branding. 13 | // Tip: Use the "Theme Builder" on Quasar's documentation website. 14 | 15 | $primary : #ff0000 16 | $secondary : #26A69A 17 | $accent : #9C27B0 18 | 19 | $dark : #1D1D1D 20 | 21 | $positive : #21BA45 22 | $negative : #C10015 23 | $info : #31CCEC 24 | $warning : #F2C037 25 | $window-color : #1D1D1D -------------------------------------------------------------------------------- /src/i18n/cs-cz/index.js: -------------------------------------------------------------------------------- 1 | // Czech language 2 | 3 | export default { 4 | languageName: 'Česky', // Used in: LoginPage.vue 5 | username: 'Uživatel', // Used in: LoginPage.vue 6 | usernameRequired: 'Zadejte přihlašovací jméno!', // Used in: LoginPage.vue 7 | password: 'Heslo', // Used in: LoginPage.vue 8 | passwordRequired: 'Zadejte přihlašovací heslo!', // Used in: LoginPage.vue 9 | login: 'Přihlásit', // Used in: LoginPage.vue, ScriptsPage.vue 10 | loginSkip: 'Přeskočit', // Used in: LoginPage.vue 11 | language: 'Jazyk', // Used in: LoginPage.vue 12 | changeUser: 'Jiný uživatel', // Used in: LoginPage.vue 13 | install: 'Instalovat', // Used in: LoginPage.vue, FullLayout.vue 14 | dismiss: 'Skrýt', // Used in: LoginPage.vue, FullLayout.vue 15 | moduleCredMgrMissing: 'Nelze nalézt PowerShell modul "CredentialManager", nelze načíst uložené heslo.', // Used in: LoginPage.vue 16 | pwshMissing: 'Nelze nalézt PowerShell Core. Používá se záložní Windows PowerShell.', // Used in: LoginPage.vue 17 | wrongUsernameOrPassword: 'Špatné přihlašovací jméno nebo heslo.', // Used in: LoginPage.vue 18 | foundsavedCredential: 'Nalezeny přihlašovací údaje pro uživatele {usr}.', // Used in: LoginPage.vue 19 | failedToLogin: 'Přihlášení se nezdařilo.', // Used in: LoginPage.vue, ScriptsPage.vue 20 | search: 'Vyhledat', // Used in: FullLayout.vue 21 | history: 'Historie', // Used in: FullLayout.vue 22 | visibleGroups: 'Zobrazované příkazy', // Used in: FullLayout.vue 23 | all: 'Vše', // Used in: FullLayout.vue 24 | allDesc: 'Všechny dostupné příkazy', // Used in: FullLayout.vue 25 | settings: 'Nastavení', // Used in: FullLayout.vue, SettingsPage.vue 26 | of: 'z', // Used in: FullLayout.vue 27 | about: 'O aplikaci', // Used in: FullLayout.vue, AboutPage.vue 28 | requiredField: 'Tento parametr je povinný!', // Used in: ScriptsPage.vue 29 | requiredParam: 'Povinný', // Used in: ScriptsPage.vue 30 | optionalParam: 'Nepovinný', // Used in: ScriptsPage.vue 31 | confirm: 'Potvrzení', // Used in: ScriptsPage.vue 32 | confirmMsg: 'Příkaz vyžaduje potvrzení. Skutečně chcete pokračovat?', // Used in: ScriptsPage.vue 33 | launch: 'Spustit', // Used in: ScriptsPage.vue 34 | results: 'Výsledek', // Used in: ScriptsPage.vue 35 | repeat: 'Opakovat', // Used in: ScriptsPage.vue 36 | cancel: 'Zrušit', // Used in: ScriptsPage.vue 37 | reset: 'Resetovat', // Used in: ScriptsPage.vue 38 | resultsTitle: '{commandName}: Výsledek', // Used in: ScriptsPage.vue 39 | powershellNoOutput: 'PowerShell nevrátil žádnou hodnotu.', // Used in: ScriptsPage.vue 40 | exportCsv: 'Exportovat do CSV', // Used in: ScriptsPage.vue 41 | copyClipboard: 'Zkopírovat do schránky', // Used in: ScriptsPage.vue 42 | close: 'Zavřít', // Used in: ScriptsPage.vue 43 | copied: 'Zkopírováno do schránky', // Used in: ScriptsPage.vue 44 | exported: 'Exportováno', // Used in: ScriptsPage.vue 45 | scriptRunning: 'Příkaz se vykonává', // Used in: ScriptsPage.vue 46 | pressToCancel: 'Stiskněte Escape pro zrušení', // Used in: ScriptsPage.vue 47 | cancelling: 'Rušení', // Used in: ScriptsPage.vue 48 | pleaseWait: 'Prosím vyčkejte...', // Used in: ScriptsPage.vue 49 | noScriptsFound: 'Žádné příkazy nenalezeny. Zkuste aktualizovat definice.', // Used in: ScriptsPage.vue 50 | workflowContinue: 'Další krok', // Used in: ScriptsPage.vue 51 | workflowParameters: 'Parametry z předchozího kroku', // Used in: ScriptsPage.vue 52 | workflowReadOnly: 'Tyto parametry jsou pouze pro čtení', // Used in: ScriptsPage.vue 53 | commandToBeExecuted: 'Kompletní příkaz', // Used in: ScriptsPage.vue 54 | help: 'Nápověda', // Used in: ScriptsPage.vue 55 | loadingHelp: 'Načítání nápovědy, prosím vyčkejte...', // Used in: ScriptsPage.vue 56 | externalHelpNotFound: 'Nápovědu se nepodařilo načíst.\r\nURL nápovědy: {helpUrl}', // Used in: ScriptsPage.vue 57 | noExternalHelp: 'Pro tento příkaz neexistuje externí nápověda.\r\nMístní nápověda: {description}', // Used in: ScriptsPage.vue 58 | noDescription: 'Není vyplněno.', // Used in: ScriptsPage.vue 59 | csvExportError: 'Nepodařilo se uložit výsledky do CSV souboru.', // Used in: ScriptsPage.vue 60 | yes: 'Ano', // Used in: ScriptsPage.vue 61 | no: 'Ne', // Used in: ScriptsPage.vue 62 | type: 'Typ', // Used in: ScriptsPage.vue 63 | none: 'Není', // Used in: ScriptsPage.vue 64 | format: 'Formát', // Used in: ScriptsPage.vue 65 | loginRequired: 'Přihlásit se k: {name}', // Used in: ScriptsPage.vue 66 | loginDone: 'Znovu se přihlásit k: {name}', // Used in: ScriptsPage.vue 67 | loginSuccesful: 'Příkaz přihlášení úspěšně dokončen.', // Used in: ScriptsPage.vue 68 | updateFound: 'Stahování nejnovější verze aplikace Lazy Admin.', // Used in: FullLayout.vue 69 | updateError: 'Nepodařilo se stáhnout aktualizaci aplikace Lazy Admin.', // Used in: FullLayout.vue 70 | definitionsError: 'Chyba aktualizace definic.', // Used in: AboutPage.vue 71 | downloadCompleted: 'Stahování dokončeno, zavřete aplikaci ke spuštění aktualizace.', // Used in: FullLayout.vue 72 | alwaysConfirm: 'Vždy požadovat potvrzení před spuštěním příkazu.', // Used in: SettingsPage.vue 73 | denseInput: 'Zobrazovat vstupní parametry v těsném rozložení.', // Used in: SettingsPage.vue 74 | denseTable: 'Zobrazovat tabulky v těsném rozložení.', // Used in: SettingsPage.vue 75 | displayProgress: 'Vždy zobrazovat průběh skriptu.', // Used in: SettingsPage.vue 76 | historyLength: 'Počet příkazů v historii', // Used in: SettingsPage.vue 77 | logCommand: 'Logovat spouštěné příkazy', // Used in: SettingsPage.vue 78 | logResult: 'Logovat výsledky příkazů', // Used in: SettingsPage.vue 79 | masterDefinition: 'Hlavní definice', // Used in: AboutPage.vue 80 | update: 'Aktualizovat', // Used in: AboutPage.vue 81 | restartRequired: 'Vyžadován restart.', // Used in: AboutPage.vue 82 | restart: 'Restartovat', // Used in: AboutPage.vue 83 | errorPage: 'Jejda, sem jste se nikdy neměli dostat.', // Used in: Error404.vue 84 | goBack: 'Jít zpět' // Used in: Error404.vue 85 | } 86 | -------------------------------------------------------------------------------- /src/i18n/custom-language-partial.json: -------------------------------------------------------------------------------- 1 | { 2 | "de-de": { 3 | "languageName": "Deutsch", 4 | "username": "Nutzername", 5 | "usernameRequired": "Login Benutzername ist erforderlich!", 6 | "password": "Passwort", 7 | "passwordRequired": "Login Passwort ist erforderlich!", 8 | "login": "Login", 9 | "loginSkip": "Überspringen", 10 | "language": "Sprache" 11 | } 12 | } -------------------------------------------------------------------------------- /src/i18n/custom-language.json: -------------------------------------------------------------------------------- 1 | { 2 | "en-us": { 3 | "languageName": "English", 4 | "username": "Username", 5 | "usernameRequired": "Login username is required!", 6 | "password": "Password", 7 | "passwordRequired": "Login password is required!", 8 | "login": "Login", 9 | "loginSkip": "Skip", 10 | "language": "Language", 11 | "changeUser": "Change User", 12 | "install": "Install", 13 | "dismiss": "Dismiss", 14 | "moduleCredMgrMissing": "Couldn't find PowerShell module \"CredentialManager\", cannot load saved password.", 15 | "pwshMissing": "Couldn't find PowerShell Core, default. Using fallback Windows PowerShell.", 16 | "wrongUsernameOrPassword": "Wrong username or password.", 17 | "foundsavedCredential": "Found stored credentials for user {usr}.", 18 | "failedToLogin": "Login failed.", 19 | "search": "Search", 20 | "history": "History", 21 | "visibleGroups": "Shown commands", 22 | "all": "All", 23 | "allDesc": "All available commands", 24 | "settings": "Settings", 25 | "of": "of", 26 | "about": "About", 27 | "requiredField": "This parameter is required!", 28 | "requiredParam": "Required", 29 | "optionalParam": "Optional", 30 | "confirm": "Confirm", 31 | "confirmMsg": "Command requires confirmation. Do you want to continue?", 32 | "launch": "Launch", 33 | "results": "Results", 34 | "repeat": "Repeat", 35 | "cancel": "Cancel", 36 | "reset": "Reset", 37 | "resultsTitle": "{commandName}: Results", 38 | "powershellNoOutput": "PowerShell did not return any value.", 39 | "exportCsv": "Export to CSV", 40 | "copyClipboard": "Copy to clipboard", 41 | "close": "Close", 42 | "copied": "Copied to clipboard", 43 | "exported": "Exported", 44 | "scriptRunning": "Command in progress", 45 | "pressToCancel": "Press Escape to cancel", 46 | "cancelling": "Cancelling", 47 | "pleaseWait": "Please wait...", 48 | "noScriptsFound": "No commands found. Try updating definitions.", 49 | "workflowContinue": "Next step", 50 | "workflowParameters": "Parameters from previous step", 51 | "workflowReadOnly": "Those parameters are read only", 52 | "commandToBeExecuted": "Complete command", 53 | "help": "Help", 54 | "loadingHelp": "Loading help, please wait...", 55 | "externalHelpNotFound": "Help could not be loaded.\r\nHelp URL: {helpUrl}", 56 | "noExternalHelp": "There is no external help for this command.\r\nLocal help: {description}", 57 | "noDescription": "Not available.", 58 | "csvExportError": "Could not export results to CSV file.", 59 | "yes": "Yes", 60 | "no": "No", 61 | "type": "Type", 62 | "none": "None", 63 | "format": "Format", 64 | "loginRequired": "Login to: {name}", 65 | "loginDone": "Login again to: {name}", 66 | "loginSuccesful": "Login command executed successfully.", 67 | "updateFound": "Downloading the latest version of Lazy Admin.", 68 | "updateError": "Could not download update for Lazy Admin application.", 69 | "definitionsError": "Definitions update error.", 70 | "downloadCompleted": "Download completed, close the application to start the update.", 71 | "alwaysConfirm": "Always require confirmation before script execution.", 72 | "denseInput": "Display input parameters in dense layout.", 73 | "denseTable": "Display tables in dense layout.", 74 | "displayProgress": "Always display script progress.", 75 | "historyLength": "Number of commands in history", 76 | "logCommand": "Log executed commands", 77 | "logResult": "Log command results", 78 | "autoClipboard": "Automatically store command results to clipboard.", 79 | "masterDefinition": "Master definition", 80 | "update": "Update", 81 | "restartRequired": "Restart required.", 82 | "restart": "Restart", 83 | "errorPage": "Oops, never should have come here.", 84 | "goBack": "Go back" 85 | } 86 | } -------------------------------------------------------------------------------- /src/i18n/en-us/index.js: -------------------------------------------------------------------------------- 1 | // English language 2 | 3 | export default { 4 | languageName: 'English', // Used in: LoginPage.vue 5 | username: 'Username', // Used in: LoginPage.vue 6 | usernameRequired: 'Login username is required!', // Used in: LoginPage.vue 7 | password: 'Password', // Used in: LoginPage.vue 8 | passwordRequired: 'Login password is required!', // Used in: LoginPage.vue 9 | login: 'Login', // Used in: LoginPage.vue, ScriptsPage.vue 10 | loginSkip: 'Skip', // Used in: LoginPage.vue 11 | language: 'Language', // Used in: LoginPage.vue 12 | changeUser: 'Change User', // Used in: LoginPage.vue 13 | install: 'Install', // Used in: LoginPage.vue, FullLayout.vue 14 | dismiss: 'Dismiss', // Used in: LoginPage.vue, FullLayout.vue 15 | moduleCredMgrMissing: 'Couldn\'t find PowerShell module "CredentialManager", cannot load saved password.', // Used in: LoginPage.vue 16 | pwshMissing: 'Couldn\'t find PowerShell Core, default. Using fallback Windows PowerShell.', // Used in: LoginPage.vue 17 | wrongUsernameOrPassword: 'Wrong username or password.', // Used in: LoginPage.vue 18 | foundsavedCredential: 'Found stored credentials for user {usr}.', // Used in: LoginPage.vue 19 | failedToLogin: 'Login failed.', // Used in: LoginPage.vue, ScriptsPage.vue 20 | search: 'Search', // Used in: FullLayout.vue 21 | history: 'History', // Used in: FullLayout.vue 22 | visibleGroups: 'Shown commands', // Used in: FullLayout.vue 23 | all: 'All', // Used in: FullLayout.vue 24 | allDesc: 'All available commands', // Used in: FullLayout.vue 25 | settings: 'Settings', // Used in: FullLayout.vue, SettingsPage.vue 26 | of: 'of', // Used in: FullLayout.vue 27 | about: 'About', // Used in: FullLayout.vue, AboutPage.vue 28 | requiredField: 'This parameter is required!', // Used in: ScriptsPage.vue 29 | requiredParam: 'Required', // Used in: ScriptsPage.vue 30 | optionalParam: 'Optional', // Used in: ScriptsPage.vue 31 | confirm: 'Confirm', // Used in: ScriptsPage.vue 32 | confirmMsg: 'Command requires confirmation. Do you want to continue?', // Used in: ScriptsPage.vue 33 | launch: 'Launch', // Used in: ScriptsPage.vue 34 | results: 'Results', // Used in: ScriptsPage.vue 35 | repeat: 'Repeat', // Used in: ScriptsPage.vue 36 | cancel: 'Cancel', // Used in: ScriptsPage.vue 37 | reset: 'Reset', // Used in: ScriptsPage.vue 38 | resultsTitle: '{commandName}: Results', // Used in: ScriptsPage.vue 39 | powershellNoOutput: 'PowerShell did not return any value.', // Used in: ScriptsPage.vue 40 | exportCsv: 'Export to CSV', // Used in: ScriptsPage.vue 41 | copyClipboard: 'Copy to clipboard', // Used in: ScriptsPage.vue 42 | close: 'Close', // Used in: ScriptsPage.vue 43 | copied: 'Copied to clipboard', // Used in: ScriptsPage.vue 44 | exported: 'Exported', // Used in: ScriptsPage.vue 45 | scriptRunning: 'Command in progress', // Used in: ScriptsPage.vue 46 | pressToCancel: 'Press Escape to cancel', // Used in: ScriptsPage.vue 47 | cancelling: 'Cancelling', // Used in: ScriptsPage.vue 48 | pleaseWait: 'Please wait...', // Used in: ScriptsPage.vue 49 | noScriptsFound: 'No commands found. Try updating definitions.', // Used in: ScriptsPage.vue 50 | workflowContinue: 'Next step', // Used in: ScriptsPage.vue 51 | workflowParameters: 'Parameters from previous step', // Used in: ScriptsPage.vue 52 | workflowReadOnly: 'Those parameters are read only', // Used in: ScriptsPage.vue 53 | commandToBeExecuted: 'Complete command', // Used in: ScriptsPage.vue 54 | help: 'Help', // Used in: ScriptsPage.vue 55 | loadingHelp: 'Loading help, please wait...', // Used in: ScriptsPage.vue 56 | externalHelpNotFound: 'Help could not be loaded.\r\nHelp URL: {helpUrl}', // Used in: ScriptsPage.vue 57 | noExternalHelp: 'There is no external help for this command.\r\nLocal help: {description}', // Used in: ScriptsPage.vue 58 | noDescription: 'Not available.', // Used in: ScriptsPage.vue 59 | csvExportError: 'Could not export results to CSV file.', // Used in: ScriptsPage.vue 60 | yes: 'Yes', // Used in: ScriptsPage.vue 61 | no: 'No', // Used in: ScriptsPage.vue 62 | type: 'Type', // Used in: ScriptsPage.vue 63 | none: 'None', // Used in: ScriptsPage.vue 64 | format: 'Format', // Used in: ScriptsPage.vue 65 | loginRequired: 'Login to: {name}', // Used in: ScriptsPage.vue 66 | loginDone: 'Login again to: {name}', // Used in: ScriptsPage.vue 67 | loginSuccesful: 'Login command executed successfully.', // Used in: ScriptsPage.vue 68 | updateFound: 'Downloading the latest version of Lazy Admin.', // Used in: FullLayout.vue 69 | updateError: 'Could not download update for Lazy Admin application.', // Used in: FullLayout.vue 70 | definitionsError: 'Definitions update error.', // Used in: AboutPage.vue 71 | downloadCompleted: 'Download completed, close the application to start the update.', // Used in: FullLayout.vue 72 | alwaysConfirm: 'Always require confirmation before script execution.', // Used in: SettingsPage.vue 73 | denseInput: 'Display input parameters in dense layout.', // Used in: SettingsPage.vue 74 | denseTable: 'Display tables in dense layout.', // Used in: SettingsPage.vue 75 | displayProgress: 'Always display script progress.', // Used in: SettingsPage.vue 76 | historyLength: 'Number of commands in history', // Used in: SettingsPage.vue 77 | logCommand: 'Log executed commands', // Used in: SettingsPage.vue 78 | logResult: 'Log command results', // Used in: SettingsPage.vue 79 | autoClipboard: 'Automatically store command results to clipboard.', // Used in: SettingsPage.vue 80 | masterDefinition: 'Master definition', // Used in: AboutPage.vue 81 | update: 'Update', // Used in: AboutPage.vue 82 | restartRequired: 'Restart required.', // Used in: AboutPage.vue 83 | restart: 'Restart', // Used in: AboutPage.vue 84 | errorPage: 'Oops, never should have come here.', // Used in: Error404.vue 85 | goBack: 'Go back' // Used in: Error404.vue 86 | } 87 | -------------------------------------------------------------------------------- /src/i18n/index.js: -------------------------------------------------------------------------------- 1 | import enUS from './en-us' 2 | import csCZ from './cs-cz' 3 | 4 | let languages = { 5 | 'en-us': enUS, 6 | 'cs-cz': csCZ 7 | } 8 | 9 | export default languages 10 | -------------------------------------------------------------------------------- /src/index.template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= htmlWebpackPlugin.options.productName %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /src/layouts/LoginLayout.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 57 | -------------------------------------------------------------------------------- /src/pages/AboutPage.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 188 | -------------------------------------------------------------------------------- /src/pages/Error404.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /src/pages/Index.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 40 | -------------------------------------------------------------------------------- /src/pages/SettingsPage.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 125 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | 4 | import routes from './routes' 5 | 6 | Vue.use(VueRouter) 7 | 8 | /* 9 | * If not building with SSR mode, you can 10 | * directly export the Router instantiation; 11 | * 12 | * The function below can be async too; either use 13 | * async/await or return a Promise which resolves 14 | * with the Router instance. 15 | */ 16 | 17 | export default function (/* { store, ssrContext } */) { 18 | const Router = new VueRouter({ 19 | scrollBehavior: () => ({ x: 0, y: 0 }), 20 | routes, 21 | 22 | // Leave these as they are and change in quasar.conf.js instead! 23 | // quasar.conf.js -> build -> vueRouterMode 24 | // quasar.conf.js -> build -> publicPath 25 | mode: process.env.VUE_ROUTER_MODE, 26 | base: process.env.VUE_ROUTER_BASE 27 | }) 28 | 29 | return Router 30 | } 31 | -------------------------------------------------------------------------------- /src/router/routes.js: -------------------------------------------------------------------------------- 1 | 2 | const routes = [ 3 | { 4 | path: '/', 5 | component: () => import('layouts/LoginLayout.vue'), 6 | children: [ 7 | { path: '', component: () => import('pages/LoginPage.vue') } 8 | ] 9 | }, 10 | { 11 | path: '/app', 12 | component: () => import('layouts/FullLayout.vue'), 13 | children: [ 14 | { path: '/scripts', component: () => import('pages/ScriptsPage.vue') }, 15 | { path: '/settings', component: () => import('pages/SettingsPage.vue') }, 16 | { path: '/about', component: () => import('pages/AboutPage.vue') } 17 | ] 18 | } 19 | ] 20 | 21 | // Always leave this as last one 22 | if (process.env.MODE !== 'ssr') { 23 | routes.push({ 24 | path: '*', 25 | component: () => import('layouts/FullLayout.vue'), 26 | children: [ 27 | { path: '*', component: () => import('pages/Error404.vue') } 28 | ] 29 | }) 30 | } 31 | 32 | export default routes 33 | -------------------------------------------------------------------------------- /src/statics/pwsh/scripts/Get-SavedCredentials.js: -------------------------------------------------------------------------------- 1 | let scriptFile = ` 2 | <# 3 | .SYNOPSIS 4 | This script is called upon Lazy Admin launch in Login Page. 5 | 6 | .DESCRIPTION 7 | Attempts to load CredentialManager module and load saved password. 8 | 9 | .LINK 10 | https://github.com/houby-studio/lazy-admin/wiki/Get-SavedCredentials 11 | 12 | .OUTPUTS 13 | System.Object. Returns PSCustomObject with Output, [Int]ReturnCode and [Boolean]Error. 14 | Return Codes: 15 | 10011001: Saved credentials found and returned in Output Object. 16 | 10011002: CredentialManager Module loaded but no saved credentials were found. 17 | 10013001: CredentialManager Module couldn't be imported. It is most likely not installed. 18 | #> 19 | function Get-SavedCredentials { 20 | [CmdletBinding()] 21 | param () 22 | 23 | # Attempt to import CredentialManager module 24 | try { 25 | Import-Module -Name "CredentialManager" -ErrorAction Stop -WarningAction SilentlyContinue 26 | } 27 | catch { 28 | return [PSCustomObject]@{ 29 | error = $true; 30 | returnCode = 10013001; 31 | output = "CredentialManager Module couldn't be imported. It is most likely not installed." 32 | } | ConvertTo-Json -Compress 33 | } 34 | 35 | # Attempt to retrieve saved credentials 36 | $CredentialObject = Get-StoredCredential -Target 'Lazy Admin' -Type Generic -ErrorAction SilentlyContinue -WarningAction SilentlyContinue 37 | 38 | # Return either retrieved credentials or information about being unsuccessful 39 | if ($CredentialObject) { 40 | return [PSCustomObject]@{ 41 | error = $false; 42 | returnCode = 10011001; 43 | output = $CredentialObject 44 | } | ConvertTo-Json -Compress 45 | } 46 | else { 47 | return [PSCustomObject]@{ 48 | error = $false; 49 | returnCode = 10011002; 50 | output = "CredentialManager Module loaded but no saved credentials were found." 51 | } | ConvertTo-Json -Compress 52 | } 53 | } 54 | 55 | # Run function 56 | Get-SavedCredentials 57 | ` 58 | 59 | export default scriptFile 60 | -------------------------------------------------------------------------------- /src/statics/pwsh/scripts/New-PSSessionWithCredentials.js: -------------------------------------------------------------------------------- 1 | let scriptFile = ` 2 | <# 3 | .SYNOPSIS 4 | This script is called when Login button is clicked. 5 | 6 | .DESCRIPTION 7 | Attempts to create PSSession with provided credentials. 8 | 9 | .LINK 10 | https://github.com/houby-studio/lazy-admin/wiki/New-PSSessionWithCredentials 11 | 12 | .PARAMETER Credential 13 | Switch stating that $CredentialObject exists in current session. 14 | 15 | .PARAMETER Username 16 | Pass Username as string when no saved credentials exist. 17 | 18 | .PARAMETER Password 19 | Pass Password as string when no saved credentials exist. 20 | 21 | .OUTPUTS 22 | System.Object. Returns PSCustomObject with Output, [Int]ReturnCode and [Boolean]Error. 23 | Return Codes: 24 | 10021001: New Powershell session created succesfully. 25 | 10023001: Supplied credential object or username and password failed o other error occured. 26 | #> 27 | function New-PSSessionWithCredentials { 28 | [CmdletBinding()] 29 | param ( 30 | [Parameter(ParameterSetName = 'CredentialObject')] 31 | [switch]$Credential, 32 | [Parameter(ParameterSetName = 'UsernamePassword')] 33 | [string]$Username, 34 | [Parameter(ParameterSetName = 'UsernamePassword')] 35 | [string]$Password 36 | ) 37 | 38 | Import-Module -Name "CredentialManager" -UseWindowsPowerShell -ErrorAction SilentlyContinue -WarningAction SilentlyContinue 39 | Import-Module -Name "CredentialManager" -ErrorAction SilentlyContinue -WarningAction SilentlyContinue 40 | 41 | # If credential object should be used, attempt to retrieve it. 42 | if ($Credential) { 43 | $Global:CredentialObject = Get-StoredCredential -Target 'Lazy Admin' -Type Generic -ErrorAction SilentlyContinue 44 | } 45 | 46 | # If CredentialObject exists, create session with it 47 | try { 48 | if ((!$Global:CredentialObject) -or ($Username -and $Password)) { 49 | $NewPassword = ConvertTo-SecureString $Password -AsPlainText -Force 50 | $Global:CredentialObject = New-Object System.Management.Automation.PSCredential ($Username, $NewPassword) 51 | } 52 | # Set encoding https://github.com/PowerShell/PowerShell/issues/4681 53 | $OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = [System.Text.UTF8Encoding]::new() 54 | $PSDefaultParameterValues['*:Encoding'] = 'utf8' 55 | # Try to create new PSSession with Credssp, which allows for credential delegation to within session, otherwise, fallback to standard authentication method 56 | # This session is created with login credentials and runs Windows PowerShell, even when main shell is pwsh, which allows users to easily run commands in both shell types. 57 | try { 58 | $Global:LazyAdminPSSession = New-PSSession -Credential $Global:CredentialObject -Name 'LazyAdminSession' -Authentication Credssp -ErrorAction Stop 59 | } catch { 60 | $Global:LazyAdminPSSession = New-PSSession -Credential $Global:CredentialObject -Name 'LazyAdminSession' -ErrorAction Stop 61 | } 62 | return [PSCustomObject]@{ 63 | error = $false; 64 | returnCode = 10021001; 65 | output = "New Powershell session created succesfully." 66 | } | ConvertTo-Json -Compress 67 | } 68 | catch { 69 | return [PSCustomObject]@{ 70 | error = $true; 71 | returnCode = 10023001; 72 | output = "Supplied credential object or username and password failed or other error occured. Original Error: $_" 73 | } | ConvertTo-Json -Compress 74 | } 75 | } 76 | ` 77 | 78 | export default scriptFile 79 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import VuexPersistence from 'vuex-persist' 4 | 5 | import lazystore from './lazystore' 6 | 7 | Vue.use(Vuex) 8 | 9 | /* 10 | * If not building with SSR mode, you can 11 | * directly export the Store instantiation; 12 | * 13 | * The function below can be async too; either use 14 | * async/await or return a Promise which resolves 15 | * with the Store instance. 16 | */ 17 | 18 | const vuexLocal = new VuexPersistence({ 19 | storage: window.localStorage 20 | }) 21 | 22 | const Store = new Vuex.Store({ 23 | modules: { 24 | lazystore 25 | }, 26 | plugins: [vuexLocal.plugin], 27 | // enable strict mode (adds overhead!) 28 | // for dev mode only 29 | strict: process.env.DEV 30 | }) 31 | 32 | if (module.hot) { 33 | // accept actions and mutations as hot modules 34 | module.hot.accept(['./lazystore'], () => { 35 | // require the updated modules 36 | // have to add .default here due to babel 6 module output 37 | const lazystore = require('./lazystore').default 38 | // swap in the new modules and mutations 39 | Store.hotUpdate({ 40 | modules: { 41 | lazystore 42 | } 43 | }) 44 | }) 45 | } 46 | 47 | export default Store 48 | -------------------------------------------------------------------------------- /src/store/lazystore/actions.js: -------------------------------------------------------------------------------- 1 | // Commit mutation to set applications language - Accessed in LoginPage.vue 2 | export async function setLanguage ({ commit }, language) { 3 | console.log(`Changing display language to: ${language}`) 4 | commit('SET_LANGUAGE', language) 5 | } 6 | 7 | export async function setCustomLanguage ({ commit }, language) { 8 | commit('SET_CUSTOMLANGUAGE', language) 9 | } 10 | 11 | // Commit mutation to update search field - Accessed in FullLayout.vue 12 | export async function setSearchScripts ({ commit }, searchText) { 13 | commit('SET_SEARCHSCRIPTS', searchText) 14 | } 15 | 16 | // Commit mutation to update search field - Accessed in FullLayout.vue 17 | export async function setSearchHistory ({ commit }, searchText) { 18 | commit('SET_SEARCHHISTORY', searchText) 19 | } 20 | 21 | // Commit mutation to set scripts filter - Accessed in FullLayout.vue 22 | export async function setScriptsFilter ({ commit }, filter) { 23 | console.log(`Setting scripts filter to: ${filter}`) 24 | commit('SET_SCRIPTSFILTER', filter) 25 | } 26 | 27 | // Commit mutation to set scripts filter - Accessed in FullLayout.vue 28 | export async function setCommandMaximized ({ commit }, maximized) { 29 | commit('SET_COMMANDMAXIMIZED', maximized) 30 | } 31 | 32 | // Commit mutation to set master definition - Accessed in FullLayout.vue 33 | export async function setMasterDefinition ({ commit }, definition) { 34 | console.log('Updating master definition with newer configuration:', definition) 35 | commit('SET_MASTERDEFINITION', definition) 36 | } 37 | 38 | // Commit mutation to clear master definition - Accessed in FullLayout.vue 39 | export async function clearMasterDefinition ({ commit }) { 40 | console.log('Clearing Master definition.') 41 | commit('REMOVE_MASTERDEFINITION') 42 | } 43 | 44 | // Commit mutation to set scripts definitions - Accessed in FullLayout.vue, About.vue 45 | export async function setDefinitions ({ commit }, definitions) { 46 | commit('SET_DEFINITIONS', definitions) 47 | } 48 | 49 | // Commit mutation to clear scripts definitions - Accessed in FullLayout.vue 50 | export async function clearDefinitions ({ commit }) { 51 | console.log('Clearing scripts definitions.') 52 | commit('REMOVE_DEFINITIONS') 53 | } 54 | 55 | // Commit mutation to set update in progress state - Accessed in FullLayout.vue 56 | export async function setUpdateDate ({ commit }, date) { 57 | commit('SET_UPDATEDATE', date) 58 | } 59 | 60 | // Commit mutation to set update in progress state - Accessed in FullLayout.vue 61 | export async function setUpdateInProgress ({ commit }, updateInProgress) { 62 | commit('SET_UPDATEINPROGRESS', updateInProgress) 63 | } 64 | 65 | // Commit mutation to set definitions update in progress state - Accessed in About.vue, FullLayout.vue 66 | export async function setDefinitionsUpdateInProgress ({ commit }, definitionsUpdateInProgress) { 67 | commit('SET_DEFINITIONSUPDATEINPROGRESS', definitionsUpdateInProgress) 68 | } 69 | 70 | // Commit mutation to set restart required state - Accessed in About.vue, FullLayout.vue 71 | export async function setRestartRequired ({ commit }, restartRequired) { 72 | commit('SET_RESTARTREQUIRED', restartRequired) 73 | } 74 | 75 | // Commit mutation to set update progress - Accessed in About.vue, FullLayout.vue 76 | export async function setUpdateProgress ({ commit }, updateProgress) { 77 | commit('SET_UPDATEPROGRESS', updateProgress) 78 | } 79 | 80 | // Commit mutation to set confirm preference - Accessed in SettingsPage.vue 81 | export async function setAlwaysConfirm ({ commit }, alwaysConfirm) { 82 | commit('SET_ALWAYSCONFIRM', alwaysConfirm) 83 | } 84 | 85 | // Commit mutation to set history length - Accessed in SettingsPage.vue 86 | export async function setHistoryLength ({ commit }, historyLength) { 87 | commit('SET_HISTORYLENGTH', historyLength) 88 | } 89 | 90 | // Commit mutation to set history dialog visibility - Accessed in FullLayout.vue 91 | export async function setHistoryVisible ({ commit }, historyVisible) { 92 | commit('SET_HISTORYVISIBLE', historyVisible) 93 | } 94 | 95 | // Commit mutation to set history - Accessed in ScriptsPage.vue 96 | export async function setHistory ({ commit, state }, history) { 97 | commit('SET_HISTORY', history) 98 | } 99 | 100 | // Commit mutation to set dialog input density - Accessed in SettingsPage.vue 101 | export async function setDenseInput ({ commit }, dense) { 102 | commit('SET_DENSEINPUT', dense) 103 | } 104 | 105 | // Commit mutation to set dialog input density - Accessed in SettingsPage.vue 106 | export async function setDenseTable ({ commit }, dense) { 107 | commit('SET_DENSETABLE', dense) 108 | } 109 | 110 | // Commit mutation to set whether login was skipped or not - Accessed in LoginPage.vue 111 | export async function setLoginSkipped ({ commit }, skipped) { 112 | commit('SET_LOGINSKIPPED', skipped) 113 | } 114 | 115 | // Commit mutation to set whether login credentials are saved or not - Accessed in LoginPage.vue 116 | export async function setCredentialsSaved ({ commit }, saved) { 117 | commit('SET_CREDENTIALSSAVED', saved) 118 | } 119 | 120 | // Commit mutation to set whether script progress dialog is shown or not - Accessed in SettingsPage.vue 121 | export async function setDisplayProgress ({ commit }, showProgress) { 122 | commit('SET_DISPLAYPROGRESS', showProgress) 123 | } 124 | 125 | // Commit mutation to add object to logged in services - Accessed in ScriptsPage.vue 126 | export async function addLoggedinServices ({ commit }, loggedInServices) { 127 | commit('ADD_LOGGEDINSERVICES', loggedInServices) 128 | } 129 | 130 | // Commit mutation to clear logged in services - Accessed in ScriptsPage.vue 131 | export async function clearLoggedinServices ({ commit }) { 132 | commit('CLEAR_LOGGEDINSERVICES', {}) 133 | } 134 | 135 | // Commit mutation to set whether command is logged or not - Accessed in SettingsPage.vue 136 | export async function setLogCommand ({ commit }, log) { 137 | commit('SET_LOGCOMMAND', log) 138 | } 139 | 140 | // Commit mutation to set whether result is logged or not - Accessed in SettingsPage.vue 141 | export async function setLogResult ({ commit }, log) { 142 | commit('SET_LOGRESULT', log) 143 | } 144 | -------------------------------------------------------------------------------- /src/store/lazystore/getters.js: -------------------------------------------------------------------------------- 1 | export function getLanguage (state) { 2 | return state.language 3 | } 4 | 5 | export function getCustomLanguage (state) { 6 | return state.custom_language 7 | } 8 | 9 | export function getSearchScripts (state) { 10 | return state.search_scripts 11 | } 12 | 13 | export function getSearchHistory (state) { 14 | return state.search_history 15 | } 16 | 17 | export function getScriptsFilter (state) { 18 | return state.scripts_filter 19 | } 20 | 21 | export function getCommandMaximized (state) { 22 | return state.command_maximized 23 | } 24 | 25 | export function getMasterDefinition (state) { 26 | return state.master_definition 27 | } 28 | 29 | export function getDefinitions (state) { 30 | return state.definitions 31 | } 32 | 33 | export function getUpdateDate (state) { 34 | return state.update_date 35 | } 36 | 37 | export function getUpdateInProgress (state) { 38 | return state.update_in_progress 39 | } 40 | 41 | export function getDefinitionsUpdateInProgress (state) { 42 | return state.definitions_update_in_progress 43 | } 44 | 45 | export function getRestartRequired (state) { 46 | return state.restart_required 47 | } 48 | 49 | export function getUpdateProgress (state) { 50 | return state.update_progress 51 | } 52 | 53 | export function getAlwaysConfirm (state) { 54 | return state.always_confirm 55 | } 56 | 57 | export function getHistoryLength (state) { 58 | return state.history_length 59 | } 60 | 61 | export function getHistoryVisible (state) { 62 | return state.history_visible 63 | } 64 | 65 | export function getHistory (state) { 66 | return state.history 67 | } 68 | 69 | export function getDenseInput (state) { 70 | return state.dense_input 71 | } 72 | 73 | export function getDenseTable (state) { 74 | return state.dense_table 75 | } 76 | 77 | export function getLoginSkipped (state) { 78 | return state.login_skipped 79 | } 80 | 81 | export function getCredentialsSaved (state) { 82 | return state.credentials_saved 83 | } 84 | 85 | export function getDisplayProgress (state) { 86 | return state.display_progress 87 | } 88 | 89 | export function getLoggedinServices (state) { 90 | return state.loggedin_services 91 | } 92 | 93 | export function getLogCommand (state) { 94 | return state.log_command 95 | } 96 | 97 | export function getLogResult (state) { 98 | return state.log_result 99 | } 100 | 101 | // Dynamically build array of scripts to display in ScriptsPage.vue page 102 | export function getScriptsArray (state) { 103 | try { 104 | return Object.entries(state.definitions) 105 | .filter(([key, value]) => state.scripts_filter.includes(key)) 106 | .sort(([key, value], [key2, value2]) => (key > key2) ? 1 : -1) 107 | .map(function ([key, value]) { return value.definition }) 108 | .flat(1) 109 | } catch { 110 | console.error('Cannot build scripts entries.') 111 | } 112 | } 113 | 114 | // Dynamically build menu entries array of modules to display in FullLayout.vue and AboutPage.vue 115 | export function getMenuEntries (state) { 116 | try { 117 | return Object.entries(state.definitions) 118 | .map(function ([key, value]) { 119 | return { 120 | name: key, 121 | displayName: value.displayName ? value.displayName[state.language] || value.displayName['default'] : '', 122 | description: value.description ? value.description[state.language] || value.description['default'] : '', 123 | version: value.version, 124 | icon: value.icon ? value.icon : 'mdi-powershell' 125 | } 126 | }).sort((a, b) => (a.displayName > b.displayName) ? 1 : -1) 127 | } catch { 128 | console.error('Cannot build menu entries.') 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /src/store/lazystore/index.js: -------------------------------------------------------------------------------- 1 | import state from './state' 2 | import * as getters from './getters' 3 | import * as mutations from './mutations' 4 | import * as actions from './actions' 5 | 6 | export default { 7 | namespaced: true, 8 | state, 9 | getters, 10 | mutations, 11 | actions 12 | } 13 | -------------------------------------------------------------------------------- /src/store/lazystore/mutations.js: -------------------------------------------------------------------------------- 1 | export const SET_LANGUAGE = (state, value) => { 2 | state.language = value 3 | } 4 | 5 | export const SET_CUSTOMLANGUAGE = (state, value) => { 6 | state.custom_language = value 7 | } 8 | 9 | export const SET_SEARCHSCRIPTS = (state, value) => { 10 | state.search_scripts = value 11 | } 12 | 13 | export const SET_SEARCHHISTORY = (state, value) => { 14 | state.search_history = value 15 | } 16 | 17 | export const SET_SCRIPTSFILTER = (state, value) => { 18 | state.scripts_filter = value 19 | } 20 | 21 | export const SET_COMMANDMAXIMIZED = (state, value) => { 22 | state.command_maximized = value 23 | } 24 | 25 | export const SET_MASTERDEFINITION = (state, value) => { 26 | state.master_definition = value 27 | } 28 | 29 | export const REMOVE_MASTERDEFINITION = (state) => { 30 | state.master_definition = {} 31 | } 32 | 33 | export const SET_DEFINITIONS = (state, value) => { 34 | // https://vuejs.org/v2/guide/reactivity.html#Change-Detection-Caveats 35 | state.definitions = Object.assign({}, state.definitions, value) 36 | } 37 | 38 | export const REMOVE_DEFINITIONS = (state) => { 39 | state.definitions = {} 40 | } 41 | 42 | export const SET_UPDATEDATE = (state, value) => { 43 | state.update_date = value 44 | } 45 | 46 | export const SET_UPDATEINPROGRESS = (state, value) => { 47 | state.update_in_progress = value 48 | } 49 | 50 | export const SET_DEFINITIONSUPDATEINPROGRESS = (state, value) => { 51 | state.definitions_update_in_progress = value 52 | } 53 | 54 | export const SET_RESTARTREQUIRED = (state, value) => { 55 | state.restart_required = value 56 | } 57 | 58 | export const SET_UPDATEPROGRESS = (state, value) => { 59 | state.update_progress = value 60 | } 61 | 62 | export const SET_ALWAYSCONFIRM = (state, value) => { 63 | state.always_confirm = value 64 | } 65 | 66 | export const SET_HISTORYLENGTH = (state, value) => { 67 | state.history_length = value 68 | } 69 | 70 | export const SET_HISTORYVISIBLE = (state, value) => { 71 | state.history_visible = value 72 | } 73 | 74 | export const SET_HISTORY = (state, value) => { 75 | state.history.unshift(value) 76 | state.history.splice(state.history_length) 77 | } 78 | 79 | export const SET_DENSEINPUT = (state, value) => { 80 | state.dense_input = value 81 | } 82 | 83 | export const SET_DENSETABLE = (state, value) => { 84 | state.dense_table = value 85 | } 86 | 87 | export const SET_LOGINSKIPPED = (state, value) => { 88 | state.login_skipped = value 89 | } 90 | 91 | export const SET_CREDENTIALSSAVED = (state, value) => { 92 | state.credentials_saved = value 93 | } 94 | 95 | export const SET_DISPLAYPROGRESS = (state, value) => { 96 | state.display_progress = value 97 | } 98 | 99 | export const ADD_LOGGEDINSERVICES = (state, value) => { 100 | state.loggedin_services = Object.assign({}, state.loggedin_services, value) 101 | } 102 | 103 | export const CLEAR_LOGGEDINSERVICES = (state, value) => { 104 | state.loggedin_services = value 105 | } 106 | 107 | export const SET_LOGCOMMAND = (state, value) => { 108 | state.log_command = value 109 | } 110 | 111 | export const SET_LOGRESULT = (state, value) => { 112 | state.log_result = value 113 | } 114 | -------------------------------------------------------------------------------- /src/store/lazystore/state.js: -------------------------------------------------------------------------------- 1 | export default function () { 2 | return { 3 | language: 'en-us', // Handles application language - Changeable on logon screen 4 | custom_language: {}, // Holds application custom language, which may be loaded via registry url 5 | search_scripts: '', // Holds search string value 6 | search_history: '', // Holds search string value 7 | scripts_filter: [], // Holds current filter for scripts table 8 | command_maximized: false, // Is command dialog window maximized? 9 | master_definition: {}, // Contains scripts definitions data, holding url to all modules 10 | definitions: {}, // Object holding script definitions in their respective module objects 11 | custom_definitions: [], // Contains user defined script definitions 12 | favorite_definitions: [], // Definitions favorited by user 13 | update_date: '', // Date of last update, do not automatically update more than once a day 14 | update_in_progress: false, // Is application update in progress? 15 | definitions_update_in_progress: false, // Are definitions update in progress? 16 | restart_required: false, // Is application restart required? (To install updates) 17 | update_progress: '', // Update Progress message 18 | always_confirm: false, // Should confirmation dialog be always displayed regardless script definition 19 | history_length: 25, // How many commands should be saved 20 | history_visible: false, // Is history dialog window visible? 21 | history: [], // Array holding previous commands 22 | dense_input: false, // Should input be dense or not 23 | dense_table: true, // Should tables be dense or not 24 | login_skipped: false, // Was login skipped or not 25 | credentials_saved: false, // Are Login credentials saved or not 26 | display_progress: false, // Is progress dialog displayed or not 27 | loggedin_services: {}, // Holds names of logged in services for current PowerShell session 28 | log_command: false, // Should command be logged to console and log file 29 | log_result: false // Should result be logged to console and log file 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/store/store-flag.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FEATURE-FLAG FILE IS AUTOGENERATED, 2 | // REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING 3 | import "quasar/dist/types/feature-flag"; 4 | 5 | declare module "quasar/dist/types/feature-flag" { 6 | interface QuasarFeatureFlags { 7 | store: true; 8 | } 9 | } 10 | --------------------------------------------------------------------------------