Closed bama19942000 closed 3 years ago
What version of PowerShell are you using? Does the c:\test directory exist and the logged in user account have access?
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
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-IdentityNowConfig
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.
Darren, I had a coworker try this with the same results.
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.
Thank you, Darren! It works.
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..
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