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-TelekomDataStatus | |
| { | |
| $IsConnected = Get-NetAdapter -Physical | where{$_.status -eq 'up' -and $_.MediaType -eq 'Wireless WAN'} | |
| if($IsConnected) | |
| { | |
| Invoke-RestMethod -Uri 'http://pass.telekom.de/api/service/generic/v1/status' | |
| } | |
| else | |
| { | |
| Write-Warning "Nicht mit WWAN verbunden - Abfrage nicht möglich" |
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
| @{ | |
| AllNodes = @( | |
| @{ | |
| NodeName = 'Node1' | |
| Role = 'ExampleRole1' | |
| }, | |
| @{ | |
| NodeName = 'Node2' | |
| Role = 'ExampleRole2' | |
| }, |
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
| param($ComputerName = $env:computername) | |
| Describe 'Firewall is enabled' { | |
| BeforeAll { | |
| $session = New-PSSession -ComputerName $ComputerName | |
| $Param = @{Session=$session} | |
| } | |
| $testCases = @( | |
| @{ |
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
| # with different set of printer shares | |
| .\WakeUpPrinters.ps1 -PrinterShareNames @('printer4_ShareName','printer5_ShareName','printer6_ShareName') | |
| # with additional verbose output | |
| .\WakeUpPrinters.ps1 -Verbose |
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-UACStatus { | |
| <# | |
| .SYNOPSIS | |
| Gets the current status of User Account Control (UAC) on a computer. | |
| .DESCRIPTION | |
| Gets the current status of User Account Control (UAC) on a computer. $true indicates UAC is enabled, $false that it is disabled. | |
| .NOTES | |
| Version : 1.0 |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine] | |
| "MpEnablePus"=dword:00000001 | |
| ; http://www.heise.de/newsticker/meldung/Windows-mit-verstecktem-Adware-Killer-3023579.html |
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 Install-LinuxToolChain { | |
| <# | |
| .SYNOPSIS | |
| Downloads and installs the UE4 linux toolchain components. | |
| .DESCRIPTION | |
| Downloads the clang compiler to $ToolChainDestination and creates a | |
| system-wide environment variable pointing to it. | |
| Afterwards you have to regenerate the UE4 engine project files and |
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
| # in reference to: https://iamsquib.wordpress.com/2015/03/27/print-monitoring-with-powershell/ | |
| # bad | |
| Get-WinEvent -Logname='Microsoft-Windows-PrintService/Operational' -Computername printserver | where{$_.userid -eq 307 } | select TimeCreated, ID, UserId, Message | |
| # returns all contents of the Operational log from the remote server and filters them locally | |
| # better | |
| Get-WinEvent -FilterHashtable @{logname='Microsoft-Windows-PrintService/Operational'; id=307} -Computername printserver | select TimeCreated, ID, UserId, Message | |
| # returns filtered results from remote server, no further filtering needed |
NewerOlder