Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Created November 13, 2016 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/6d2375e4df49b0ba2d1c74eda59458f7 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/6d2375e4df49b0ba2d1c74eda59458f7 to your computer and use it in GitHub Desktop.
$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