Created
November 13, 2016 11:47
-
-
Save darrenjrobinson/6d2375e4df49b0ba2d1c74eda59458f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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