Is it possible to connect remotely using an alias/CName? RRS feed

  • Question

  • I have a remote server that contains a Data directory which contains some folders/files i want to delete (based on name match)

    Suppose the actual server is: and lets say i have a CName for that server:

    I have a database table thats populated with the server containing these folders/files but as a CName for easier user readability/maintenance...because its much easier to identify an alias server than the actual server name with all the alphanumeric it has in the server its pointing to

    the problem lies with connecting remotely to the CName to remove the files

    Invoke-Command -Computer '' -ScriptBlock {Remove-Item $args[0] -force } -ArgumentList 'C:\Data\filetodelete.db'

    this results in error:

    [] Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occurred while using Kerberos authentication: Cannot find the computer Verify that the computer exists on the network and that the name provided is spelled correctly. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OpenError: ( [], PSRemotingTransportException + FullyQualifiedErrorId : NetworkPathNotFound,PSSessionStateBroken

    so is it at all possible to connect with CName? only using the actual server works...

    Friday, March 29, 2019 10:16 PM


  • You must use the correct AD-DNS name and it must be a named registered by the remote server as an SPN.  There is no way to cheat around this.


    • Marked as answer by cataster Saturday, March 30, 2019 4:26 AM
    Saturday, March 30, 2019 12:36 AM

All replies