Is there an API or report that will show the permissions assigned to the specific folders?
Ross
Hello,
We implemented a script just last week for that specific purpose.
Its a sample included in our Devolutions Server PowerShell module
https://github.com/Devolutions/devolutions-server/blob/main/Powershell%20Module/Samples/PermissionsReport.ps1
let us know if you need help running this!
Maurice
how do I use your module? your Readme is a little lacking :)
thanks for putting this together it is exactly what I was looking, so hope I can get it running with your direction.
Ross
I download the code and tried to run the EndToEnd.Tests.ps1 and got the below messages
VERBOSE: Loading module from path 'C:\source\DevolutionsServer\DevolutionsServer.psd1'.
VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted versions.
VERBOSE: Loading 'Assembly' from path 'C:\source\DevolutionsServer\DvlsAPI.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\source\DevolutionsServer\DvlsAPI.dll'.
Import-Module : Could not load file or assembly 'file:///C:\source\DevolutionsServer\DvlsAPI.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:3 char:5
+ Import-Module -Name $modulePath -Verbose -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
I solved the previous issue, I ran the script on the password server and that fixed the initial issue. after running the EndToEnd.Tests.ps1 I get these results.
VERBOSE: Importing function 'Update-DSRole'.
Describing NormalWorkflow
VERBOSE: [New-DSSession] begin...
VERBOSE: [Get-DSServerInfo] begin...
VERBOSE: GET http://xyz
/dps/api/server-information with 0-byte payload
VERBOSE: [Get-DSServerInfo] Completed Successfully.
[-] Should authenticate 1.45s
RuntimeException: Session Key is missing, you must call Get-ServerInfo before using this method
at Protect-ResourceToHexString<Begin>, C:\Source\DPS\Powershell Module\DevolutionsServer\Private\Utils\Protect-ResourceToHexString.ps1: line 17
at New-DSSession<Process>, C:\Source\DPS\Powershell Module\DevolutionsServer\Public\Authentication\New-DSSession.ps1: line 47
at <ScriptBlock>, <No file>: line 24
VERBOSE: [Get-DSVaults] begin...
[-] Should get at least the Default Vault 337ms
RuntimeException: Session does not seem authenticated, call New-DSSession.
at Get-DSVaults<Begin>, C:\Source\DPS\Powershell Module\DevolutionsServer\Public\Vaults\Get-DSVaults.ps1: line 27
at <ScriptBlock>, <No file>: line 28
VERBOSE: [Close-DSSession] begin...
VERBOSE: [Invoke-DS] begin...
VERBOSE: [Close-DSSession] ...end
[-] should logoff 189ms
RuntimeException: '-Be' is not a valid Should operator.
at Get-TestResult, C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\Assertions\Should.ps1: line 42
at <ScriptBlock>, <No file>: line 33
Hello,
The test scripts are for us to ensure we do not break stuff in between deliveries.
For your requirements, you simply need to set the three environment variables that contain the server URL, and the credentials. If you navigate to the Samples subfolder, you will find a script named SetEnvironmentVariables.ps1. This shows how to set the three variables. After that is done, simply run the PermissionsReport.ps1 script. It will generate two csv files.
Maurice
i have set the env and when I run the permission report script i get this error.
Session Key is missing, you must call Get-ServerInfo before using this method
At C:\Source\DPS\Powershell Module\DevolutionsServer\Private\Utils\Protect-ResourceToHexString.ps1:17 char:13
+ throw "Session Key is missing, you must call Get-ServerIn ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Session Key is ...ing this method:String) [], RuntimeException
+ FullyQualifiedErrorId : Session Key is missing, you must call Get-ServerInfo before using this method
Hello,
I have spun up a new blank virtual machine and indeed I reproduce your issue. There must be some sequencing error.... I am looking into this right now
Maurice
Hello,
I'd like to do a remote session to resolve the issue in the fastest way possible. If its possible, could you send just a note to ticket@devolutions.net with the title DVLS PS Module
Maurice
email has been sent.