powershell add user to the domain - powershell

I'm not really familiar with Powershell and I'm trying to use it to automate some manual work. I was able to get 'rename computer' and 'addComputerTotheDomain' scripts working but got stuck in this part below.I did a lot of research but I could't understand a lot the scripts that people post (like the meaning of acronyms [ADSI] OU...and so on) Here are the steps:
Login with the administrator account that you joined the domain with
Go to Control Panel --> User Accounts Click "Manage User Accounts"
Click "Add" User name: myUserName Domain: MYDOMAIN
Select "Administrator" for level of access
After clicking "Finish" click on the Advanced tab of the User Accounts window
Uncheck "Require users to press Ctrl+alt+Delete" check box
Click the "Advanced" button under "Advanced user management"
Click into the Users section under "Local Users and Groups"
Right click the Administrator account and click "Set Password", set as myPassword
Double click the Administrator account
"Password never expires" should be the only box checked in
the list on the General tab. "Account is disabled" is frequently
checked, uncheck it.
Click OK, close all windows, and log off. You can now login as mydomain.com\myUserName with myPassword as the password.
any help would be appreciated to get the first step started (add user name).
thanks a lot

Check out this blog, it should help you out http://blogs.technet.com/b/benp/archive/2007/03/05/benp-s-basic-guide-to-managing-active-directory-objects-with-powershell.aspx

Related

How to know who added a member to a group in Active Directory

There is a request we have received from HR department which is:
There is a member of group :X#companyname.com who added to a group: Groupname#company.com without an approval.
The HR would like to know who added that member and when?
I don't know if there is a command line using PowerShell to get the information we are looking for or I should first enable some event ID in AD or exchange server to be able see that.
Thank you.
Step 1: “User Account Management” Audit Policy
Perform the following steps to enable “User Account Management” audit policy:
Go to “Administrative Tools” and open “Group Policy Management” console on the primary “Domain Controller”.
In “Group Policy Management”, create a new GPO or edit an existing GPO. It is recommended to create a new GPO, link it to the domain and edit.
To create a new GPO, right-click the domain name in the left panel, and click “Create a GPO in this domain, and Link it here”. It shows the “New GPO” window on the screen. Provide a name (User Account Management in our case) and click “OK”.
The new GPO appears in the left pane. Right-click it and click “Edit” in the context menu. “Group Policy Management Editor” appears on the screen.
In this window, you have to set “Audit User Account Management” policy. To do that, navigate to “Computer Configuration” ➔ “Windows Settings” ➔ “Security Settings” ➔ “Advanced Audit Policy Configuration” ➔ “Audit Policies”.
Select “Account Management” policy to list all of its sub-policies. Double-click “Audit User Account Management”’ policy to open its “Properties” window
Note: Instead of configuring “Local Policy, it is recommended to configure above policy in “Advanced Audit Policy Configuration”. This is because you have to enable all account management policies in “Local Policy” that will generate huge amount of event logs. To minimize the noise, “Advanced Audit Policy Configuration” should be preferred.
Figure 1: The “Audit User Account Management” policy
In policy properties, click to select “Define these policy settings” checkbox. Then, select the “Success” and the “Failure” attempts check boxes. You can choose any one or both the options as per your need. In our case, we have selected both of the options as we want to audit both the successful and the failed attempts.
Figure 2: Properties of “Audit User Account Management” policy
Click “Apply”, and “OK” to close the properties window.
It is recommended to update the Group Policy instantly so that new changes can be applied on the entire domain. Run the following command in the “Command Prompt”:
Gpupdate /force
In the following image, you can see the “Gpupdate” command run.
Figure 3: Updating the Group Policy
Step 2: Track user account changes through Event Viewer
To track user account changes in Active Directory, open “Windows Event Viewer”, and go to “Windows Logs” ➔ “Security”. Use the “Filter Current Log” option in the right pane to find the relevant events.
The following are some of the events related to user account management:
Event ID 4720 shows a user account was created.
Event ID 4722 shows a user account was enabled.
Event ID 4740 shows a user account was locked out.
Event ID 4725 shows a user account was disabled.
Event ID 4726 shows a user account was deleted.
Event ID 4738 shows a user account was changed.
Event ID 4781 shows the name of an account was changed.
In our lab environment, we have enabled a disabled user account. The following image shows the event’s properties window’s screenshot (event Id 4722). The user’s name who enabled the account is shown under “Subject ➔ Account Name” field, and the account-enable time is displayed under “Logged” field.
Figure 4: A user account was enabled
To see the user’s name whose account was enabled, you will have to scroll down the event’s property window’s side bar. In the following image, you can see the user’s name under “Target Account ➔ Account Name” field.
Figure 5: The user’s name whose account was enabled

