none
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: D2WP68JVM.domain.com and lets say i have a CName for that server: server1.domain.com

    I have a database table thats populated with the server containing these folders/files but as a CName server1.domain.com 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 D2WP68JVM.domain.com.

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

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

    this results in error:

    [server1.domain.com] Connecting to remote server server1.domain.com failed with the following error message : WinRM cannot process the request. The following error occurred while using Kerberos authentication: Cannot find the computer server1.domain.com. 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: (server1.domain.com:String) [], 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

Answers

  • 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
    Moderator

All replies