I can not remote into any machine to save my life! I have tried everything I can find. If anyone could troubleshoot or guide me, I'd appreciate it as this would be a great tool to add on my domain. SETUP: 1. Client machine inside domain 2. Server machine inside [...] read more
i want to validate a set of credentials against the domain controller. e.g.: Username: joel Password: splotchy Domain: STACKOVERFLOW In .NET 3.5 and newer you can use PrincipalContext.ValidateCredentials(username, password). Otherwise you're in trouble. Following the code in the Microsoft Knowledge Base article How to validate user credentials on Microsoft operating [...] read more
I have two remote machines: 1 we call it the driver, 2 we call it the client. They are in the same domain let's call them "TECH.com". On the driver machine, I have a PowerShell script that controls the client machine: 1, restore checkpoint on the client. 2, stop the [...] read more
I have to 2 systems (SR01 & SR02) with local administrators account. Both the systems are in the same domain. The local admin accounts are same with different password. These machines are VM's. When I run a enter-pssession from SR01 to SR02 it throws the below error. Error: Enter-PSSession : [...] read more
I have a PowerShell script meant to do two things: check for the Last Checked value of Windows Update, and Enumerate all drives and check remaining space on those drives, for a remote server. The expected output of the function is: servername ---------- Last Checked for Windows Update: 01/18/2021 08:12:46 [...] read more
I have a server Windows 2012R2 in the domain. This server has no domain user access, only local admin user. I can RDC into this machine using admin account, but cannot have a PSSession, so Enter-PSSession or Invoke-Command or New-PSSession does not work. I have set the Trustedhosts value to [...] read more
I've just encountered a curious issue in my attempts to connect to a remote Exchange server. I spent a long time unable to establish a session and tried a variety of things until I tried changing the format of the username. The code I'm running is as follows: $Session = [...] read more
I am trying to connect PowerShell remotely to an Exchange server. This is to a separate AD Domain. (Connecting domainA to domainB) I can connect from domainA to servers on other domains just fine. I receive the following error: PS Y:\Personal\scripts> $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://server1.domainB.tld/PowerShell/ -Authentication Kerberos [...] read more
A Windows Server 2008 R2 server is configured to collect Windows Event Logs, via a source initiated event subscription. The subscription appears to be active but no events are collected. subscriptions section of windows event viewer showing active subscriptions [https://i.stack.imgur.com/GXIac.png] On the client Microsoft-Windows-Eventlog-ForwardingPlugin/Operational has errors with event ID 105 [...] read more
I've recently created a little script that allows me to get the disk size and free space of 2 servers at each school site when I provide the script with the schools 4 digit site code. First it pulls the information on the sites from a .csv file, and then [...] read more
I'm trying to connect to an AzureRM VM. I've read through so many tutorials on WinRM but I still cannot get this to work: Enter-PSSession -ComputerName "$($HOST).cloudapp.net" -Credential $username When I run this, I get the following error: > The user name or password is incorrect. For more information, see [...] read more
I am trying to automate my build setup. It works quite good. But I have a problem with the Step „PowerShell on Target Machines“. The step works fine as long as the TFS server and the other server are in the same domain. Now I have a server which is [...] read more
I'm writing a script to check that our backup succeeded. Unfortunately, the backup is in a different location/login. The script is scheduled to run without user intervention, like the other ones do. I'm adding in credential info that is saved, but the -Credential option isn't working. It's still asking me [...] read more
As soon as I enabled the Hyper-V feature on my Windows 10 laptop, my Direct Access connectivity stopped to work. Disabling the feature restored the ability to connect. Especially, I can't connect to RDP session, but I can ping remote servers. How to troubleshot that ? As a clue, when [...] read more
INTRODUCTION I'm sitting at a Windows Server 2012 R2 server and I'm trying to Enter-PSSession into another machine. I've executed Enable-PSRemoting on the remote computer and that did not help. COMPUTER DETAILS Local Computer * OS: Windows Server 2012 R2 * IP 10.1.1.1/24 * HOSTNAME.exe: server * ECHO %USERNAME%: User1 [...] read more
We have the following setup currently: 1. Active Directory Domain Controller server that is running Windows Server 2012 R2 2. Database Server with SQL Server 2014 that is running Windows Server 2012 R2 (Joined the domain in 1.). Running an active standby cluster using Microsoft Failover Clustering. 3. Application Server [...] read more
I'm running BizTalk production environment on two separate virtual machines (Hyper-V) , lets call them APP and DB. They are in the same network, tied with domain controllers. I use 2 our company DNSes on my network adapters in my VMs and virtual switch in my virtualization host. Problem is [...] read more
I am trying to use WINRM to connect to one host (in the internal domain) and then from there WINRM into another server in another domain (the DMZ). Below is an example: $domainServer = 'DOMAINSERVER' $dmzServer = 'DMZSERVER' $domainCred = Get-Credential -Message "Enter domain creds" $dmzCred = Get-Credential -Message "Enter [...] read more
I need to set up an active directory authentication system using Kerberos. My AcquireCredentialsHandleA class looks as follows. https://docs.microsoft.com/en-us/windows/win32/secauthn/acquirecredentialshandle--kerberos SEC_WINNT_AUTH_IDENTITY AuthData, *pAuthData = NULL; #ifdef UNICODE AuthData.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE; #else AuthData.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; #endif unsigned char username[200] = "user"; unsigned char domain[200] = "domain.com"; unsigned char password[100] = "secret"; AuthData.User [...] read more
We have TFS 2017 in premise setup hosted on our internal network. Lets call that tfs.OurInternalDomain.com TFS application and its build controllers and agents are all hosted on our internal n/w. Our production servers are hosted on a separate domain (data center) for security reasons. I am trying to deploy [...] read more
I am trying to write a script to retrieve any expired IIS certificates across domains. I can run the script without any errors while on the same domain as the server list but I'm unable to cross domains even though the user I'm using has admin access across all domains. [...] read more
We have multiple IIS web applications running on multiple web servers that connect to a SQL Server on a separate machine on the same domain. Everything was running smoothly for over a year, then we had some major network issues. There was a problem with the replication between the primary [...] read more
I need to copy a file from a Linux samba server to various Windows Server 2008. The shared folder has a specific login and is read-only. I can access and copy the shared file using Windows Explorer without a problem. But, when using Powershell to copy the file, it always [...] read more
I am trying to establish a Powershell remote connection to a workgroup computer from a domain joined computer. Both are on the same network. i am entering the PSSession from a admin account. I have an admin account on the target computer, which is not as same as the admin [...] read more
I am trying to make persistant remote powershell connection from Windows7(32-bit) to exchange Server 2013,such that I can run some powershell commands from My windows7 machine as i am running it on server. I am following steps from this article https://technet.microsoft.com/en-us/library/dd335083(v=exchg.150).aspx I had already installed .net Framework Version 4.5, Windows [...] read more
I am working on some deployment PowerShell scripts that I plan to use with Bamboo for deployment. Within these PowerShell scripts, I want to run commands on a remote computer on our local network. I would like to use Invoke-Command and use the remote computer's local administrator account as the [...] read more
I'm writing a series of automation scripts that will allow our developers to stand up a simple development environment in Azure. This environment has 3 primary properties: 1. There is a client machine (Windows 10) where dev tools like their IDE and code will live. 2. There is a server [...] read more
Please consider the following scenario: There are 2 servers: server1 and server2, both on the same network and on the same domain. The objective is to open a PSSession from server1 into server2 using a local user from server2 as the identity: PS @SERVER1 > $session = New-PSSession -ComputerName server2 [...] read more
My laptop is domain joined and I use PSRemoting just fine from my office. I get an error when trying to connect outside the office via VPN. I have triple checked our firewall but the issue seems to be with the client or server since "Test-WSMan" succeeds with no issues. [...] read more
I have the following code to connect to a remote computer: var credential = new PSCredential(username, securePassword); var rri = new WSManConnectionInfo(new Uri(uri), schema, credential) { AuthenticationMechanism = AuthenticationMechanism.Kerberos, ProxyAuthentication = AuthenticationMechanism.Negotiate }; var remoteRunspace = RunspaceFactory.CreateRunspace(rri); remoteRunspace.Open(); But it's throwing the following exception: System.Management.Automation.Remoting.PSRemotingTransportException was unhandled by user code [...] read more
I have restored a version of my exchange 2013 server to a virtual machine. I want to do some work with it but I don't want to bring it online. When I try to connect to it with powershell it gives me errors like: > WinRM cannot process the request. [...] read more
When I remote desktop to a box I will get a prompt like this: [https://i.stack.imgur.com/mOG6f.png] Once I select "Yes" I am connected to the box. When I try to login to the same box with the same credentials in PowerShell I get the error listed at the end of this [...] read more