Skip to content

Exception calling "Bind" with "2" argument(s): "The request failed. The remote server returned an error: (401) Unauthorized." #109

@fixpuu

Description

@fixpuu

please how do i fix this?

PS C:\Windows\System32\WindowsPowerShell\v1.0> Invoke-SelfSearch -Mailbox botelho56amanda@outlook.com -ExchHostname https://outlook.live.com/mail/0/ -Remote
[*] Trying Exchange version Exchange2010

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
[*] Using EWS URL https://https://outlook.live.com/mail/0//EWS/Exchange.asmx
Exception calling "Bind" with "2" argument(s): "The request failed. The remote name could not be resolved: 'https'"
At C:\Windows\System32\WindowsPowerShell\v1.0\MailSniper.ps1:1735 char:9
+         $rootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::B ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ServiceRequestException

You cannot call a method on a null-valued expression.
At C:\Windows\System32\WindowsPowerShell\v1.0\MailSniper.ps1:1738 char:9
+         $rootFolder.Load()
+         ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Windows\System32\WindowsPowerShell\v1.0\MailSniper.ps1:1741 char:11
+           $CustomFolderObj = $rootFolder.FindFolders($folderView) | W ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNullPS C:\Windows\System32\WindowsPowerShell\v1.0> Invoke-SelfSearch -Mailbox botelho56amanda@outlook.com -ExchHostname https://outlook.live.com/mail/0/ -Remote
[*] Trying Exchange version Exchange2010

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
[*] Using EWS URL https://https://outlook.live.com/mail/0//EWS/Exchange.asmx
Exception calling "Bind" with "2" argument(s): "The request failed. The remote name could not be resolved: 'https'"
At C:\Windows\System32\WindowsPowerShell\v1.0\MailSniper.ps1:1735 char:9
+         $rootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::B ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ServiceRequestException

You cannot call a method on a null-valued expression.
At C:\Windows\System32\WindowsPowerShell\v1.0\MailSniper.ps1:1738 char:9
+         $rootFolder.Load()
+         ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\Windows\System32\WindowsPowerShell\v1.0\MailSniper.ps1:1741 char:11
+           $CustomFolderObj = $rootFolder.FindFolders($folderView) | W ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions