Skip to content

Commit dcc5212

Browse files
committed
Improved the scripts
1 parent 676a089 commit dcc5212

15 files changed

Lines changed: 92 additions & 96 deletions

Scripts/decrypt-file.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
param([string]$Path = "", [string]$Password = "")
1010

1111

12-
function DecryptFile
13-
{
12+
function DecryptFile {
1413
<#
1514
.SYNOPSIS
1615
Decrypts a file encrypted with Protect-File.

Scripts/encrypt-file.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
param([string]$Path = "", [string]$Password = "")
1010

11-
function EncryptFile
12-
{
11+
function EncryptFile {
1312
<#
1413
.SYNOPSIS
1514
Encrypts a file using a symmetrical algorithm.

Scripts/list-fritzbox-calls.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function New-Request {
8383

8484
$script:secport = (New-Request -urn "urn:dslforum-org:service:DeviceInfo:1" -action 'GetSecurityPort' -proto 'http').Envelope.Body.GetSecurityPortResponse.NewSecurityPort
8585

86-
function GetCallList() { param([int]$MaxEntries = 999, [int]$MaxDays = 999
86+
function GetCallList { param([int]$MaxEntries = 999, [int]$MaxDays = 999
8787
)
8888
$resp = New-Request -urn 'urn:dslforum-org:service:X_AVM-DE_OnTel:1' -action 'GetCallList'
8989
$list = [xml](new-object System.Net.WebClient).DownloadString("$($resp.Envelope.Body.GetCallListResponse.NewCallListURL)&max=$MaxEntries&MaxDays=$days")

Scripts/list-random-passwords.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $Lines = 24
1212
$MinCharCode = 33
1313
$MaxCharCode = 126
1414

15-
function GeneratePassword() {
15+
function GeneratePassword {
1616
$Generator = New-Object System.Random
1717
for ($i = 0; $i -lt $PasswordLength; $i++) {
1818
$Result += [char]$Generator.next($MinCharCode,$MaxCharCode)

Scripts/list-random-pins.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
param([int]$PinLength = 5, [int]$Columns = 12, [int]$Rows = 24)
1010

11-
function GeneratePIN() {
11+
function GeneratePIN {
1212
$Generator = New-Object System.Random
1313
for ($i = 0; $i -lt $PinLength; $i++) {
1414
$PIN += [char]$Generator.next(48,57)

Scripts/reboot-fritzbox.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function New-Request {
8585

8686
$script:secport = (New-Request -urn "urn:dslforum-org:service:DeviceInfo:1" -action 'GetSecurityPort' -proto 'http').Envelope.Body.GetSecurityPortResponse.NewSecurityPort
8787

88-
function Reboot-FritzBox() {
88+
function Reboot-FritzBox {
8989
$resp = New-Request -urn 'urn:dslforum-org:service:DeviceConfig:1' -action 'Reboot'
9090
return $resp.Envelope.Body.InnerText
9191
}

Scripts/speak-date.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.NOTES Author: Markus Fleschutz / License: CC0
77
#>
88

9-
function Speak([string]$Text) {
9+
function Speak { param([string]$Text)
1010
write-progress "$Text"
1111
$Voice = new-object -ComObject SAPI.SPVoice
1212
$Voices = $Voice.GetVoices()

Scripts/speak-epub.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
param([string]$Filename = "")
1010

11-
function Speak([string]$Text) {
11+
function Speak { param([string]$Text)
1212
write-output "$Text"
1313
$Voice = new-object -ComObject SAPI.SPVoice
1414
$Voices = $Voice.GetVoices()

Scripts/speak-time.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.NOTES Author: Markus Fleschutz / License: CC0
77
#>
88

9-
function Speak([string]$Text) {
9+
function Speak { param([string]$Text)
1010
write-progress "$Text"
1111
$Voice = new-object -ComObject SAPI.SPVoice
1212
$Voices = $Voice.GetVoices()

Scripts/take-screenshot.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
param([string]$Directory = "")
1010

11-
function TakeScreenshot() { param([string]$FilePath)
11+
function TakeScreenshot { param([string]$FilePath)
1212
Add-Type -Assembly System.Windows.Forms
1313
$ScreenBounds = [Windows.Forms.SystemInformation]::VirtualScreen
1414
$ScreenshotObject = New-Object Drawing.Bitmap $ScreenBounds.Width, $ScreenBounds.Height

0 commit comments

Comments
 (0)