//Build// Code on Weekend // Reach out if any one want to share cool FIM/MIM, IAM related Project. Mail : Any.Singha@gmail.com
Tuesday, 11 June 2013
Friday, 7 June 2013
Thursday, 6 June 2013
PowerShell to Query groups having no owners in FIM portal
<# Please do not anything in the production enviroment unless and untill you are very much sure #>
# Load FIMAutomation module
if(@(Get-PSSnapin | ? { $_.Name -eq "FIMAutomation" } ).Count -eq 0)
{
Add-PSSnapin FIMAutomation;
}
$groups = Export-FIMConfig -customConfig "/Group[Owner !=/Person]" -Uri "http://localhost:5725" -OnlyBaseResources
foreach ($group in $groups)
{
$x = (($group.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value)
Write-Host "Groups are $x"
}
# Load FIMAutomation module
if(@(Get-PSSnapin | ? { $_.Name -eq "FIMAutomation" } ).Count -eq 0)
{
Add-PSSnapin FIMAutomation;
}
$groups = Export-FIMConfig -customConfig "/Group[Owner !=/Person]" -Uri "http://localhost:5725" -OnlyBaseResources
foreach ($group in $groups)
{
$x = (($group.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value)
Write-Host "Groups are $x"
}
Tuesday, 4 June 2013
Adding user from txt in AD group
<# The input file is User.txt havig the samaccount of the user, try and catch is used to verify if the user is already added to the group, Here we can use variable to out the result in logs for the user which are already added in group #>
Import-module ActiveDirectory
Import-CSV "C:\Users\administrator\Desktop\User.txt" | % {
try {$x=$_.UserName
Add-ADGroupMember -Identity allit -Member $x }
catch [system.exception] {
write-host "the user $x is alreday a member of the group"}
}
Sunday, 2 June 2013
PSBUG UG meet Bangalore 1st June 2013
PSBUG UG meet at
Microsoft Bangalore- was doing my Night shift and UG meet was on Saturday in
the morning, I was eager to learn new thing in Power Shell and meet few MVP that
motivate me to attain the meeting in spite of doing the Night shift.
New
Learning for me J
F7 and H command will show the command that had been executed.
Subscribe to:
Posts (Atom)
-
Note : This series is for the Beginner and trouble shooting the Error With Sync Engine, Based on Test Lab, Highly advice do not do Full Syn...
-
This article can be refer as reference only, how can you build your first Management Agent connect to Service Now. The samples code show...
-
Error “Does not have a parent object in Management agent.” When I run the Delta Sycs for FIM MA, I started getting the error Sync-r...