ACS2012
asked on
List of Users in Office 365
In office 365, How we can get a full list of users and their full information, specially their emails since most of them have more than one email?
ASKER
then how I can connect using powershell??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried it, I got the following error:
PS C:\Office 365 Deployment Tools\Helper Scripts> GetMsolUserReport.ps1
GetMsolUserReport.ps1 : The term 'GetMsolUserReport.ps1' 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:1 char:1
+ GetMsolUserReport.ps1
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (GetMsolUserReport.ps1:Str ing) [
], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command GetMsolUserReport.ps1 was not found, but doe
s exist in the current location. Windows PowerShell does not load commands from
the current location by default. If you trust this command, instead type ".\GetM
solUserReport.ps1". See "get-help about_Command_Precedence" for more details.
PS C:\Office 365 Deployment Tools\Helper Scripts>
PS C:\Office 365 Deployment Tools\Helper Scripts> GetMsolUserReport.ps1
GetMsolUserReport.ps1 : The term 'GetMsolUserReport.ps1' 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:1 char:1
+ GetMsolUserReport.ps1
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (GetMsolUserReport.ps1:Str
], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command GetMsolUserReport.ps1 was not found, but doe
s exist in the current location. Windows PowerShell does not load commands from
the current location by default. If you trust this command, instead type ".\GetM
solUserReport.ps1". See "get-help about_Command_Precedence" for more details.
PS C:\Office 365 Deployment Tools\Helper Scripts>
Run it like that:
.\GetMsolUserReport.ps1
Or simply drag-drop the file into PowerShell window.
Also make sure you have allowed scripts:
Set-executionPolicy RemoteSigned
.\GetMsolUserReport.ps1
Or simply drag-drop the file into PowerShell window.
Also make sure you have allowed scripts:
Set-executionPolicy RemoteSigned
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
C:\Office 365 Deployment Tools\Helper Scripts> $LiveCred = Get-Credential
C:\Office 365 Deployment Tools\Helper Scripts> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
C:\Office 365 Deployment Tools\Helper Scripts> Import-PSSession $Session
i run the above command, then i run:
C:\Office 365 Deployment Tools\Helper Scripts> .\GetMsolUserReport.ps1
i got the following error:
PS C:\Office 365 Deployment Tools\Helper Scripts> .\GetMsolUserReport.ps1
.\GetMsolUserReport.ps1 : File C:\Office 365 Deployment Tools\Helper
Scripts\GetMsolUserReport. ps1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\GetMsolUserReport.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
----------------
i read something about a 64bit and it's not working with it:
http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/964636ad-347e-4b23-8f7a-f36a558115dd/
C:\Office 365 Deployment Tools\Helper Scripts> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
C:\Office 365 Deployment Tools\Helper Scripts> Import-PSSession $Session
i run the above command, then i run:
C:\Office 365 Deployment Tools\Helper Scripts> .\GetMsolUserReport.ps1
i got the following error:
PS C:\Office 365 Deployment Tools\Helper Scripts> .\GetMsolUserReport.ps1
.\GetMsolUserReport.ps1 : File C:\Office 365 Deployment Tools\Helper
Scripts\GetMsolUserReport.
disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\GetMsolUserReport.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
----------------
i read something about a 64bit and it's not working with it:
http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/964636ad-347e-4b23-8f7a-f36a558115dd/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Get-MsolUser | select DisplayName,UserPrincipalN