2021. november 24. 19:32 - Sanyi1978

Powershell script to add users to Office 365 Groups?

Step1: Connect MSOL Services
Connect-MsolService
Step2: Find out ObjectID of the Security Group you would like add members
Get-MsolGroup –Maxresults 100000 | Where-Object {$_.DisplayName -eq “Test Security Group”}

Get-MsolGroup –ObjectId “af407072-7ae1-4b07-a0ca-6634b7396054”

                             (Or)
Sign-in to Portal.Azure.Com and Select Azure Active Directory -> Security Groups -> Search the Group -> Go to properties of the group and copy the ObjectID 
Step3: Create a CSV file with a header UserPrincipalName and list all email addresses in one column of CSV file e.g.
UserprincipalName
Sharatha@globalspsolutions.com
Test@globalspsolutions.com
Step4: Execute the Below PowerShell Script to add users into the Security group
Copy the script and paste it in a notepad. Rename the notepad to Add-MsolGroupMembers.PS1

################# Start #######################################
Import-CSv -Path “c:\Temp\testscript.CSV” | ForEach {

$UPN=$_.UserPrincipalName

$Users=Get-MsolUser -UserPrincipalName $UPN

$Groupid = Get-MsolGroup -ObjectId “0c3c9f82-2392-43cc-bc00-b0d7b5734ac4”

$Users | ForEach {Add-MsolGroupMember -GroupObjectId $GroupID.ObjectID -GroupMemberObjectId $Users.ObjectID -GroupMemberType User}

}
komment
2021. november 18. 14:54 - Sanyi1978

Excel ékezet csere

Sajnos nem tudja egyben kezelni.

A 1 tartalma:
áÁéÉíÍóÓöÖőŐúÚüÜűŰ


B1 tartalma:
=HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(A1;"á";"a");"Á";"A");"é";"e");"É";"E");"í";"i");"Í";"I");"ó";"o");"Ó";"O")

C1 tartalma:
=HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(B1;"ö";"o");"Ö";"O");"ő";"o");"Ő";"O");"ú";"u");"Ú";"U");"ü";"u");"Ü";"U")

D1 tartalma:
=HELYETTE(HELYETTE(HELYETTE(HELYETTE(HELYETTE(C1;"Ú";"U");"ü";"u");"Ü";"U");"ű";"u");"Ű";"U")

 

https://pcforum.hu/tudastar/81457/excel-ekezetek-eltavolitasa

 

Sub Ekezet()
Dim s, s1 As String

s = "ÁáÉéÖöŐőÓóÚúŰűÜüÍí"
s1 = "AaEeOoOoOoUuUuUuIi"

For Each Cell In ActiveSheet.UsedRange.Cells

For i = 1 To Len(s)
char = Mid(s, i, 1)
chara = Mid(s1, i, 1)
If InStr(1, Cell.Value, char, vbTextCompare) > 0 Then
Cell.Value = Replace(Cell.Value, char, chara)
End If
Next i

Next

End Sub

https://prog.hu/tudastar/157915/ekezetes-betuk-konvertalasa-ekezet-nelkulive

 

komment
süti beállítások módosítása