Sign up for Office 365
Learn more about Office 365
I am trying to force reset password on next logon and made an script to do it. First users are getting well but in one moment the system send me and error "Starting a command on remote server failed with the following error message : Access is denied." as shown below. the exchange Online admin context was provided before running the script with $S variable. looking great
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $adminCredential -Authentication Basic -AllowRedirection $importresults = Import-PSSession $s
Now the poweshell do not allow me to do anything in Exchange Online context .......Which could be the problem?
PS C:\scripts> & '.\Script_Reset Password On Next Logon.ps1' Reset Password On Next Logon for user: a-holgui@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: a.sandoval55@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: a.velandia177@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: abetanco@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: acastibl@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: adherna@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: Admin@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: agalindo@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: agarzon@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: agomez@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: alcastil@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: aleon@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: alexmunoz@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: altrodri@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: amosorio@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: andmoren@uniandestest2.onmicrosoft.com Reset Password On Next Logon for user: andrgarc@uniandestest2.onmicrosoft.com Processing data for a remote command failed with the following error message: Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Reset Password On Next Logon for user: aninfant@uniandestest2.onmicrosoft.com Starting a command on remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Reset Password On Next Logon for user: aorozco@uniandestest2.onmicrosoft.com Starting a command on remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Reset Password On Next Logon for user: asegura@uniandestest2.onmicrosoft.com Starting a command on remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Reset Password On Next Logon for user: av.acevedo1014@uniandestest2.onmicrosoft.com Starting a command on remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Reset Password On Next Logon for user: avallejo@uniandestest2.onmicrosoft.com Starting a command on remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Reset Password On Next Logon for user: brozo@uniandestest2.onmicrosoft.com Starting a command on remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OperationStopped: (System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe motingTransportException + FullyQualifiedErrorId : JobFailure + PSComputerName : by2prd0710psh.outlook.com
Hey axeldeuniandes,
running a ps1 shouldn't be a problem. I do this daily ...
However it might be something within your script.
Could you share your powershell script, would be easier to troubleshoot the issue ...
regards
Michael