Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using the new Granfeldt FIM/MIM PowerShell Management Features - Import Script. Associated Blogpost https://blog.darrenjrobinson.com/using-the-new-granfeldt-fim-mim-powershell-management-features/
param (
$Username,
$Password,
$Credentials,
$AuxUsername,
$AuxPassword,
$AuxCredentials,
$ConfigurationParameter,
$OperationType,
[bool] $usepagedimport,
$pagesize,
$Schema
)
$verbosepreference = "Continue"
"Username: $($Username) " | out-file "c:\psma\csv\_creds-uname-password.txt"
"Password: $($Password)" | out-file "c:\psma\csv\_creds-uname-password.txt" -Append
"Username Aux: $($AuxUsername)" | out-file "c:\psma\csv\_creds-uname-password-aux.txt"
"Password Aux: $($AuxPassword)" | out-file "c:\psma\csv\_creds-uname-password-aux.txt" -Append
$Schema | convertto-json | out-file "c:\psma\csv\_schema.txt"
$Credentials | out-file "c:\psma\csv\_creds.txt"
$AuxCredentials | out-file "c:\psma\csv\_creds-aux.txt"
$ConfigurationParameter | out-file "c:\psma\csv\_config.txt"
$ConfigurationParameter["Environment"] | out-file "c:\psma\csv\_config.txt" -append
$pagesize | out-file "c:\psma\csv\_pagesize.txt"
$OperationType | out-file "c:\psma\csv\_OperationType.txt"
$usepagedimport | out-file "c:\psma\csv\_UsePagedImport.txt"
$obj = new-object -type pscustomobject
$obj | add-member -type noteproperty -name "Anchor-Employee ID|String" -Value "Employee ID"
$obj | add-member -type noteproperty -name "objectClass|String" -Value "person"
$obj | add-member -type noteproperty -name 'Department|String' -value "Department"
$obj | add-member -type noteproperty -name 'First Name|String' -value "First Name"
$obj | add-member -type noteproperty -name 'Last Name|String' -value "Last Name"
$obj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment