run a .bat file without being logged in to windows account - scheduled-tasks

I would like to connect my dial up broadband pppoe when my system starts without logging into my account on windows 8.1, I have successfully running some other programs like team viewer apache, mysql, filezilla server using windows task scheduler. SO i have also created a .bat file using rasdial to connect my dialup connection the code is
rasdial connection_name username pass
rasdial connection_name /d
rasdial connection_name username pass
this works fine when I double click on it but it is not working with windows task scheduler but why?

Related

Jenkins couldn't run exe installer

Created Jenkins job to run silent installation of my application, the application installer is exe file.
tried with Windows Exe Runner - setup.exe /s
tried with PowerShell job - - setup.exe /s
In both cases I get the same issue:
System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
If I run the command manually on the machine from PS run as administrator it will silently install my application in the background without errors.
Suppose it is problem with Jenkins privileges on the server machine, Jenkins is run as a service using Admin credentials.

PsExec connects using system name but not ipAddress

I need to use my local computer to simulate a test stand which will be on a domain and access a remote computer which is on a workgroup using PsExec. The testing computer is built from an imaging tool. The IP will be the same every time but the name isn't. The process I'm working with was used on an embedded XP system and is now being upgraded to WIN10. I've added network security using GPO and have found workarounds to be able to open the connection but for some reason just trying to run cmd on the remote machine does not work when using the IP, only the name. Using the IP returns the "access is denied" error. I have already added the token filter key to the registry. Has anyone heard of something like this before?
I have a script I'm trying to run but in the meantime I'm just trying to get
psexec \IP_ADDERESS -h -u USER_NAME(this is an admin) -p PASSWORD cmd
edit: I have to keep my computer on a domain but I have a spare that I was able to put on a workgroup with the test system. Running psexec went perfect. It makes no sense why it works for the name and not ip on a domain->workgroup connection and works exactly how I need it to on a workgroup->workgroup connection.

Is it possible to run Copy-VMFile powershell command as non-admin?

I have a host machine with Hyper-V enabled, and I have a Hyper-V guest running on this machine. Becauze I can't drag&drop files to the VM, I wrote a script to do this for me, which is integrated in TotalCommander, and which uses Copy-VMFile.
My problem is that the PS script works only if I run it as admin, otherwise I get the error "You do not have the required permission to complete this task."
Why do I need admin to copy from the host machine to the guest OS? And is there a way, some policy which would allow me to circumvent this? It is annoying to enter a password every time I want to copy some files.

Autoit Script to start Powershell on remote server using Teamviewer Session

I am trying to automate the access process using teamviewer session. I have to kick Powershell script kept on remote server using autoit script and problem i am facing is autoit not recognizing the remote connection. Below is one i tried.. Running Teamviewer from my local and authenticating the server using TV session ID and password and once i logged in kicking powershell console to execute the script.
Run("C:\Program Files (x86)\TeamViewer\TeamViewer.exe")
WinWaitActive("TeamViewer")
Sleep(5000)
Send("213322822")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
sleep(2000)
WinWaitActive("TeamViewer Authentication")
Send("abcd#123",1)
Send("{ENTER}")
Run("C:\system32\WindowsPowerShell\v1.0\powershell.exe")

Alternatives for PsExec which works in standard user

I am using psexec to execute commands on remote server. Here is my command,
PsExec.exe" -u user \\server -h run.bat
I am entering the password manually. here I am using standard user account due to security issues. When I run the command I am getting the error,
"Make sure that the default admin$ share is enabled"
I read here that it cannot be done without admin privileges.
But when I test the same command in LAN it works in standard user.
How it works in LAN not in Remote server ?
Is there any alternative tools which will work in standard user ?
Please help me.
As an alternate tool, you can use Powershell and WinRM. Powershell allows you to execute a command, or an interactive session, on the remote windows server.
An example of executing a command is available here:
How to programmatically/remotely execute a program in EC2 Windows instance
If you need an interactive session, look at the Powershll command 'Enter-PSSession': https://technet.microsoft.com/en-us/library/hh849707.aspx