This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| s.session_id, | |
| c.connect_time, | |
| s.login_time, | |
| s.login_name, | |
| c.protocol_type, | |
| c.auth_scheme, | |
| s.HOST_NAME, | |
| s.program_name | |
| FROM sys.dm_exec_sessions s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [DSCLocalConfigurationManager()] | |
| configuration LcmDebugConfig | |
| { | |
| Node localhost | |
| { | |
| Settings | |
| { | |
| RefreshMode = 'Push' | |
| DebugMode = 'ForceModuleImport' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger: | |
| - '*' | |
| stages: | |
| - stage: develop | |
| jobs: | |
| - job: A | |
| strategy: | |
| parallel: 4 | |
| pool: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-Enum | |
| { | |
| param ( | |
| [type]$Type | |
| ) | |
| [enum]::GetValues($Type) | | |
| Select-Object -Property ` | |
| @{ Name = 'Name'; Expression={ [string]$_ } }, | |
| @{ Name = 'Value'; Expression={ [int]$_ }}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-Test | |
| { | |
| Get-Date | |
| } | |
| function New-TestRole | |
| { | |
| New-PSRoleCapabilityFile -Path c:\TestRole.psrc ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #usually the process consuming the most memory is the one that hosts the LCM | |
| $p = Get-Process -Name WmiPrvSE | Sort-Object -Property WS -Descending | Select-Object -First 1 | |
| Enter-PSHostProcess -Process $p -AppDomainName DscPsPluginWkr_AppDomain | |
| Start-Sleep -Seconds 1 | |
| $rs = Get-Runspace | Where-Object { $_.Debugger.InBreakpoint } | |
| Debug-Runspace -Runspace $rs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8" ?> | |
| <Configuration> | |
| <ViewDefinitions> | |
| <View> | |
| <Name>Microsoft.PowerShell.Commands.GenericMeasureInfo</Name> | |
| <ViewSelectedBy> | |
| <TypeName>Microsoft.PowerShell.Commands.GenericMeasureInfo</TypeName> | |
| </ViewSelectedBy> | |
| <ListControl> | |
| <ListEntries> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $types = @' | |
| using System; | |
| namespace Kerberos | |
| { | |
| public enum EncryptionTypes:uint | |
| { | |
| AES256_CTS_HMAC_SHA1_96 = 18, | |
| AES128_CTS_HMAC_SHA1_96 = 17, | |
| ARCFOUR_HMAC_MD5 = 23, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Connect-SupportSession | |
| { | |
| param( | |
| [Parameter(Mandatory)] | |
| [string]$ComputerName, | |
| [pscredential]$Credential | |
| ) | |
| $s = New-PSSession @PSBoundParameters -ConfigurationName Support #-ErrorAction SilentlyContinue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Unlock-AAAccount | |
| { | |
| param( | |
| [Parameter(Mandatory)] | |
| [string]$Identity | |
| ) | |
| try | |
| { | |
| $user = Get-ADUser -Identity $Identity |