Flashcards
Powershell
Cards in this deck (48)
- 1Version of Poweshell - which command$PSVersionTable
- 2Show a list of all verbsGet-Verb
- 3Get a list of approved verbs that begin with "un"Get-Verb un*
- 4Show all commands in PowershellGet-Command
- 5Show all commands starting with SetGet-Command -Verb 'Set'
- 6Get information about the PowerShell console hostGet-Host
- 7After getting Powerrshell Host, show versionGet-Host | Select-Object Version
- 8Show all services on the computerGet-Service
- 9Show the service name SpoolerGet-Service -name Spooler
- 10Record Powershell commands into C:\test.txt fileStart-Transcript C:\Test.txt
- 11Stop recording PowershellStop Transcript
- 12Record which is shown in Get-Service command into C:\test.txtGet-Service > C:\test.txt
- 13Add records of Get-Service into C:\test.txtGet-Service >> C:\test.txt
- 14Download new version of helpUpdate-Help
- 15Download updated files of Help and save it D:\HelpSave-Help -DestinationPath D:\Help
- 16Update help from D:\CodeUpdate-Help -SourcePath D:\Code
- 17Show commands which has service word insideGet-Command *service*
- 18View content of D:\test.txt file in shellGet-Content D:\test.txt
- 19Show modules imported into the current sessionGet-Module
- 20Show all availble modulesGet-Module -ListAvailable
- 21Show commands in Server Manager ModuleGet-Command -Module ServerManager
- 22Gets information about Windows Server roles, role services, and features that are available for installation and installed on a specified server.Get-WindowsFeature
- 23This example returns a list of available and installed features that have a command ID starting with AD or Web.Get-WindowsFeature -Name AD*, Web*
- 24Installs one or more roles, role services, or features on either the local or a specified remote server that is running Windows Server.Install-WindowsFeature
- 25Show display names of services starting with net(Get-Service net*).Displayname
- 26Create a new itemNew-Item
- 27Create a new file in current directory named testfile1.txtNew-Item -Path . -Name "testfile1.txt" -ItemType "file"
- 28This command creates a directory named "Logfiles" in the C: drive.New-Item -Path 'C:\' -Name 'logfiles' -ItemType 'directory'
- 29Change directory - not aliasSet-Location
- 30Show history of written commands in PowerShellGet-History
- 31Show alias of commandsGet-Alias
- 32gets the processes on a local or remote computer.Get-Process
- 33Show process named winlogonGet-Process - Name Winlogon
- 34Creates a new domain in an existing Active Directory forest.Install-ADDSDomain
- 35Displays PowerShell command information in a graphical window.Show-Command
- 36Assign new alias named list to Get-ChildItemNew-Alias -Name "List" Get-ChildItem
- 37Replace existing content in C:\test.txt with word testSet-content C:\test.txt -value "test“
- 38Add word example to C:\test.txtAdd-content C:\test.txt –value “example”
- 39Install remote-desktop-services, rds-rd-server, rd-licensingInstall-windowsfeature remote-desktop-services, rds-rd-server, rd-licensing
- 40Show childitem of E:\test.txt and access listGet-childItem C:\test.txt | Get-Acl |
- 41Show how to open notepad - 3 waysStart-process notepad
Start notepad
Spps –name notepad - 42Show how close notepadStop-Process –name notepad
- 43Write world 'Hello World' and add it E:\test.txt file by creating it"Hello world"| Out-File E:\test.txt
- 44Rename Computer FS1 to FS2Rename-Computer –ComputerName "FS1" -NewName "FS2«
- 45Disables an Active Directory account A.Mammadov.Disable-AdAccount -Identity A.Mammadov
- 46Remove- object Test from Active DirectoryRemove-ADObject -Identity “Test”
- 47Adds members Jackson and Franklin to Active Directory group named QualityAdd-AdGroupMember -Identity Quality -Members B.Jackson, E.Franklin
- 48Show the members of an Active Directory group Quality.Get-ADGroupMember -Identity Quality
Information
- Description
- Easy Comptia A Flashcards on Powershell, created by Archimed Nemes on 13/01/2022.
- Created by
- Archimed Nemes
- Views
- 0
- Rating