GoConqr has a new look! Let us know what you think.

Flashcards

Powershell Commands (329 start)

Zach Blake English 39 cards

Cards in this deck (39)

  1. 1How to add a network adapter?add-vmnetworkadapter -vmname "" -switchname ""
  2. 2How to Remove network adapter from VMremove-vmnetworkadapter -vmname " -vmnetworkadapter "
  3. 3Add an external virtual switch to hyper vnew-vmswitch -name " -netadaptername "
  4. 4Add a private virtual switch to hyper vnew-vmswitch -name " -switchtype private
  5. 5Enable Virtual Machine Queue (VMQ)enable-netadaptervmq -name nic1
  6. 6Create Virtual switch with SET enablednew-vmswitch -name setswitch -netadaptername "nic1","nic2" -
    enableembeddedteaming $true
  7. 7add new virtual network adapters to your VMsadd-vmnetworkadapter -vmname server1 -switchname setswitch -
    name set1
  8. 8provide virtual processor with access to the virtualization technology on the physical computerset-vmprocessor -vmname server1 -exposevirtualizationextensions
    $true
  9. 9install the DockerMsftProvider moduleinstall-module -name dockermsftprovider -repository psgallery -
    force
  10. 10download and install Dockerinstall-package -name docker -providername dockermsftprovider
  11. 11Download and install docker powershell moduleregister-psrepository -name dockerps-dev -sourcelocation
    https://ci.appveyor.com/nuget/
    docker-powershell-dev
    373
    install-module docker -repository dockerps-dev -scope
    currentuser
  12. 12download an image from docker repo (Not PS)docker pull microsoft/windowsservercore
  13. 13Tag an uploadable docker imagedocker tag username/imagename:tag
  14. 14Remove Docker images you don't needdocker rmi -f microsoft/nanoserver:10.0.14393.206_de-de
    docker rmi -f a896e5590871
  15. 15creates a new container with the Server Core image downloaded from Docker Hubdocker run -it microsoft/windowsservercore powershell
  16. 16creating a Hyper-V container with dockerdocker run -it --isolation=hyperv microsoft/windowsservercore
    powershell
  17. 17Start Stop container (powershell vs docker.exe)docker start dbf9674d13b9
    docker stop dbf9674d13b9
    start-container dbf9674d13b9
    stop-container dbf9674d13b9
  18. 18connect to session on running container (powershell vs docker.exe)docker attach dbf9674d13b9
    Enter-containersession dbf9674d13b9
    or Attach-Container
  19. 19Save container mods (powershell vs docker)docker commit dbf9674d13b9 hholt/killerapp:1.5
    convertto-containerimage -containeridorname dbf9674d13b9 -
    repository hholt/killerapp
    -tag 1.5
    or Commit-Container
  20. 20Remove container, even if its running (powershell vs docker.exe)docker rm -f dbf9674d13b9
    remove-container dbf9674d13b9
  21. 21add port mapping with dockerdocker run -it -p 8080:80 microsoft\windowsservercore
    powershell
  22. 22create transparent network in dockerdocker run -it -p 8080:80 microsoft\windowsservercore
    powershell
  23. 23Create data volume in dockerdocker run -it -v c:\appdata microsoft/windowsservercore
    powershell
  24. 24name container when creating itdocker run -it microsoft/windowsservercore powershell --name
    core1
  25. 25simple Hyper-V Replica configurationset-vmreplicationserver -replicationenabled $true -
    allowedauthenticationtype kerberos
    -replicationallowedfromanyserver $true -defaultstoragelocation
    d:\replicas
  26. 26Configure firewall for kerberos replicationenable-netfirewallrule -displayname "hyper-v replica http
    listener (tcp-in)"
  27. 27live migrationMove-vm -vm server1 -destinationhost hyper2
  28. 28new clusternew-cluster -name cluster1 -node server1,server2 -staticaddress
    10.0.0.3
  29. 29adding reg key to bypass admin account on multi-domain clusternew-itemproperty -path
    hklm:\software\microsoft\windows\currentversion\policies\system
    -name localaccounttokenfilterpolicy -value 1
  30. 30configure quorum with votes from each node and a disk witnessset-clusterquorum -cluster cluster1 -nodeanddiskmajority "cluster disk 1"
  31. 31authoritative restorewbadmin start recovery -itemtype:app -items:cluster -
    version:01/01/2008-00:00
  32. 32configuring CAU cluster roleadd-cauclusterrole -clustername "cluster1" -daysofweek sunday -weeksinterval 3
    -maxretriespernode -nodeorder node2, node1, node3
  33. 33add cluster shared voume (CSV)add-clustersharedvolume -name "cluster disk 5"
  34. 34create AD detached clusternew-cluster cluster1 –node node1,node2 –staticaddress 10.0.0.1
    -nostorage –
    administrativeaccesspoint dns
  35. 35SoFS share creationnew-smbshare -name share1 -path c:\clusterstorsge\volume1 -
    fullaccess adatum\cluster1,
    adatum\node1, adatum\node2
    -continuouslyavailable set-smbpathacl –sharename share1
  36. 36configure cloud witnessset-clusterquorum -cloudwitness -accountname clusterstorage1 -
    accesskey
    oyhmhpi1x9q5htonrcxhcnpz0xzw2zgf49lgdwmexn5lr7xcdrenuxtlxujdpfw
  37. 37enable storage spaces directenable-clusterstoragespacesdirect
  38. 38configure vm monitoringadd-clustervmmonitoreditem –virtualmachine clustervm3 -service
    spooler
  39. 39site-aware failover cluster creationnew-clusterfaultdomain –name ny –type site –description "primary" –location "new york ny"
    new-clusterfaultdomain –name sf –type site –description "secondary" –location "san francisco ca"
    set-clusterfaultdomain –name node1 –parent ny
    set-clusterfaultdomain –name node2 –parent ny
    set-clusterfaultdomain –name node3 –parent sf
    set-clusterfaultdomain –name node4 –parent sf

Information

Description
Flashcards on Powershell Commands (329 start), created by Zach Blake on 04/10/2017.
Created by
Zach Blake
Views
4
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?