Windows Server 2016 – Configure Windows defender with PowerShell

Screenshot 20181208 074154

Use get-mpcomputerStatus to get the status of antimalware software To configure the preferences for Windows Defender scans and updates use set-mppreference: #Check for definition updates everyday Set-MpPreference -SignatureScheduleDay Everyday #Check for definition updates 120 minutes after midnight Set-MpPreference -SignatureScheduleTime 120 #Check for definition update before every scan Set-MpPreference -checkForSignatureBeforeRunningScan $true #Sets the default action to Remove for low threats Set-MpPreference -LowThreatDefaultAction Remove More information here   Windows Server 2016 – Configure Windows defender with PowerShell

Windows Server 2016 – Configure Windows defender with PowerShell Read More

Windows Server 2016 – PowerShell import failoverclusters module

Screenshot 20181201 094807

First, you need to install a Windows feature, the Failover Clustering feature: install-windows-feature Failover-clustering –IncludeManagementTools or if you want to add the management tools later install-windowsfeature RSAT-Clustering-PowerShell Now import the module import-module failoverclusters Check all the commands available to this module get-command -module failoverclusters   Windows Server 2016 – PowerShell import failoverclusters module

Windows Server 2016 – PowerShell import failoverclusters module Read More

Windows Server 2016 – Manage Docker with PowerShell cmdlets

Screenshot 20181124 081451 1

If you haven’t configured PowerShell with docker cmdlets, then read this post. List Containers get-container   Start and Stop container start-container containerID stop-container containerID   Attach to Container enter-containerSession containerID   Remove Container remove-container containerID   Windows Server 2016 – Manage Docker with PowerShell cmdlets

Windows Server 2016 – Manage Docker with PowerShell cmdlets Read More

Windows Server 2016 – PowerShell import module permanently

Screenshot 20181121 082937

First, we need to find the modules location. $env:PSModulePath or Get-module -listavailable I will copy the module to C:\Program Files\WindowsPowerShell\Modules. I assume you have downloaded the module and it is a zip file. So we copy the module to the location above copy-item .\Docker.0.1.0.zip -Destination ‘C:\Program Files\WindowsPowerShell\’ cd ‘C:\Program Files\WindowsPowerShell\’ dir Expand-Archive .\Docker.0.1.0.zip -DestinationPath .\Docker  #the directory name should be the same as the module without the .psm1 #the name is Docker.psm1 so the directory name should be Docker Now if you run get-module -list available you will see that…

Windows Server 2016 – PowerShell import module permanently Read More

Windows Server 2016 – PowerShell configuration for docker cmdlets

Screenshot 20181119 095735

First, download the Docker-PowerShell. You need to create a folder first then download it: Invoke-webrequest -Uri “https://github.com/Microsoft/Docker-PowerShell/releases/download/v0.1.0/Docker.0.1.0.zip” -outifle “Docker.0.1.0.zip” If you have problems with SSL/TLS then you need to execute the following before the invoke-webrequest: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Then extract the zip file you downloaded before. expand-archive -path .\docker-0.1.0.zip -DestinationPath .\ Import-Module .\docker.psd1 #and to verify that you have imported the module get-commang -module docker     Windows Server 2016 – PowerShell configuration for docker cmdlets

Windows Server 2016 – PowerShell configuration for docker cmdlets Read More