using windows stored credentials in task scheduler windows 2012 - powershell

Get Cached Credentials in PowerShell from Windows 7 Credential Manager
This shows how to use a logged in user credentials in a powershell script. Can the same process be used in Task scheduler, so that the entered username and pword for the task, is then used by script above to pull the stored credentials.
Using Windows 2012 Task Scheduler which is supposed to support this
Trying to lean away from any storing passwords in encrypted files.

Related

Which user is used windows authentication for connecting MSSQL in Windows task scheduler

Windows task scheduler has one author(it is a login user account) and one user account (This account is used when this task is running). Which user is used for windows authentication If this task scheduler used to run the Talend Jobs and these jobs used connecting to remote MSSQL using windows authentication.
When talend jobs are scheduled through task scheduler, it will use run user account for connecting to SQL Server. (Not the author account)

How to script out testing local user login success/fail in Azure using Powershell?

Is there a powershell command / script out there that would allow me to step through a list of VMs in a subscription (hundreds) and test whether or not a given local admin user is able to login to Windows? I'd like to tie in and log a response code on this logic for audit purposes but I can't find a Powershell command that tests logins to Windows...
Thanks!

Different with Microsoft Azure AD Module PowerShell and Microsoft Azure Powershell

I try run command Set-MsolDomainAuthentication with Microsoft Azure Active Directory Module for Windows PowerShell. But i get exception, when try connect to my azure account(connect-msolservice). I type email and password, then i get:
I try find solution in Google, Azure Support but everything what i find is useless.
On my system, I have an application which is called Microsoft Azure PowerShelllink. In this app, i can connect with my azure account, through command Add-AzureAccount. But this time, i don't find analogue to Set-MsolDomainAuthentication.
This command exists in Azure PowerShell?
I can change Azure AD other way, like command Set-MsolDomainAuthentication? Maybe Azure Admin Panel? Or GraphApi?
I had a similar issue with Powershell. This exception i getting when I try logging credential from account MicrosoftLive. Powershell required account in your domain.
So:
Create a new user in a azure domain in role GlobalAdmin, change password this user, by logging in Office365, enter the PowerShell Credential this user.
Good luck.

Run PowerShell as administrator and a different user

In my company I used to code on one of our domain controllers (DCs) with Windows Server 2012. However since I can not do it there anymore, I am now forced to code on my workstation using my normal user account instead of my domain administrator account.
The problem I encountered now was that when I run PowerShell as administrator I can use "Set-ExecutionPolicy unrestricted", but I don't have full access to our DFS filesystem since I am not the domain administrator with this account.
When I start PowerShell as the domain administrator I can not set the execution policy since I didn't run PowerShell as administrator.
How can I run PowerShell as administrator and domain administrator?

Is it possible to get user credentials from AD and use it to run some app with that credentials?

I want to control thinreg.exe util via powershell script. This util is used for registering vmware thinapp packages on the system(it creates shorcuts and add registry entries under HKCU hive.)
If I run my ps script as admin then also thinreg runs under admin account and register app to the admin.
So it is possible to get user credentials from AD and use them to run PS script or just thinreg util ?
I'm domain admin and other users are domain users. AD is win 2008r2 and client OSes are winXP sp3.
Thank you very much.
EDIT
Is it possible to install windows service via login script so that would run under logged user account ?
Via this service I could then control thinreg.exe util
I would try two ways.
Add the powershell script run once during the logon script of the user
If user are using roming profiles, try to modify their profiles when they are logged off.
If you want to be more "interactive", and do it as the user is log in, you can try to play with PSTOOLS you can have a look to this post to have an example how to call your powershell script from PSTOOLS.