Question

In: Computer Science

Hello, #1 I am asked to create a Windows user account that is a non-admin user...

Hello,

#1 I am asked to create a Windows user account that is a non-admin user using a.ps1 file. At first, I used the New-LocalUser cmdlet, but this cmdlet does not show up as a user on the start menu of my computer and I cannot use it to log in as another user on my computer. So, instead of using that cmdlet, what could I use to create a Windows user account that I can also log into?

#2 I am asked to create a security group. Is 'New-LocalGroup -Name "SecurityGroup" the same cmdlet you use to create a security group?

I am then asked to add a member to the security group, is this how you do it? Add-LocalGroupMember -Group "SecurityGroup" -Member "NewMember01"

I wonder if this is correct because it seems as though I have only created a 'group' and not a 'security' group. If this is true, how could I create a security group?

Really appreciate your help!

Solutions

Expert Solution

Answer:

New-LocalUser "newUser" -FullName "New User" -Description "New user account created for test." -NoPassword

In order to add a new user named newUser please use the New-LocalUser command.

Kindly note that New-LocalUser just creates a user but doesn't add them to any group/security group. This is why you are not able to see newUser in the login option. You need to add user to a group in order to make it work.

Add-LocalGroupMember -Group "Users" -Member "newUser"

You can add user to Users group using this command, it has non-admin privileges. After adding it to the group Users, We can see the new user listed in start menu and User accounts.

You can find list of users using

Get-LocalUser

For second part of question:

Security groups are used give users access and limit the operations they can perform, so groups are the 'security' groups. The New-LocalGroup cmdlet creates a local security group in the Security Account Manager.

You can make a new security group and add new user by following commands:

New-LocalGroup -Name "SecurityGroup"

Add-LocalGroupMember -Group "SecurityGroup" -Member "newUser"

Kindly make sure you're running the .ps1 file from a user that has Administrator rights.

And run powershell as Administrator.

If you have any further questions, please comment on the answer, I will be happy to help.


Related Solutions

Write a Powershell script to create a Windows user account that is a non-admin user. This...
Write a Powershell script to create a Windows user account that is a non-admin user. This assignment assumes that you already have a Windows VM, with the administrator account created.. To complete the assignment, write the PowerShell script, run it on your VM, and submit the script here.
Hi, Quick question regarding writing a Powershell script and creating a windows non-admin user account, is...
Hi, Quick question regarding writing a Powershell script and creating a windows non-admin user account, is this how you do it? Wanna know if I'm on the right track please and thanks! $Username = "AnnieSue" $Password = "78Annie" $group = "Users" $adsi = [ADSI]"WinNT://$env:COMPUTERNAME" $existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username } if ($existing -eq $null) {    Write-Host "Creating new local user $Username."    & NET USER $Username $Password /add /y /expires:never    Write-Host "Adding local user...
Java ArrayList Parking Ticket Simulator, Hello I am stuck on this problem where I am asked...
Java ArrayList Parking Ticket Simulator, Hello I am stuck on this problem where I am asked to calculate the sum of all fines in the policeOfficer class from the arraylist i created. I modified the issueParking ticket method which i bolded at the very end to add each issued Parking ticket to the arrayList, i think thats the right way? if not please let me know. What I dont understand how to do is access the fineAmountInCAD from the arrayList...
Hello, I am working on an assignment but I am unsure of how to solve it....
Hello, I am working on an assignment but I am unsure of how to solve it. Please help me. The assignment details are below. Consider this scenario: Your friend starts a website, nothingbutflags.com, which is not making money. Your friend asks you to help generate more traffic. You ask your friend how much traffic the website had last month? And your friend replies and says only 500 visits. You also ask how many flags did you sell? Your friend replies...
Hello, I am working on an assignment but I am unsure of how to solve it....
Hello, I am working on an assignment but I am unsure of how to solve it. Please help me. The assignment details are below. Consider this scenario: Your friend starts a website, nothingbutflags.com, which is not making money. Your friend asks you to help generate more traffic. You ask your friend how much traffic the website had last month? And your friend replies and says only 500 visits. You also ask how many flags did you sell? Your friend replies...
Hello, I am studying and I am a bit confused about registers. There are segments registers,...
Hello, I am studying and I am a bit confused about registers. There are segments registers, data registers, pointer registers, index registers. But I do not really understand where these are found. Are they found in 8086 architecture? For instance if I ask what type of registers are found in 8086 architecture what will be the answer? All of these or only segment registers?
I am asked to create a table of reducing potentials by setting ANY of the half-cell...
I am asked to create a table of reducing potentials by setting ANY of the half-cell potential to 0V. Show calculations. My half-cells and their Eocell is : Ag+ + e- = Ag(s) 0.80V Cu2+ + 2e- = Cu(s) 0.34V Pb2+ + 2e- = Pb(s) -0.13V Sn2+ + 2e- = Sn(s) -0.14V Fe2+ + 2e- = Fe(s) -0.44V Zn2+ + 2e- = Zn(s) -0.76V Mg2+ + 2e- = Mg(s) -2.37V
Hello! I am stuck on only B-1 Recession EPS - I got everything else and I...
Hello! I am stuck on only B-1 Recession EPS - I got everything else and I cannot figure out what I'm doing wrong - I keep getting $4.81, but it's incorrect and I don't know why. Can you help? I pasted my numbers below the question. Sunrise, Inc., has no debt outstanding and a total market value of $240,900. Earnings before interest and taxes, EBIT, are projected to be $40,000 if economic conditions are normal. If there is strong expansion...
I am having a trouble with a python program. I am to create a program that...
I am having a trouble with a python program. I am to create a program that calculates the estimated hours and mintutes. Here is my code. #!/usr/bin/env python3 #Arrival Date/Time Estimator # # from datetime import datetime import locale mph = 0 miles = 0 def get_departure_time():     while True:         date_str = input("Estimated time of departure (HH:MM AM/PM): ")         try:             depart_time = datetime.strptime(date_str, "%H:%M %p")         except ValueError:             print("Invalid date format. Try again.")             continue        ...
Hello, I am having difficulty with this assignment. I chose Amazon as my stock, but I...
Hello, I am having difficulty with this assignment. I chose Amazon as my stock, but I am confused on what they're asking :             Choose a stock that interests you. Utilizing Bloomberg (or other financial websites) as a source of data, collect the following      information:                         a. The stock’s Beta                         b. The rate of return on the market (S&P 500 Index)                         c. The risk-free rate (rRF)                         d. The last dividend paid (D0)...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT