PageRenderTime 24ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/bin/Debug/run.ps1

#
Powershell | 23 lines | 13 code | 7 blank | 3 comment | 3 complexity | 8377010c421220f8f8d804d490af69e6 MD5 | raw file
 1#Set-PSDebug -Trace 1
 2if ($sess -eq $null)
 3{
 4	$global:sess = new-fimsession -server fimserver -cred $(get-credential)
 5}
 6
 7$u = get-fimresource -session $sess -filter "/Person"
 8$u
 9
10$g = $(get-fimresource -session $sess -filter "/Group[DisplayName='Artists']" -Attributes All)
11$g
12
13$id = $(new-fimresource -session $sess -Type Group -Passthru -attributes @{DisplayName="DeleteMe";MailNickname="DeleteMe";MembershipLocked="False";Domain="foo";MembershipAddWorkflow="Owner Approval";Type="Distribution";Scope="Universal";Owner="7fb2b853-24f0-4498-9534-4e10589723c4";DisplayedOwner="7fb2b853-24f0-4498-9534-4e10589723c4";DomainConfiguration="1aff46f4-5511-452d-bcbd-7f7b34b0fe14"})["ObjectID"]
14$id
15$o = $(get-fimresource -session $sess -objectid $id)
16$o.SetValue("DisplayName", "SaveMe");
17set-fimresource -session $sess -instance $o
18
19#$id = new-fimresource -session $sess -Type Person -attributes @{AccountName="joe";DisplayName="Joe Blow";FirstName="Joe";LastName="Blow";Domain="FOO"}
20#get-fimresource -session $sess -filter "/Person"	
21
22
23