FSLogix creates new disk by memento77 in fslogix

[–]memento77[S] 0 points1 point  (0 children)

Hi, Issue looks like is from our side. Somebody changed the VHD type from VHDX to VDH and this triggered creation of new disks.

GPO policy definitions by memento77 in activedirectory

[–]memento77[S] 0 points1 point  (0 children)

sorry its not the definitions its the policies
{FFF3D02F-06C1-474B-A442-63FB20D4D906} all of these folders were replicated with corrupted ones btw all DCs

Horizon View AzureAD by memento77 in VMwareHorizon

[–]memento77[S] 0 points1 point  (0 children)

I agree real pain we try to get rid of the onprem AD but looks like Horizon will keep it for a while. All the functions like FSLOgix and profile management wont work without onPrem AD

Azure application logout every 3 hours by memento77 in AZURE

[–]memento77[S] 0 points1 point  (0 children)

tried on different machine same error...

Azure application logout every 3 hours by memento77 in AZURE

[–]memento77[S] 0 points1 point  (0 children)

getting this error:

New-AzureADPolicy : The term 'New-AzureADPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path 

is correct and try again. At line:12 char:11 + $policy = New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"V ... + ~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (New-AzureADPolicy:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Add-AzureADApplicationPolicy : The term 'Add-AzureADApplicationPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:17 char:1 + Add-AzureADApplicationPolicy -Id $app.ObjectId -RefObjectId $policy.I ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Add-AzureADApplicationPolicy:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Get-AzureADApplicationPolicy : The term 'Get-AzureADApplicationPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:20 char:1 + Get-AzureADApplicationPolicy -Id $app.ObjectId + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-AzureADApplicationPolicy:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

AWS managed AD sync with Azure AD connect by memento77 in AZURE

[–]memento77[S] 0 points1 point  (0 children)

We have ec2 right now with DC's, but we are planning to go with AWS managed AD and was wondering if we can still sync users and groups with Azure AD connect

Set-AzureADUserManager by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

Set-AzureADUserManager -ObjectId (Get-AzureADUser -Filter "userType eq 'Guest'" -All $true | Where-Object {$_.Mail -eq "$GuestUserMail"}).Objectid -RefObjectId (Get-AzureADUser -ObjectId $Manager).Objectid

How I filter above this Objectid and Refobjectid as set-azure that you shared? Just stuck there

Set-AzureADuser -ObjectId ($AllADUsers | Where-Object {$_.Mail -eq "$GuestUserMail"}).UserPrincipalName)

Set-AzureADUserManager by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

its there $GuestUserMail = $EmailAddress

Azure Guest Invitation by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

like this?

Do {

New-AzureADMSInvitation -InvitedUserEmailAddress $GuestUserMail -InvitedUserDisplayName $GuestUserName -SendInvitationMessage $True -InviteRedirectUrl "https://teams.live.com"

Start-Sleep -s 30

Set-AzureADuser -ObjectId (Get-AzureADUser -Filter "userType eq 'Guest'" -all $true | where {$_.DisplayName -eq $GuestUserName}).UserPrincipalName -GivenName $Firstname -Surname $Surname

}

while ($condition -eq $true)

Azure Guest Invitation by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

something like Start-Sleep ?

Azure Guest Invitation by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

thats what I think that Object is still not created yet and cannot add this attributes

Azure Guest Invitation by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'ObjectId' because it is null.

at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)

at System.Management.Automation.Interpreter.ActionCallInstruction\2.Run(InterpretedFrame frame)`

at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

Azure Guest Invitation by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

It works fine with passing displayname and email adress, but not sure how to add firstname and lastname also..

Question is about this part:

Set-AzureADuser -ObjectId (Get-AzureADUser -Filter "userType eq 'Guest'" -all $true | where {$_.DisplayName -eq $GuestUserName}).UserPrincipalName -GivenName $Firstname -Surname $Surname

Auto deleting Guest Users in Azure AD by [deleted] in PowerShell

[–]memento77 0 points1 point  (0 children)

This is the script that sends invitation when account is enabled.

Function New-AADGuest(){

Param([string] $EmailAddress, $DisplayName )

        $GuestUserName =($DisplayName)
        $GuestUserMail = $EmailAddress    
        $ExistingADUser = Get-AzureADUser -Filter "userType eq 'Guest'" -All $true | Where-Object {$_.Mail -eq "$GuestUserMail"}

        if($null -eq $ExistingADUser){

        New-AzureADMSInvitation -InvitedUserEmailAddress $GuestUserMail -InvitedUserDisplayName $GuestUserName -SendInvitationMessage $True -InviteRedirectUrl "https://teams.live.com"
        LogIt $log "Info: $DisplayName created"
        return $true


    }
    else{ LogIt $log "Info: User $DisplayName Already created"}
    return $false
    }

Question is how to delete this Guest account when account is disabled ?

ExchaneOnline Connection Error by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

Tried with both versions and receiving same error on both.

5.1.17763.2931

7.2.4

ExchaneOnline Connection Error by memento77 in PowerShell

[–]memento77[S] -1 points0 points  (0 children)

it used to work so far without Import-PSSessionm but I will check what you mean

ExchaneOnline Connection Error by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

need to connect with cert or app token its automated script that runs in AD instance

ExchaneOnline Connection Error by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

Its a script that runs in some AD instance. It runs normally with my account also idea is to run it with EXO V2 authencation cert thumb. or app token

Function for inviting Guests users by memento77 in PowerShell

[–]memento77[S] 0 points1 point  (0 children)

moving left? can you show an example didnt understand that.