ech0

joined 1 year ago
[–] ech0 3 points 1 year ago* (last edited 1 year ago)

I fixed the code. No longer getting that error. Here is the fixed code for future reference

Import-Module AzureADPreview

#Get Credentials to connect
$Credential = Get-Credential

Connect-AzureAD -Credential $Credential

#Connect to Exchange Online
Connect-ExchangeOnline -Credential $Credential -ShowBanner:$False

$users = Get-ADUser -SearchBase ‘OU=Test Users, OU=Users,DC=co,DC=net’ -filter *

foreach ($user in $users)
{
    $email = $user.samaccountname + '@co.net'
    $UserPrincipalName = $email

    $newemail = "SMTP:"+$email
    $mailattribute = $email
    #$DisplayName = $user.displayName
    #$sam = $_SamAccountName

    Write-Host "UserPrincipalName: $UserPrincipalName"
    $account = Get-AzureADUser | Where-Object {$_.UserPrincipalName -eq $UserPrincipalName}
    Write-Host "Account: $account"
    
    if ($account -ne $null) {
        Get-AzureADUser -ObjectId $account.ObjectId | select Account
    
        # Add the user to the Azure AD group
        Add-AzureADGroupMember -ObjectId (Get-AzureADGroup -SearchString "OfficeUsersTest").ObjectId -RefObjectId $account.ObjectId

        #PowerShell to add a user to office 365 group
        Add-UnifiedGroupLinks -Identity [email protected] -LinkType "Members" -Links $email
    }
}

        #Disconnect Exchange Online
        Disconnect-ExchangeOnline -Confirm:$False```
[–] ech0 2 points 1 year ago

Yea I know. Strictly for pirating. Used for Deluge and Arrs on my Unraid server

[–] ech0 -1 points 1 year ago (4 children)

I switch back to PIA because of this. Been rock solid and very fast.

[–] ech0 5 points 1 year ago* (last edited 1 year ago)

I'm about to be a Dad and I couldn't imagine my kids telling their friends they couldn't do something or go somewhere because "My Dad wants to save like $24"

[–] ech0 5 points 1 year ago

Lol me too! I got an AWS cert

[–] ech0 56 points 1 year ago* (last edited 1 year ago) (5 children)

Wells Fargo is worth 163 billion. That $200 million fine is literally 0.12% of their Net worth.

In comparison

The average US salary is $59,428. A parketing ticket on average is about $80

That parketing ticket is 0.13% of that Salary.

So this "fine" is in fact cheaper than a parking ticket.

[–] ech0 7 points 1 year ago* (last edited 1 year ago) (2 children)

Lol. Don't mind the troll. Go back to reddit dude

[–] ech0 -4 points 1 year ago (1 children)

Tortilla chips have nearly 0 nutritional value tho...

[–] ech0 8 points 1 year ago (1 children)

You used punctuation tho. Are you in English class?

[–] ech0 7 points 1 year ago

Worm Virus enters the chat

[–] ech0 1 points 1 year ago (1 children)

First thing that comes to mind is are you running it on Host Network? That's a requirement

[–] ech0 1 points 1 year ago (3 children)

Also self-host SearchXNG. Its definitely the way to go. I like you can choose which search engines to pull from

view more: ‹ prev next ›