Steps for renewing NDES Service Certificates

NetworkDeviceEnrollmentService

The Network Device Enrollment Service cannot be started (0x80070057). The parameter is incorrect.

 

 

https://blogs.technet.microsoft.com/xdot509/2015/12/30/steps-for-renewing-ndes-service-certificates/

 

 

Annunci

CalendarProcessing

#Exchange2016

$rooms = get-mailbox -ResultSize unlimited | where {$_.recipientTypeDetails -eq “roomMailbox”}

$rooms | Get-CalendarProcessing | ft AutomateProcessing,ForwardRequestsToDelegates,DeleteAttachments,DeleteSubject,AddOrganizerToSubject,OrganizerInfo,Identity,ResourceDelegates -AutoSize

 

 

New-AzureRmRoleDefinition – Azure RBAC – JSON

Get-AzureRmRoleDefinition -Name “Virtual Machine Contributor EXT” | ConvertTo-Json | Out-File C:\Temp\vmrole.json

 

edit Json file

 

“Name”:  “Virtual Machine Contributor EXT“,”Name”:  “Virtual Machine Contributor EXT”,    “Id”:  null,    “IsCustom”:  true,    “Description”:  “Lets you manage virtual machines, but not access to them, and not the virtual network or storage account they�re connected to.”,    “Actions”:  [                    “Microsoft.Authorization/*/read”,                    “Microsoft.Compute/availabilitySets/*”,                    “Microsoft.Compute/locations/*”,                    “Microsoft.Compute/virtualMachines/*”,                    “Microsoft.Compute/virtualMachineScaleSets/*”,                    “Microsoft.DevTestLab/schedules/*”,                    “Microsoft.Insights/alertRules/*”,                    “Microsoft.Network/loadBalancers/read”,                    “Microsoft.Network/locations/*”,                    “Microsoft.Network/networkInterfaces/*”,                    “Microsoft.Network/networkSecurityGroups/read”,                    “Microsoft.Network/publicIPAddresses/read”,                    “Microsoft.Network/virtualNetworks/read”,                    “Microsoft.ResourceHealth/availabilityStatuses/read”,                    “Microsoft.Resources/deployments/*”,                    “Microsoft.Resources/subscriptions/resourceGroups/read”,                    “Microsoft.Storage/storageAccounts/listKeys/action”,                    “Microsoft.Storage/storageAccounts/read”,                    “Microsoft.Support/*”, “Microsoft.Support/schedules/write”, “Microsoft.Compute/disks/read”                ],    “NotActions”:  [
],    “AssignableScopes”:  [                             “/subscriptions/xxxxxxxxxxxxxxxx”                         ]}

New-AzureRmRoleDefinition -InputFile C:\Temp\vmrole.json

 

 

ASFS on Windows Server 2016 test page

Thanks to:

http://tothebatcloud.com/2016/12/adfs-server-2016-issue-testing/

Test URL:

https://adfs.domain.com/adfs/ls/IdpInitiatedSignon.aspx

Exception details:
Microsoft.IdentityServer.RequestFailedException: MSIS7065: There are no registered protocol handlers on path /adfs/ls to process the incoming request.
at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)

Exception details:
Microsoft.IdentityServer.Web.IdPInitiatedSignonPageDisabledException: MSIS7012: An error occurred while processing the request. Contact your administrator for details.
at Microsoft.IdentityServer.Web.Protocols.Saml.IdpInitiatedSignOnRequestSerializer.ReadMessage(WrappedHttpListenerRequest httpRequest)
at Microsoft.IdentityServer.Web.Protocols.Saml.HttpSamlMessageFactory.CreateMessage(WrappedHttpListenerRequest httpRequest)
at Microsoft.IdentityServer.Web.Protocols.Saml.SamlContextFactory.CreateProtocolContextFromRequest(WrappedHttpListenerRequest request, ProtocolContext& protocolContext)
at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.CreateProtocolContext(WrappedHttpListenerRequest request)
at Microsoft.IdentityServer.Web.PassiveProtocolListener.GetProtocolHandler(WrappedHttpListenerRequest request, ProtocolContext& protocolContext, PassiveProtocolHandler& protocolHandler)
at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)

Get-AdfsProperties | select EnableIdPInitiatedSignonPage

Set-AdfsProperties -EnableIdPInitiatedSignonPage $true

Find process and port – powershell

Thanks to: Shay Levy

http://blogs.microsoft.co.il/scriptfanatic/2011/02/10/how-to-find-running-processes-and-their-port-number/

 

 

function Get-NetworkStatistics
{
$properties = ‘Protocol’,’LocalAddress’,’LocalPort’
$properties += ‘RemoteAddress’,’RemotePort’,’State’,’ProcessName’,’PID’

netstat -ano | Select-String -Pattern ‘\s+(TCP|UDP)’ | ForEach-Object {

$item = $_.line.split(” “,[System.StringSplitOptions]::RemoveEmptyEntries)

if($item[1] -notmatch ‘^\[::’)
{
if (($la = $item[1] -as [ipaddress]).AddressFamily -eq ‘InterNetworkV6’)
{
$localAddress = $la.IPAddressToString
$localPort = $item[1].split(‘\]:’)[-1]
}
else
{
$localAddress = $item[1].split(‘:’)[0]
$localPort = $item[1].split(‘:’)[-1]
}

if (($ra = $item[2] -as [ipaddress]).AddressFamily -eq ‘InterNetworkV6’)
{
$remoteAddress = $ra.IPAddressToString
$remotePort = $item[2].split(‘\]:’)[-1]
}
else
{
$remoteAddress = $item[2].split(‘:’)[0]
$remotePort = $item[2].split(‘:’)[-1]
}

New-Object PSObject -Property @{
PID = $item[-1]
ProcessName = (Get-Process -Id $item[-1] -ErrorAction SilentlyContinue).Name
Protocol = $item[0]
LocalAddress = $localAddress
LocalPort = $localPort
RemoteAddress =$remoteAddress
RemotePort = $remotePort
State = if($item[0] -eq ‘tcp’) {$item[3]} else {$null}
} | Select-Object -Property $properties
}
}
}

Get-NetworkStatistics | Format-Table

Filter process name:

Get-NetworkStatistics | where {$_.processname -like “skype*”} |Format-Table -AutoSize

 

VM sizes available – Powershell

$resources = Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Compute

$resources.ResourceTypes.Where{($_.ResourceTypeName -eq ‘virtualMachines’)}.Locations

Get-AzureRmVmSize -Location “West Europe” | Sort-Object Name | ft Name, NumberOfCores, MemoryInMB, MaxDataDiskCount -AutoSize

Name NumberOfCores MemoryInMB MaxDataDiskCount
Basic_A0 1 768 1
Basic_A1 1 1792 2
Basic_A2 2 3584 4
Basic_A3 4 7168 8
Basic_A4 8 14336 16
Standard_A0 1 768 1
Standard_A1 1 1792 2
Standard_A1_v2 1 2048 2
Standard_A10 8 57344 16
Standard_A11 16 114688 16
Standard_A2 2 3584 4
Standard_A2_v2 2 4096 4
Standard_A2m_v2 2 16384 4
Standard_A3 4 7168 8
Standard_A4 8 14336 16
Standard_A4_v2 4 8192 8
Standard_A4m_v2 4 32768 8
Standard_A5 2 14336 4
Standard_A6 4 28672 8
Standard_A7 8 57344 16
Standard_A8 8 57344 16
Standard_A8_v2 8 16384 16
Standard_A8m_v2 8 65536 16
Standard_A9 16 114688 16
Standard_D1 1 3584 2
Standard_D1_v2 1 3584 2
Standard_D11 2 14336 4
Standard_D11_v2 2 14336 4
Standard_D12 4 28672 8
Standard_D12_v2 4 28672 8
Standard_D13 8 57344 16
Standard_D13_v2 8 57344 16
Standard_D14 16 114688 32
Standard_D14_v2 16 114688 32
Standard_D15_v2 20 143360 40
Standard_D2 2 7168 4
Standard_D2_v2 2 7168 4
Standard_D3 4 14336 8
Standard_D3_v2 4 14336 8
Standard_D4 8 28672 16
Standard_D4_v2 8 28672 16
Standard_D5_v2 16 57344 32
Standard_DS1 1 3584 2
Standard_DS1_v2 1 3584 2
Standard_DS11 2 14336 4
Standard_DS11_v2 2 14336 4
Standard_DS12 4 28672 8
Standard_DS12_v2 4 28672 8
Standard_DS13 8 57344 16
Standard_DS13_v2 8 57344 16
Standard_DS14 16 114688 32
Standard_DS14_v2 16 114688 32
Standard_DS15_v2 20 143360 40
Standard_DS2 2 7168 4
Standard_DS2_v2 2 7168 4
Standard_DS3 4 14336 8
Standard_DS3_v2 4 14336 8
Standard_DS4 8 28672 16
Standard_DS4_v2 8 28672 16
Standard_DS5_v2 16 57344 32
Standard_F1 1 2048 2
Standard_F16 16 32768 32
Standard_F16s 16 32768 32
Standard_F1s 1 2048 2
Standard_F2 2 4096 4
Standard_F2s 2 4096 4
Standard_F4 4 8192 8
Standard_F4s 4 8192 8
Standard_F8 8 16384 16
Standard_F8s 8 16384 16
Standard_G1 2 28672 4
Standard_G2 4 57344 8
Standard_G3 8 114688 16
Standard_G4 16 229376 32
Standard_G5 32 458752 64
Standard_GS1 2 28672 4
Standard_GS2 4 57344 8
Standard_GS3 8 114688 16
Standard_GS4 16 229376 32
Standard_GS5 32 458752 64
Standard_H16 16 114688 32
Standard_H16m 16 229376 32
Standard_H16mr 16 229376 32
Standard_H16r 16 114688 32
Standard_H8 8 57344 16
Standard_H8m 8 114688 16
Standard_NV12 12 114688 16
Standard_NV24 24 229376 32
Standard_NV6 6 57344 8

http://windowsitpro.com/azure/how-can-i-check-vm-sizes-available-certain-azure-region