You have a Windows PowerShell script that contains the follo

题目
单选题
You have a Windows PowerShell script that contains the following code:   import-csv Accounts.csv | Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword  $_.password}   When you run the script, you receive an error message indicating that the format of the password is  incorrect. The script fails.   You need to run a script that successfully creates the user accounts by using the password contained in  accounts.csv.   Which script should you run()
A

import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword convertTo-SecureString Password -AsPlainText -force)}

B

import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword convertTo-SecureString $_.Password -AsPlainText -force)}

C

import-csv Accounts.csv foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword Read-Host -AsSecureString Password)}

D

import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true -AccountPassword (Read-Host -AsSecureString $_.Password)}

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You need to design phase one of the new authentication strategy. Your solution must meet business requirements.What should you do?()

  • A、Install a Windows Server 2003 enterprise root CA, Configure certificate templates for autoenrollment
  • B、Install a Windows Server 2003 enterprise subordinate CA, Configure certificate templates for autoenrollment
  • C、Install a Windows Server 2003 stand-alone subordinate CA, Write a logon script for the client computers in the HR department that contains the Certreq.execommand
  • D、Install a Windows Server 2003 stand-alone root CA,Write a logon script for the client computers in the HR department that contains the Certreq.execommand

正确答案:B

第2题:

You work as a network administrator at ABC.com.The ABC.com network consists of a single domain named ABC.com.  All servers on the ABC.com network have Windows Server 2012 R2 installed and all client computers have Windows 8 installed.The ABC.com network contains a domain controller named ABC_DC04 and member server named ABC_SR11.ABC_SR11 runs a Core Installation of Windows Server 2012 R2.How would you configure THESABCING_DC04 to remotely view the event log on ABC_SR11?()

  • A、You should use the Windows Powershell to run the Get-NetFirewallRule command.
  • B、You should use the Windows Powershell to run the Set-NetFirewallProfile command
  • C、You should use the Windows Powershell to run the New-NetIPsecRule command.
  • D、You should use the Windows Powershell to run the Show-NetIPsecRule command.

正确答案:A

第3题:

Your network contains a server that runs Windows Server 2008 R2.You plan to create a custom script.You need to ensure that each time the script runs, an entry is added to the Application event log.Which tool should you use?()

A.Eventcreate

B.Eventvwr

C.Wecutil

D.Wevtutil


参考答案:A

第4题:

You have an Exchange Server 2010 organization. You need to install the Hub Transport server role on a new server. You install all the prerequisites for the Hub Transport role on the server.  What should you do next()? 

  • A、From Windows PowerShell, run the Add-WindowsFeature cmdlet.
  • B、From Windows PowerShell, run the Install-TransportAgent.ps1 script.
  • C、At the command prompt, run Setup.com /M:Install /R:Ht.
  • D、At the command prompt, run ServerManagerCmd.exe -IP Exchange-HUb.xml.

正确答案:C

第5题:

Your network contains an Active Directory domain. The domain contains two domain controllers  named DC1 and DC2.   You perform a full backup of the domain controllers every night by using Windows Server Backup. You update a script in the SYSVOL folder.   You discover that the new script fails to run properly.   You need to restore the previous version of the script in the SYSVOL folder. The solution must minimize  the amount of time required to restore the script.  What should you do first()

  • A、Run the Restore-ADObject cmdlet.
  • B、Restore the system state to its original location.
  • C、Restore the system state to an alternate location.
  • D、Attach the VHD file created by Windows Server Backup.

正确答案:D

第6题:

Your network contains a server that runs Windows Server 2008 R2.You plan to create a custom script.You need to ensure that each time the script runs, an entry is added to the Application event log.Which tool should you use?()

  • A、Eventcreate
  • B、Eventvwr
  • C、Wecutil
  • D、Wevtutil

正确答案:A

第7题:

You have a Windows PowerShell script that contains the following code:   import-csv Accounts.csv | Foreach {New-ADUser -Name $_.Name -Enabled $true  -AccountPassword $_.password}     When you run the script, you receive an error message indicating that the format of the password  is incorrect. The script fails.     You need to run a script that successfully creates the user accounts by using the password  contained in accounts.csv.     Which script should you run()

  • A、import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (ConvertHost-
  • B、import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (ConvertTo-
  • C、import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (Read-To
  • D、import-csv Accounts.csv Foreach {New-ADUser -Name $_.Name -Enabled $true - AccountPassword (Read-Host

正确答案:B

第8题:

You configure and deploy a Group Policy object (GPO) that contains AppLocker settings.     You need to identify whether a specific application file is allowed to run on a computer.     Which Windows PowerShell cmdlet should you use()

  • A、Get-AppLockerFileInformation
  • B、Get-GPOReport
  • C、Get-GPPermissions
  • D、Test-AppLockerPolicy

正确答案:D

第9题:

You have three computers that run Windows 7. You use Windows PowerShell to perform remote administration tasks on all three computers. You need to remotely administer all three  computers by usingPowerShell.  Which PowerShell cmdlet should you use?()

  • A、Enable-PSRemoting
  • B、Enable-PSSessionConfiguration
  • C、New-PSDrive
  • D、New-PSSession

正确答案:D

第10题:

You have a single server that has a Server Core Installation of Windows Server 2012 R2. How would you install the graphical user interface (GUI) to this server?()

  • A、You should use Windows PowerShell to run the Enable-NetFirewallRule command.
  • B、You should use Windows PowerShell to run the Add-WindowsPackage command.
  • C、You should use Windows PowerShell to run the Install-WindowsFeature command.
  • D、You should use Server Manager console on to add the User Interfaces.
  • E、You should use Server Manager console to add the Infrastructure feature.
  • F、You should use Server Manager console to add the Windows feature.

正确答案:C

更多相关问题