darrenjrobinson / powershell_module_identitynow

SailPoint IdentityNow PowerShell Module
https://blog.darrenjrobinson.com/sailpoint-identitynow/
MIT License
47 stars 15 forks source link

Export-IdentityNowConfig throwing error when providing directory path #40

Closed bama19942000 closed 3 years ago

bama19942000 commented 3 years ago

Export-IdentityNowConfig -path 'c:\test' -Items Rules,Roles Export-IdentityNowConfig : provided path is not a directory: c:\test At line:1 char:1

Tried it multiple times and multiple ways

darrenjrobinson commented 3 years ago

What version of PowerShell are you using? Does the c:\test directory exist and the logged in user account have access?

image

image

bama19942000 commented 3 years ago

PS C:\WINDOWS\system32> Get-Host | Select-Object Version

Version


5.1.17134.858

PS C:\WINDOWS\system32> Export-IdentityNowConfig -path 'C:\scratchdump' -Items IdentityProfiles Export-IdentityNowConfig : provided path is not a directory: C:\scratchdump At line:1 char:1

I am running PS as an administrator and can intellisense to the various paths I set up. I also completely uninstalled the module and reinstalled.

bama19942000 commented 3 years ago

Darren, I had a coworker try this with the same results.

darrenjrobinson commented 3 years ago

Thanks @bama19942000 I've been able to recreate the issue using PowerShell 5.1. The problem is with PowerShell 5.1 and the different way System.IO functions.

I've written and tested an update using both PS 5.1 and PS7.x It is under a new branch v1.1.5 https://github.com/darrenjrobinson/powershell_module_identitynow/tree/v1.1.5 You can download that individual script for the module from here https://github.com/darrenjrobinson/powershell_module_identitynow/blob/v1.1.5/scripts/Export-IdentityNowConfig.ps1

Let me know how you go in your environment.

bama19942000 commented 3 years ago

Thank you, Darren! It works.

darrenjrobinson commented 3 years ago

Fantastic. I'll close this and look to release v1.1.5 once I've looked at the other enhancement and anything else that pops up..