{"id":13790014,"url":"https://github.com/DNN-Connect/Dnn-Powershell","last_synced_at":"2025-05-12T07:31:19.918Z","repository":{"id":37951847,"uuid":"113306010","full_name":"DNN-Connect/Dnn-Powershell","owner":"DNN-Connect","description":"Powershell module which allows you to run commands remotely for DNN Platform","archived":false,"fork":false,"pushed_at":"2022-12-07T19:41:12.000Z","size":67,"stargazers_count":8,"open_issues_count":6,"forks_count":5,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-18T04:35:33.593Z","etag":null,"topics":["dnn","dotnetnuke"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DNN-Connect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"donker"}},"created_at":"2017-12-06T11:09:07.000Z","updated_at":"2024-05-17T16:46:53.000Z","dependencies_parsed_at":"2023-01-23T19:30:11.377Z","dependency_job_id":null,"html_url":"https://github.com/DNN-Connect/Dnn-Powershell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DNN-Connect%2FDnn-Powershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DNN-Connect%2FDnn-Powershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DNN-Connect%2FDnn-Powershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DNN-Connect%2FDnn-Powershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DNN-Connect","download_url":"https://codeload.github.com/DNN-Connect/Dnn-Powershell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253695099,"owners_count":21948812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dnn","dotnetnuke"],"created_at":"2024-08-03T22:00:35.964Z","updated_at":"2025-05-12T07:31:19.301Z","avatar_url":"https://github.com/DNN-Connect.png","language":"C#","funding_links":["https://github.com/sponsors/donker"],"categories":["Awesome DNN (DotNetNuke) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Open Source Modules"],"readme":"# DNN Powershell ###\n\nA DNN PowerShell module that uses the WebAPI endpoint of DNN 9.2's new Prompt PersonaBar extension\n\n### Summary ###\n\nDNN Platform version 9.2 introduced a new PersonaBar extension called Prompt. This opens up a command shell like window\nover the top of the current page and allows you to run commands to perform certain administrative tasks (add/remove pages, \nusers etc). Because this is done by sending commands from the browser to the server using a WebAPI endpoint, it opens\nup the ability to run commands from other programs than a web browser. This is leveraged with this component. DNN Powershell\nacts as a Powershell \"module\" and offers the same commands that ship with the default Prompt extension of DNN inside\nyour Powershell environment. So now you can type \"List-Users\" from Powershell and expect the same result as if you were\nin Prompt on DNN.\n\n### Installation ###\n\nThe code compiles to a single Connect.DNN.Powershell.dll. Drop this somewhere inside your WindowsPowerShell folder and \nregister the module using import-module:\n\n```\nimport-module Path\\To\\Connect.DNN.Powershell.dll -DisableNameChecking\n```\n\nOn the DNN side you will need to ensure you have [JWT enabled](http://www.dnnsoftware.com/docs/developers/jwt/index.html). \nNote that by default it is only permitted over https and we encourage you to keep it that way.\n\n### Usage ###\n\nAt any given time there can be only one default site active in your Powershell session. This means that when you type\n*list-users* that the component knows where to get those users. There are two mechanisms by which we set the current\nsite: by switching to it from a stored list of sites through a _key_ of your choosing, or by connecting to it explicitly.\nThe list of stored site uses EncryptedString to store the site's keys for security reasons. Using the \"live\" method means\nyou need to log in every single time you start up Powershell. It will depend on your situation which approach is the best\nfor you.\n\n#### List of sites ####\n\nUse *add-site* to add a site to this list. Syntax:\n\n```\nadd-site -key mysite -url http://www.myserver.com -username host -password mypassword\n```\n\nThis will add the DNN site at the specified url and store it using the key _mysite_. You can now switch to this or run\nany command in any context and use \"-key mysite\" to point to this site. Switch the current context using:\n\n```\nuse-site -key mysite\n```\n\nand the current context will use this site. This allows you to run commands without specifying the site.\n\n#### Using a site without storing it locally ####\n\nYou can switch to a site without using local storage through\n\n```\nuse-site -url http://www.myserver.com -username host -password mypassword\n```\n\nAs soon as you close Powershell that connection will be lost.\n\n### Limitations ###\n\nYou must use superuser credentials for DNN to use this. This is because the Prompt WebAPI endpoint currently requires it. \nWe expect that in some point in the future this may change but for now you need to be superuser.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDNN-Connect%2FDnn-Powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDNN-Connect%2FDnn-Powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDNN-Connect%2FDnn-Powershell/lists"}