Notifications

11 views

Description

Discover the SCCM server return following error from workflow context. However, test credential return success.

 

New-PSSession : [SERVICENOWSCCM01.servicenow.LOCAL] Connecting to remote server
SERVICENOWSCCM01.servicenow.LOCAL failed with the following error message : Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ComputerName SERVICENOWSCCM01.servicenow.LOCAL -Credential $Cred ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re
moteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
Authentication failure with the user SERVICENOW\sn.snowcmdb

Cause

SCCM site is installed on a drive on a computer.

In order to run the commands, every time we switch to the SCCM site (remotely) and run the commands. If the customer is able to run the commands from mid server powershell command:

Import-Module -Name "$(split-path $Env:SMS_UI_ADMIN_PATH)\ConfigurationManager.psd1"
Get-PSDrive -psprovider "CMSite"

after following the steps in "KB0740173" successfully, no changes required. This actually sets the environment variable for Configuration Manager.

Success command run:

If the command returns nothing, we might need to check the access to the drive for that particular user. This might be due to the access restrictions on the drive. 

Resolution

If the command return nothing, 

1. Logon to SCCM server using the user configured in instance ie:“SERVICENOW.SNOWCMDB”. Open Configuration Manager Console then click "Connect via Windows PowerShell"


2. Type A for "Always run"

Article Information

Last Updated:2019-09-06 22:16:54
Published:2019-09-07