Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$in = Get-Content $req -Raw | ConvertFrom-Json
$in.displayname
$in.objectType
# Import the Lithnet Resource Management Powershell Module
import-module 'D:\home\site\wwwroot\MIMMetaverseSearch\bin\LithnetRMA\1.0.6088\LithnetRMA.psd1'
# MIM AD User Admin
$username = "mimadmin@mim.mydomain.com"
# Password
$password = "Secr3tSq1rr3l!" | convertto-securestring -AsPlainText -Force
# PS Creds
$credentials = New-Object System.Management.Automation.PSCredential $Username,$password
# Connect to the FIM service instance
# Will require an inbound rule for TCP 5725 (or your MIM Service Server Port) in you Resource Group Network Security Group Config
Set-ResourceManagementClient -BaseAddress http://mymimportalserver.westus.cloudapp.azure.com:5725 -Credentials $credentials
# Get a resource by its displayName
$obj = Get-Resource -ObjectType $in.objectType -AttributeName DisplayName -AttributeValue $in.displayname
Out-File -Encoding Ascii -FilePath $res -inputObject $obj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.