#Run winrm quickconfig defaults echo Y | winrm quickconfig
Enter-PSSession -ComputerName 192.168.2.229 –Credential
netstat -nb | findstr /R ":80"
<#---------------------------------------------------------------------------------------------------- | |
Release Notes: | |
v1.4: | |
Author: Jared Poeppelman, Microsoft | |
First version published on TechNet Script Gallery | |
----------------------------------------------------------------------------------------------------#> | |
function Test-Command | |
{ |
<# | |
This is a PowerShell function wrapping the ADMT executable to abstract out migrating Active Directory users. | |
Read all the ADMT docs, and all the code and comments below before considering using this : ) | |
The COM object was covered nicely by Jan Egil Ring: | |
http://blog.powershell.no/2010/08/04/automate-active-directory-migration-tool-using-windows-powershell/ | |
Unfortunately, the COM object does not support Include files, a critical requirement for us. |
# Copyright 2019, Alexander Hass | |
# https://www.hass.de/content/setup-microsoft-windows-or-iis-ssl-perfect-forward-secrecy-and-tls-12 | |
# | |
# After running this script the computer only supports: | |
# - TLS 1.2 | |
# | |
# Version 3.0.1, see CHANGELOG.txt for changes. | |
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...' | |
Write-Host '--------------------------------------------------------------------------------' |
# Read in a list of user accounts from a CSV | |
# | |
# -- Begin sample CSV file -- | |
# Username | |
# dtrump | |
# bobama | |
# gbush | |
# -- End sample CSV file -- | |
# | |
$GroupObjectID = (Get-AzureADGroup -SearchString "your_groupname_here").ObjectID |
IF((Test-Path -Path $FileOrFolderPath) -eq $false) { | |
Write-Warning "File or directory does not exist." | |
} | |
Else { | |
$LockingProcess = CMD /C "openfiles /query /fo table | find /I ""$FileOrFolderPath""" | |
Write-Host $LockingProcess | |
} |
function Invoke-NativeCommand { | |
<# | |
.SYNOPSIS | |
Invoke a native command (.exe) as a new process. | |
.DESCRIPTION | |
Invoke-NativeCommand executes an arbitrary executable as a new process. Both the standard | |
and error output streams are redirected. | |
Error out is written as a single non-terminating error. ErrorAction can be used to raise |
function processResponse(response) { | |
if (response.status === 200) { | |
output = | |
` | |
<div class="alert alert-success" role="alert"> | |
Hello, ${document.getElementById('name').value}! It's nice to meet you! | |
</div> | |
`; | |
document.getElementById('output').innerHTML = output; | |
} else { |
<# | |
.SYNOPSIS | |
Configures a secure WinRM listener over HTTPS to enable | |
SSL-based WinRM communications. This script has not been | |
tested on Windows Server 2003R2 or earier, and may not | |
work on these OSes for a variety of reasons. | |
If Windows Remote Management is disabled (e.g. service | |
stopped, GPO Policy, etc.), this script will likely fail. | |
.DESCRIPTION |
[CmdletBinding()] | |
Param( | |
[switch]$ListAllAvailable, | |
[switch]$ExcludePreview, | |
[switch]$ExcludeOutofBand | |
) | |
$ProgressPreference = 'SilentlyContinue' | |
Function Get-MyWindowsVersion { | |
[CmdletBinding()] |