Connect Yubikey key to GitHub

I recently purchased a YubiKey for two-factor authentication, but I don't know how to connect it to GitHub.
Can anyone help me?
Step 1: Enable Two-factor authentification on your GitHub account
Sign in to your GitHub account.
Click your profile picture in the top right of the screen.
Select Settings
In the left panel, select Security
Click Enable two-factor authentification
Choose the method of you want to receive one-time passwords, Set up by using an app or Set up using SMS
Step 2: Adding your Yubikey for two-factor authentification
Sign in to your GitHub account.
Click your profile picture in the top right of the screen.
Select Settings
In the left panel, select Security
To the right of "Security keys", click Add.
Insert your YubiKey into USB port.
In the Security keys section, click Register new device.
Type a nickname for your YubiKey, then click Add.
Wait your YubiKey to begin flashing, then tap the gold button or edge.
For more information: https://yubikey.com.ua/en/using-yubikey-with-github/

'Add Account' doesn't display new options on MySQL Workbench

I've linked MySQL to Heroku and am now trying to add user accounts through MYSQL Workbench. I'm using this and this as guides, but I don't see anything new after clicking Users and Privileges -> Add Account. After pressing on the 'Add Account' button on the Users and Privileges page, three buttons (add account, delete, and refresh) gray out and two buttons (revert and apply) become active, but nothing else changes on my screen. For reference, this is what I see after pressing Add Account:
If I then press on Apply, I get a 'Save Account Changes' notification that tells me "It is a security hazard to create an account with no password. Please confirm creation of newuser'#'%' with no password."
Am I missing something? How do I get to the page where I can set the user account details?

Disable wifi password remembering in windows 7

I'd like to disable password remembering in windows 7 in laptop. What I have done is that I have deleted wifi name in settings of network from list. Now I have to connect manualy with this network but windows still remembers password.
How to force it to ask every time for the network password? Can someone write step by step what should I do etc.? I'm getting nervous about it.
Open User Accounts by clicking the Start button Picture of the Start button, clicking Control Panel, clicking User Accounts and Family Safety (or clicking User Accounts, if you are connected to a network domain), and then clicking User Accounts.
In the left pane, click Manage your network passwords.
Click the password that you want to remove, and then click Remove.

ssrs 2008 - cant access reportsmanager with "browser" user

I have set up my reportsmanager page with two accounts to have access using the "folder settings" security role assignment page. I added two accounts, lets call them "user" and "reportuser". "user" is a content manager role. "reportuser" is a browser role.
Likewise under "Site settings" I set up my "user" as the system administrator and the "reportsuser" as system user.
When I launch the reportsmanager page locally while logged in as "user" then I can access the site correctly as I expect.
When I try to access reportsmanager while logged in as "reportsuser" then it tells me RSAccessDenied. "user" is a member of Administrators. "reportsuser" is a normal user.
Even though my "reportsuser" was set up as a site browser and a site settings config of system user I had to still launch IE as administrator (or completely disable UAC) to get my reportsuser able to view the page without an error. If I turned off UAC then this wasn't an issue but I have to leave UAC on. If you hit the reports manager page from XP it acts as normal. Stupid UAC.