Containers

We already see in a previous post, how to enable containers, and how they are shipped inside Windows 10, under programs and features, as a Windows New Feature.

The containers are a new kind of virtualization way. Where you simply aboard your host operating system and brings a separate memory space where you instance a Virtual space to install an application.

The benefits are bunch counts, they deploy faster, they use less space, you can install them into Nano Servers…

PowerShell Survival kit

This is another script-pool so be my guest, enjoy exploring. try. learn. and apply on your daily basis.
#To get help on any cmdlet use get-help
Get-Help Get-Service
#To get all available cmdlets use get-command
Get-Command
#To get all properties and methods for an object use get-member
Get-Service | Get-Member
#Setting Security Policy
#View and change execution policy with Get-Execution and Set-Execution policy
Get-Executionpolicy
Set-Executionpolicy remotesigned
#To Execute Script
powershell.exe –noexit &”c:\myscript.ps1”
#Functions
#Parameters separate by space. Return is optional.
function sum ([int]$a,[int]$b)
{
return $a + $b
}
sum 4 5
#Variables
#Must start with $
$a = 32
#Can be typed
[int]$a = 32
#Arrays
#To initialise
$a = 1,2,4,8
#To query
$b = $a[3]
#Constants
#Created without $
Set-Variable –name b –value 3.142 –option constant
#Referenced with $
$b
#Creating Objects
#To create an instance of a com object
New-Object -comobject <ProgID>
$a = New-Object –comobject “wscript.network”
$a.username
#To create an instance of a .Net Framework object.  Parameters can be passed if required
New-Object –type <.Net Object>
$d = New-Object -Type System.DateTime 2006,12,25
$d.get_DayOfWeek()
#Writing to Console
#Variable Name
$a
#or
Write-Host $a –foregroundcolor “green”
#Capture User Input
#Use Read-Host to get user input
$a = Read-Host “Enter your name”
Write-Host “Hello” $a
#Passing Command Line Arguments
#Passed to script with spaces
myscript.ps1 server1 benp
#Accessed in script by $args array
$servername = $args[0]
$username = $args[1]
#Miscellaneous
#Line Break `
Get-Process | Select-Object `
name, ID
#Comments #
# code here not executed
#Merging lines ;
$a=1;$b=3;$c=9
#Pipe the output to another command |
Get-Service | Get-Member
#Do While Loop
#Can repeat a set of commands while a condition is met
$a=1
Do {$a; $a++}
While ($a –lt 10)
#Do Until Loop
#Can repeat a set of commands until a condition is met
$a=1
Do {$a; $a++}
Until ($a –gt 10)
#For Loop
#Repeat the same steps a specific number of times
For ($a=1; $a –le 10; $a++)
{$a}
#ForEach – Loop Through Collection of Objects
#Loop through a collection of objects
Foreach ($i in Get-Childitem c:\windows)
{$i.name; $i.creationtime}
#If Statement
#Run a specific set of code given specific conditions
$a = “white”
if ($a -eq “red”)
{“The colour is red”}
elseif ($a -eq “white”)
{“The colour is white”}
else
{“Another colour”}
#Switch Statement
#Another method to run a specific set of code given specific conditions
$a = “red”
switch ($a)
{
“red” {“The colour is red”}
“white”{“The colour is white”}
default{“Another colour”}
}
#Reading From a File
#Use Get-Content to create an array of lines.  Then loop through array
$a = Get-Content “c:\servers.txt”
foreach ($i in $a)
{$i}
#Writing to a Simple File
#Use Out-File or > for a simple text file
$a = “Hello world”
$a | out-file test.txt
#Or use > to output script results to file
.\test.ps1 > test.txt
#Writing to an Html File
#Use ConvertTo-Html and >
$a = Get-Process
$a | Convertto-Html -property Name,Path,Company > test.htm
#Writing to a CSV File
#Use Export-Csv and Select-Object to filter output
$a = Get-Process
$a| Select-Object Name,Path,Company | Export-Csv -path test.csv

Cmd-lets for Active Directory

Hi, as you know I love the PowerShell and try to bring you resources for it. today I found this valuable resource. try to paste this content below in your PowerShell ISE.

##CMD Switch
#PowerShell Cmdlet
#Module Version
#DCPROMO
Install-ADDSForest
Install-ADDSDomain
Install-ADDSDomainController
Uninstall-ADDSDomainController
#ADDSDeployment 2012
#CSVDE
Get-ADObject | Export-CSV
#ActiveDirectory 2008 R2
#CSVDE i
Import-CSV | New-ADObject
#ActiveDirectory 2008 R2
#DSGET computer
Get-ADComputer
#ActiveDirectory 2008 R2
#DSGET contact
Get-ADObject -LDAPFilter ‘(objectClass=contact)’
#ActiveDirectory 2008 R2
#DSGET subnet
Get-ADReplicationSubnet
#ActiveDirectory 2012
#DSGET group
Get-ADGroup
#ActiveDirectory 2008 R2
#DSGET ou
Get-ADOrganizationalUnit
#ActiveDirectory 2008 R2
#DSGET site
Get-ADReplicationSite
#ActiveDirectory 2012
#DSGET server
Get-ADDomainController
#ActiveDirectory 2008 R2
#DSGET user
Get-ADUser
#ActiveDirectory 2008 R2
#DSGET quota
Get-ADObject -SearchBase (Get-ADDomain).QuotasContainer -Filter *
#ActiveDirectory 2008 R2
#DSGET partition
Get-ADObject -SearchBase (Get-ADForest).PartitionsContainer -LDAPFilter ‘(objectClass=crossRef)’
#ActiveDirectory 2008 R2
#DSQUERY computer
Get-ADComputer
Search-ADAccount
#ActiveDirectory 2008 R2
#DSQUERY contact
Get-ADObject -LDAPFilter ‘(objectClass=contact)’
#ActiveDirectory 2008 R2
#DSQUERY subnet
Get-ADReplicationSubnet
#ActiveDirectory 2012
#DSQUERY group
Get-ADGroup
#ActiveDirectory 2008 R2
#DSQUERY ou
Get-ADOrganizationalUnit
#ActiveDirectory 2008 R2
#DSQUERY site
Get-ADReplicationSite
#ActiveDirectory 2012
#DSQUERY server
Get-ADDomainController
#ActiveDirectory 2008 R2
#DSQUERY user
Get-ADUser
Search-ADAccount
#ActiveDirectory 2008 R2
#DSQUERY quota
Get-ADObject -SearchBase (Get-ADDomain).QuotasContainer -Filter *
#ActiveDirectory 2008 R2
#DSQUERY partition
Get-ADObject -SearchBase (Get-ADForest).PartitionsContainer -LDAPFilter ‘(objectClass=crossRef)’
#ActiveDirectory 2008 R2
#DSQUERY *
Get-ADObject
#ActiveDirectory 2008 R2
#DSADD computer
New-ADComputer
#ActiveDirectory 2008 R2
#DSADD contact
New-ADObject -Type contact
#ActiveDirectory 2008 R2
#DSADD group
New-ADGroup
#ActiveDirectory 2008 R2
#DSADD ou
New-ADOrganizationalUnit
#ActiveDirectory 2008 R2
#DSADD user
New-ADUser
#ActiveDirectory 2008 R2
#DSADD quota
#DSMOVE
Move-ADObject
Rename-ADObject
#ActiveDirectory 2008 R2
#DSMOD computer
Set-ADComputer
#ActiveDirectory 2008 R2
#DSMOD contact
Set-ADObject
#ActiveDirectory 2008 R2
#DSMOD group
Set-ADGroup
#ActiveDirectory 2008 R2
#DSMOD ou
Set-ADOrganizationalUnit
#ActiveDirectory 2008 R2
#DSMOD server
Set-ADObject
#ActiveDirectory 2008 R2
#DSMOD user
Set-ADUser
#ActiveDirectory 2008 R2
#DSMOD quota
Set-ADObject
#ActiveDirectory 2008 R2
#DSMOD partition
Set-ADObject
#ActiveDirectory 2008 R2
#DSRM
Remove-ADComputer
Remove-ADGroup
Remove-ADGroupMember
Remove-ADUser
Remove-ADOrganizationalUnit
Remove-ADObject
#ActiveDirectory 2008 R2
#DSACLS
Get-ACL
Set-ACL
#Microsoft.PowerShell.Security 2008 R2
#REPADMIN /FailCache
Get-ADReplicationFailure
#ActiveDirectory 2012
#REPADMIN /Queue
Get-ADReplicationQueueOperation
#ActiveDirectory 2012
#REPADMIN /ReplSingleObj
Sync-ADObject
#ActiveDirectory 2012
#REPADMIN /ShowConn
Get-ADReplicationConnection
#ActiveDirectory 2012
#REPADMIN /ShowObjMeta
Get-ADReplicationAttributeMetadata
#ActiveDirectory 2012
#REPADMIN /ReplSummary
Get-ADReplicationPartnerMetadata
#ActiveDirectory 2012
#REPADMIN /ShowUTDVec
Get-ADReplicationUpToDatenessVectorTable
#ActiveDirectory 2012
#REPADMIN /SiteOptions
Set-ADReplicationSite
#ActiveDirectory 2012
#REPADMIN /ShowAttr
Get-ADObject
#ActiveDirectory 2008 R2
#REPADMIN /SetAttr
Set-ADObject
#ActiveDirectory 2008 R2
#REPADMIN /PRP
Get-ADDomainControllerPasswordReplicationPolicy
Add-ADDomainControllerPasswordReplicationPolicy
Remove-ADDomainControllerPasswordReplicationPolicy
Get-ADAccountResultantPasswordReplicationPolicy
Get-ADDomainControllerPasswordReplicationPolicyUsage
#ActiveDirectory 2008 R2
#NLTEST SC_RESET
Test-ComputerSecureChannel -Repair
#Microsoft.PowerShell.Management 2012
#NLTEST SC_VERIFY
Test-ComputerSecureChannel
#Microsoft.PowerShell.Management 2012
#NLTEST SC_CHANGE_PWD
Reset-ComputerMachinePassword
#Microsoft.PowerShell.Management 2012
#NLTEST DCLIST
Get-ADDomainController
#ActiveDirectory 2008 R2
#NLTEST DCNAME
Get-ADDomain | Select-Object PDCEmulator
#ActiveDirectory 2008 R2
#NLTEST DSGETDC
Get-ADDomainController
#ActiveDirectory 2008 R2
#NLTEST PARENTDOMAIN
(Get-WMIObject Win32_ComputerSystem).Domain
#NLTEST DOMAIN_TRUSTS
Get-ADTrust
#ActiveDirectory 2012
#NLTEST SHUTDOWN
Stop-Computer
#Microsoft.PowerShell.Management 2008 R2
#NETDOM ADD
Add-Computer
#Microsoft.PowerShell.Management 2012
#NETDOM COMPUTERNAME
Rename-Computer
#Microsoft.PowerShell.Management 2012
#NETDOM JOIN
Add-Computer
#Microsoft.PowerShell.Management 2012
#NETDOM MOVE
Add-Computer
#Microsoft.PowerShell.Management 2012
#NETDOM RESETPWD
Reset-ComputerMachinePassword
#Microsoft.PowerShell.Management 2012
#NETDOM REMOVE
Remove-Computer
#Microsoft.PowerShell.Management 2012
#NETDOM RENAMECOMPUTER
Rename-Computer
#Microsoft.PowerShell.Management 2012
#NETDOM RESET
Test-ComputerSecureChannel -Repair
#Microsoft.PowerShell.Management 2012
#NETDOM VERIFY
Test-ComputerSecureChannel
#Microsoft.PowerShell.Management 2012
#NETDOM QUERY WORKSTATION
Get-ADComputer -Filter “operatingSystem -notlike ‘*server*'”
#ActiveDirectory 2008 R2
#NETDOM QUERY SERVER
Get-ADComputer -Filter “operatingSystem -like ‘*server*'”
#ActiveDirectory 2008 R2
#NETDOM QUERY DC
Get-ADDomainController
#ActiveDirectory 2008 R2
#NETDOM QUERY OU
Get-ADOrganizationalUnit
#ActiveDirectory 2008 R2
#NETDOM QUERY PDC
Get-ADDomain | Select-Object PDCEmulator
#ActiveDirectory 2008 R2
#NETDOM QUERY FSMO
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
Get-ADDomain | Select-Object InfrastructureMaster, PDCEmulator, RIDMaster
#ActiveDirectory 2008 R2
#NETDOM QUERY TRUST
Get-ADTrust
#ActiveDirectory 2012
#GPUPDATE
Invoke-GPUpdate
#GroupPolicy 2012
#GPRESULT
Get-GPResultantSetOfPolicy
#GroupPolicy 2008 R2
#PING
Test-Connection
#Microsoft.PowerShell.Management 2008 R2
#IPCONFIG
Get-NetIPConfiguration
#NetTCPIP 2012
#IPCONFIG /ALL
Get-NetIPConfiguration -Detailed
#NetTCPIP 2012
#IPCONFIG /FLUSHDNS
Clear-DnsClientCache
#DnsClient 2012
#IPCONFIG /DISPLAYDNS
Get-DnsClientCashe
#DnsClient 2012
#IPCONFIG /REGISTERDNS
Register-DnsClient
#DnsClient 2012
#NETSTAT a
Get-NetTCPConnection
#NetTCPIP 2012
#NETSTAT r
Get-NetRoute
#NetTCPIP 2012
#NSLOOKUP
Resolve-DNSName
#DNSClient 2012
#DNSCMD /Info
Get-DnsServer
#DNSServer 2012
#DNSCMD /Config
Set-DnsServer
#DNSServer 2012
#DNSCMD /EnumZones
Get-DnsServerZone
#DNSServer 2012
#DNSCMD /Statistics
Get-DnsServerStatistics
Clear-DnsServerStatistics
#DNSServer 2012
#DNSCMD /ClearCache
Clear-DnsServerCache
#DNSServer 2012
#DNSCMD /StartScavenging
Start-DnsServerScavenging
#DNSServer 2012
#DNSCMD /ResetForwarders
Get-DnsServerForwarder
Set-DnsServerForwarder
Add-DnsServerForwarder
Remove-DnsServerForwarder
Set-DnsServerConditionalForwarderZone
Add-DnsServerConditionalForwarderZone
#DNSServer 2012
#DNSCMD /ZoneInfo
Get-DnsServerZone
#DNSServer 2012
#DNSCMD /ZoneAdd
Add-DnsServerPrimaryZone
Add-DnsServerSecondaryZone
Add-DnsServerStubZone
#DNSServer 2012
#DNSCMD /ZoneDelete
Remove-DnsServerZone
#DNSServer 2012
#DNSCMD /ZoneResetScavengeServers
Get-DnsServerScavenging
Set-DnsServerScavenging
#DNSServer 2012
#DNSCMD /ZoneResetMasters
Set-DnsServerSecondaryZone
#DNSServer 2012
#DNSCMD /ZoneExport
Export-DnsServerZone
#DNSServer 2012
#DNSCMD /RecordAdd
Add-DnsServerResourceRecord
Add-DnsServerResourceRecordA
Add-DnsServerResourceRecordAAAA
Add-DnsServerResourceRecordCName
Add-DnsServerResourceRecordDS
Add-DnsServerResourceRecordMX
Add-DnsServerResourceRecordPtr
#DNSServer 2012
#DNSCMD /RecordDelete
Remove-DnsServerResourceRecord
#DNSServer 2012
#DNSCMD /AgeAllRecords
Set-DnsServerResourceRecordAging
#DNSServer 2012
#DNSCMD /ZonePrint
Get-DnsServerResourceRecord
#DNSServer 2012
#DNSCMD /TrustAnchorAdd
Add-DnsServerTrustAnchor
#DNSServer 2012
#DNSCMD /TrustAnchorDelete
Remove-DnsServerTrustAnchor
#DNSServer 2012
#DNSCMD /EnumTrustAnchors
Get-DnsServerTrustAnchor
#DNSServer 2012

Contenedores en Windows

Hola a todos.

Hoy quiero que hablemos de los contenedores, los contenedores son una tecnología similar a las maquinas virtuales, que nos permiten la instalación de aplicaciones en espacios de memoria separados, como si se tratara de crear maquinas virtuales, pero con la diferencia que se comparte el sistema operativo con el host.

En Azure, en Windows server 2016, y en Windows 10 Enterprise podemos hacer uso de los contenedores, para Windows 10 Enterprise podemos habilitarlo de la siguiente manera, Entramos al panel de control y vamos a la opción de programas y caracteristicas, dentro vamos a seleccionar habilitar características de Windows.

 

 

 

Y pide reinicio…

Virtual Labs as preparing resource

Learn

Microsoft got a learning experiences place, where you can safely learn without deployments, or wasted time. this escenarios are the Technet VirtualLabs

When you want to prepare a new skill, view how to set up another service or capability.

Benefits

  1. Risk free
  2. Fast
  3. Simple

Products

  • There you’ll find almost every product
  • Also you can watch how to handle complex deployments
  • Go at your own pace. if you don’t have a good english as my self, you can read it and take small bites of cake.

Be my guest, I want to invite you to discover the potential of this Labs Online. them are completely Free. and you can use them every time (while you got Internet access).