Running psexec on Windows Server 2008 R2 from Windows 7 - windows

I'm trying to successfully run a batch file located on a server pc (Windows Server 2008 R2) from my Windows 7 client PC. But its not working and the command prompt shows the following error information message.
When I run
psexec \\199.219.21.141 -u admin /c "C:\Compile.bat"
I'm prompted for password, and when I enter the password and press I get
Make sure that the default admin$ share is enabled on 199.219.21.141
(which is my machine ipaddress)
The user admin is part of the Local administrators on the server machine
Things I tried,
Turning off the UAC Turning OFF the Windows Firewall
Setting the LocalAccountTokenFilterPolicy DWORD to 1 in, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Caching the user credentials using
cmdkey.exe /add:MACHINE_NAME_HERE /user:199.219.21.141\admin /pass:PASSWORD_HERE
psexec.exe \199.219.21.141 -i notepad
cmdkey.exe /delete:199.219.21.141
After trying to connect for some time, it again displays
Make sure that the default admin$ share is enabled on 199.219.21.141
Any ideas what am I doing wrong?

Related

cmd command "runas" equivalent in MacOS

i am facing an issue while using the mac. I need to use that PowerShell command on my mac to run application as domain user
runas /netonly /user:user_name "C:\Users\fwa\AppData\Local\Programs\Azure Data Studio\azuredatastudio.exe"
I have tried
sudo -u user_name /Applications/AzureDataStudio.app
it asks password for local user. but in my case user is on External domain
To run Azure Data Studio (ADS) on your mac and login to SQL Server using Windows authentication instead of a username/password, you use the kinit command. I've had best luck using the kinit command through the built-in command window in ADS (you'll be prompted to do so if/when your login fails). Note that your computer needs network access to a kerberos server.
There's some further information about setting this up HERE and HERE.

Forgotten administrator password in windows 2003 server

I tried to reset administrator password from following steps is below but unable to change administrator password.
Set the server computer to boot from USB Bootable drive, and boot the server from Windows server bootable image.
2.When install options appear, I select repair windows by command.
3.When command prompt appears, I type in command prompt "net user administrator password123" to reset the new password to the administrator user.
4.And reboot the computer after reboot I tried to login with new password but unable to login.
So please help me.
You can use offline nt password and registry editor. Here http://pogostick.net/~pnh/ntpasswd/ is the original source.

How to connect as NT AUTHORITY\SYSTEM to svn?

I have a service running at local system account (NT AUTHORITY\SYSTEM). This service shall connect to local subversion repository. Is this possible?
I tried this
svn export --non-interactive http://localhost/svn/MyRepository TargetFolder
but it does not work. As far as I know I cannot set any password for "NT AUTHORITY\SYSTEM". I don't like to use my personal account and put my password there as clear text.
My SVN runs on VisualSVN-Server
You should never use SYSTEM account for such tasks for numerous security reasons. Create and use a dedicated local Windows or Active Directory account with limited permissions.
Setting up the cached authentication credentials for the System user requires running an svn.exe command as the System user. Windows Vista+/Server 2008+ doesn't make that easy.
​Install psexec from https://learn.microsoft.com/en-us/sysinternals/downloads/psexec
Start an elevated cmd.exe as Administrator.
Run "psexec -i -s cmd.exe".
A new cmd.exe should appear which is running as the System user.
Type whoami. Verify the output reads something like "nt authority\system".
Perform a subversion command like "svn --username your-svn-user list your-https-repo-url".​
When prompted by svn.exe, enter the password for your-svn-user.
​The "svn auth" command allows you to examine the cached credentials.
Note if a new SSL certificate is installed on the Subversion server, you'll have to repeat this process.
For more responses on this topic: How do you run CMD.exe under the Local System Account?

Tasklist Remote doesnt work

GoodMorning all,
I am having some problems with the tasklist /s [servername] -u [user] -p [password]
I am on an windows 7 machine and i whant to view the tasks on my windows xp.
So i do this
tasklist /s \192.168.1.105 -u Administrator -p MyPass
The error i am recieving is unknown user or invalid password.
I am 100% positive that the username and password is correct cause i also log in with those credentials on my windows xp pc.
When i am on my windows xp and willing to do tasklist to my windows 7 pc its working fine.
Both PC's dont have an domein but are in the same WORKGROUP
Services are started on win xp. No firewall is active.
I also tried PSTools but also that one is not connecting to the windows XP machine.
Any help will be appriciated.

Re-enable Remote Desktop Windows Firewall Rule on Windows Azure

I have disabled the remote desktop firewall rule in a Windows Azure virtual machine.As you would expect, I can no longer remote desktop in to the server.
Does anyone know if it is possible to re-enable the Remote Desktop Windows firewall rule?
What I have tried
As a long shot, I have downloaded the Windows Azure CLI but can't see anything in there that would do it but have not found anything.
I have also tried to execute the following command against the MSSQL server:
EXEC xp_cmdshell 'netsh advfirewall firewall set rule group="remote desktop" new enable=Yes';
GO
I am getting the following message from the query:
The requested operation requires elevation (Run as administrator).
Please tell me I don't have to re-create the site (which is backed up).
If you're using a VM inside a resource group with the new azure portal, you can do this:
Click reset password
Change mode to "Reset configuration only"
Click update and wipe your sweat off :)
It turns out that all I needed to do was to PowerShell into the Azure VM.
Steps:
Make sure PowerShell is enabled in the Endpoints section of the Azure portal.
Get the server's certificate (PowerShell needs this for remote commands). You can get the server certificate by going to your domains' URL: https://yourdomaing.cloudapp.net:12345 (where :12345 is the port that PowerShell uses).
Export the SSL certificate of the site as a .CER file and install it on your local machine.
Save it to the "Trusted Root Certification Authorities" store on your machine.
Open PowerShell with administrative privileges on your local machine and type:
Enter-PSSession -ComputerName yourdomain.cloudapp.net -Port 5986 -Credential YourUserName -UseSSL
A login popup will appear, enter your VM's login credentials here.
You will now be able to execute commands against the Azure VM. In my case, I ran netsh advfirewall firewall set rule group="remote desktop" new enable=Yes and exited the PowerShell session and was able to remotely connect to my machine.

Resources