<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>IT 15 by mario kuum</title>
      <link>https://padlet.com/mariokuum/skriptit15</link>
      <description>Scripts</description>
      <language>en-us</language>
      <pubDate>2017-01-17 06:37:36 UTC</pubDate>
      <lastBuildDate>2023-04-05 14:57:37 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Juhuslikstring</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/147451769</link>
         <description><![CDATA[<div># Script: Juhuslikstring<br><br># Date: 11.01.2017<br><br># Author: M. Kuum<br><br># Description: Funktsioon, mis teeb x pikkusega stringi<br><br><br><br>CLS # Peale uuesti sisestamist ta kustutab vanad ära.<br><br>function Gen-RandomString { #Funktsioon, mis genereerib juhusliku tähtede/numbrite rea<br><br>    param([int]$Length)<br><br>    <br><br>    $set = "abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ1234567890".ToCharArray()<br><br>    $result = ""<br><br>    $setSize = $set.Length<br><br>    if($Length -gt 1) {<br><br>        for($i = 0; $i  -lt $Length; $i++) {<br><br>           $nr = Get-Random -Minimum 1 -Maximum $setSize<br><br>           $result += $set[$nr]<br><br>        }<br><br>        return $result<br><br>    }<br><br>    return "Length Error!"<br><br>}<br><br><br><br>$string = Gen-RandomString -Length 10<br><br>#Write-Host $string<br><br><br><br>for($i = 0; $i -lt 10; $i++) {<br><br>    $string = Gen-RandomString -Length 10<br><br>    Write-Host "$($i+1)." $string<br><br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-17 06:41:04 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/147451769</guid>
      </item>
      <item>
         <title>mphtokmh</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/147451886</link>
         <description><![CDATA[<div>function Convert-MPHtoKMHvv {<br><br>    param([string]$Unit, [int]$Speed)<br><br>    <br><br>    if($Unit -eq "MPH") {<br><br>        #Arvutada KMH<br><br>        if($Speed -gt 0) {<br><br>            #Saab arvutada kiirust<br><br>            $newSpeed = $Speed * 1.609344<br><br>            Write-Host $Speed "mph on" $newSpeed "kmh"<br><br>        } else {<br><br>            Write-Host "Kiirus on puudu"<br><br>        }<br><br>    } else {<br><br>        #Arvutada MPH<br><br>        #Arvutada MPH<br><br>        if($Speed -gt 0) {<br><br>            #Saab arvutada kiirust<br><br>            $newSpeed = $Speed * 0.621371192<br><br>            Write-Host $Speed "kmh on" $newSpeed "mph"<br><br>        } else {<br><br>            Write-Host  "Kiirus on puudu"<br><br>        }<br><br>    }<br><br>    <br><br>}<br><br>Convert-MPHtoKMHvv -Unit "MPH" -Speed 100</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-17 06:42:44 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/147451886</guid>
      </item>
      <item>
         <title>Failiscript</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/147451919</link>
         <description><![CDATA[<div>$UserName = [environment]::Username<br>$global:FullPath = "C:\Users\$UserName\Desktop\Temp\"<br>$global:InsideLog = "A,01012017","A,02012017","A,03012017",<br>                   "A,04012017","A,05012017","A,06012017",<br>                   "A,01072017","A,08012017","A,09012017",<br>                   "V,09012017","A,10012017"<br><br>function Create-NewLogFile {<br>    param($HowMany)<br>    #param([int]$HowMany) kui on kasutusel siis võtta int ära<br>    <br>    if($HowMany -isnot [int]) {<br>        $HowMany = 50<br>        Write-Host "Failide arv pole number. Muudetud 50ks."<br>    }<br>    if($HowMany -lt 1 -or $HowMany -gt 999) {<br>        $HowMany = 100<br>        Write-Host "Failide arv vales vahemikus. muudeti 100ks."<br>    }<br>    <br>    if(!(Test-Path $global:FullPath)) {<br>        New-Item -ItemType directory -Path $global:FullPath | Out-Null    <br>    } else {<br>        Remove-Item $global:FullPath"*.*"<br>    }<br>    $k = 0<br>    for($i = 0; $i -lt $HowMany; $i++) {<br>        if($i -lt 10) {<br>            $k = $i<br>        } elseif($i -lt 100) {<br>            if($k -lt $<a>global:InsideLog.Count-1</a>) {<br>                $k++            <br>            } else {<br>                $k = 0<br>            }<br>        } else {<br>             if($k -lt $<a>global:InsideLog.Count-1</a>) {<br>                $k++            <br>            } else {<br>                $k = 0<br>            }<br>        }<br>        $string = Gen-RandomString -Length (Get-Random -minimum 2 -maximum 21)<br>        $fn = $global:FullPath + $string + ".txt"<br>        Write-Output $global:InsideLog[$k] | Out-File -FilePath $fn<br>    }<br>    Write-Host "Failid tehtud" $HowMany "tükki"   <br>}<br>function Merge-Files {<br>    param([string]$FileName)<br>    $thisFullPath = $global:FullPath + $FileName<br>    if(Test-Path $thisFullPath) {<br>        Remove-Item $thisFullPath<br>        New-Item -ItemType file -Path $thisFullPath -Force | Out-Null<br>    } else {<br>         New-Item -ItemType file -Path $thisFullPath -Force | Out-Null   <br>    }<br>    Get-ChildItem $global:FullPath -Filter *.txt | ForEach-Object {<br>        $content = Get-Content $_.Fullname<br>        Write-Output $content | Out-File -FilePath $ThisFullPath -Append<br>    }<br>}<br><br>function Split-OneFile {<br>    param([string]$FileName)<br>    $FullPathFileName = $global:FullPath + $FileName<br>    if(Test-Path $FullPathFileName) {<br>        $content = Get-Content $FullPathFileName<br>        $counter = 0<br>        for($i = 0; $i -lt $content.Length; $i++) {<br>            if($content[$i].Split(",")[0] -eq "V") {<br>                Write-Host $content[$i].Split(",")<br>                $counter++<br>            }<br>        }<br>        Write-Host "V-ga algavaid on $counter"<br>    } else {<br>        Write-Host "Faili ei leitud" $FullPathFileName<br>    }<br>#Write-Host "$($content.Length)"<br>}<br>function Gen-RandomString { #Funktsioon, mis genereerib juhusliku tähtede/numbrite rea<br>    param([int]$Length)#annab funktsioonile kaasa antud parameetrid<br>   #annab kõik võimalikud tähemärgid<br>    $set = "abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ".ToCharArray()<br>    $result = ""#vastus<br>    $setSize = $set.Length#määrab $set-i lõppu<br><br>    for($i = 0; $i  -lt $Length; $i++) {<br>       $nr = Get-Random -Minimum 1 -Maximum $setSize<br>       $result += $set[$nr]<br>    }<br>    return $result#läheb tagasi vastuse juurde<br>    <br>}<br><br>$string = Gen-RandomString -Length (Get-Random -minimum 2 -maximum 21) #genereerib juhusliku stringi pikkusega kümme märki<br><br><br><br><br>Create-NewLogFile -HowMany 999<br>Merge-Files -FileName fail.log<br>Split-OneFile -Filename fail.log</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-17 06:43:24 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/147451919</guid>
      </item>
      <item>
         <title>skript rockpaperscissors</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/147452004</link>
         <description><![CDATA[<div>#Script: KiviPaberKaarid<br><br>#Date: 11.01.2017<br><br>#Author: M. Kuum<br><br>#Description: Kivi-Paber-Käärid<br><br><br><br>CLS<br><br>$global:pc = 0<br><br>$global:user = 0<br><br>$global:viik = 0<br><br>function Gen-Number {<br><br>    return Get-Random -Minimum 1 -Maximum 4<br><br>}<br><br><br><br>function Show-Text {<br><br>    para([int]$Number)<br><br>    <br><br>    switch($Number) {<br><br>        1 {return "Kivi"; break}<br><br>        2 {return "Paber"; break}<br><br>        3 {return "Käärid"; break}<br><br>        default {return "Error"; break}<br><br>    }<br><br>}<br><br><br><br>function Check-Result {<br><br>    param([int]$Kasutaja, [int]$pc)<br><br><br><br>    if($Kasutaja -eq $PC) {<br><br>        Write-Host "Viik"<br><br>        $global:viik++<br><br>    } elseif($Kasutaja -eq 1) { # Kivi<br><br>        if($PC -eq 3) { #Käärid<br><br>            Write-Host "Sina võitsid"<br><br>            $global:user++<br><br>        } else {<br><br>            Write-Host "Arvuti võitis"<br><br>            $global:pc++<br><br>        }<br><br>    } elseif($Kasutaja -eq 2) { # Paber<br><br>        if($PC -eq 1) { #Kivi<br><br>            Write-Host "Sina võitsid"<br><br>            $global:user++<br><br>        } else {<br><br>            Write-Host "Arvuti võitis"<br><br>            $global:pc++<br><br>        }<br><br>    } elseif($Kasutaja -eq 3) { # Käärid<br><br>        if($PC -eq 1) { #Kivi<br><br>            Write-Host "Arvuti võitis"<br><br>            $global:pc++<br><br>        } else {<br><br>            Write-Host "Sina võitsid"<br><br>            $global:user++<br><br>        }<br><br>    <br><br>    }<br><br>}<br><br><br><br>function Lets-Play {<br><br>    param(<br><br>        [Parameter(mandatory=$true)]<br><br>        [int]$MituKordaMangida<br><br>    )<br><br><br><br>}<br><br><br><br>Lets-Play -MituKordaMangida 5</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-17 06:44:45 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/147452004</guid>
      </item>
      <item>
         <title>50 000 nime</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/147497941</link>
         <description><![CDATA[<div># Script: Nimed
<br># Date: 17.01.2017
<br># Author: M.Viirok
<br># Description: Pagulasfirma 50 000 inimest
<br>
<br>$UserName = [environment]::Username
<br>$global:FullPath = "C:\Users\$UserName\Desktop\Nimed\"
<br>$global:InsideLog = "eesnimi;perenimi;sugu;sunniaeg;vanus;kasutajanimi;mail;parool"
<br>$global:newFile = "C:\Users\$UserName\Desktop\Nimed\5000_ready.csv"
<br>
<br>function Split-OneFile {
<br>    param([string]$FileName)
<br>    $FullPathFileName = $global:FullPath + $FileName
<br>    if(Test-Path $global:newFile) {
<br>        Remove-Item $global:newFile
<br>        New-Item -ItemType file -Path $global:newFile -Force | Out-Null
<br>    } else {
<br>        New-Item -ItemType file -Path $global:newFile -Force | Out-Null
<br>    }
<br>    Write-OutPut $global:InsideLog | Out-File -FilePath $global:newFile -Append    
<br>    if(Test-Path $FullPathFileName) {
<br>        $content = Get-Content $FullPathFileName
<br>        for($i = 0; $i -lt $content.Length; $i++) {
<br>            if($i -gt 0) {
<br>               $eesnimi = $content[$i].Split(";")[0]
<br>               $perenimi = $content[$i].Split(";")[1]
<br>               $sugu = $content[$i].Split(";")[2]
<br>               $sunniaeg = $content[$i].Split(";")[3]
<br>               $aasta = $sunniaeg.Split(".")[2]
<br>               $today = (Get-Date).year
<br>               $vanus = $today - $aasta
<br>               $kasutajanimi = $eesnimi + "_" + $perenimi
<br>               $mail = $eesnimi + "." + $perenimi + "@asutus.com"
<br>               $Parool = "LammasShaun" 
<br>               #Write-Host $newline
<br>               
<br>         
<br>               
<br>               $newLine = $eesnimi + ";" + $perenimi + ";" + $sugu + ";" + $sunniaeg + ";" + $vanus + ";" + $kasutajanimi + ";" + $mail + ";" + $parool
<br>               Write-Output $newLine | Out-File -FilePath $global:newFile -Append
<br>               
<br>            }
<br>        }      
<br>    }    
<br>}
<br>Split-OneFile -Filename Nimed.csv
<br>Write-Host "Tehtud"</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-17 11:26:27 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/147497941</guid>
      </item>
      <item>
         <title>Ristküliku/ruuda arvutamine</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/148089272</link>
         <description><![CDATA[<div>cls<br>[int]$valik = Read-Host -Prompt "sisesta valik kas 1(pindala) v 2(ümbermõõt)"#küsib sultkas tahad arvurada pindala v ümbermõõdu<br>if($valik -eq 1){Calc-Pindala<br>#ütleb kui vastus on üks et läheks pindala arvutama<br>&nbsp;return #lõpetab<br>&nbsp;} elseif($valik -eq 2){Calc-Umber #ütleb et läheks arvutama ümbermõõtu kui vastus on 2<br>return #lõpetab<br><br>}<br><br>function Calc-Pindala { #arvutab pindala kõigebealt küsides pikkust ja laiust<br>&nbsp; &nbsp; param(<br>&nbsp; &nbsp; &nbsp; &nbsp; [Parameter(mandatory=$true)]<br>&nbsp; &nbsp; &nbsp; &nbsp; [int]$Pindala<br>&nbsp; &nbsp; )<br>&nbsp; &nbsp; $x = 0<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while($x -lt $Pindala) {<br>&nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; $x++<br>&nbsp; &nbsp; }&nbsp;<br>&nbsp; &nbsp; [int]$pikkus = Read-Host -Prompt "sisesta pikkus:"<br>&nbsp; &nbsp; [int]$laius = Read-Host -Prompt "sisesta laius:"<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp;&nbsp;<br>}<br>Write-Host "Pindala on:" ($pikkus*$laius)<br>}<br>Calc-Pindala -Pindala 1<br><br>#arvutab ümbermõõdu kõigepealt küsides pikkust ja laiust ning väljastab vastuse<br>function Calc-Umber {<br>&nbsp; &nbsp; param(<br>&nbsp; &nbsp; &nbsp; &nbsp; [Parameter(mandatory=$true)]<br>&nbsp; &nbsp; &nbsp; &nbsp; [int]$umber<br>&nbsp; &nbsp; )<br>&nbsp; &nbsp; $x = 0<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while($x -lt $Pindala) {<br>&nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; $x++<br>&nbsp; &nbsp; }&nbsp; &nbsp;<br>&nbsp; &nbsp; [int]$pikkus = Read-Host -Prompt "sisesta pikkus:"<br>&nbsp; &nbsp; [int]$laius = Read-Host -Prompt "sisesta laius:"<br>&nbsp; &nbsp; {<br>}<br>Write-Host "Ümbermõõt on:" ($pikkus*2+$laius*2)<br>}<br>Calc-Umber -umber 1<br><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-19 14:32:10 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/148089272</guid>
      </item>
      <item>
         <title>installitud programmid</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/148282787</link>
         <description><![CDATA[<div>
<br>
<br>
<br>
<br>Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize &gt; C:\Users\Kasutaja\Documents\InstalledtPrograms-PS.txt</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-20 07:05:36 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/148282787</guid>
      </item>
      <item>
         <title>FailidArvutist</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/148304064</link>
         <description><![CDATA[<div>&nbsp;CLS&nbsp; &nbsp;<br>function show-installedsoftware {<br>&nbsp; &nbsp; param([Parameter(mandatory=$true)]<br>&nbsp; &nbsp; &nbsp; &nbsp; [ValidateSet("Full", "Search")]<br>&nbsp; &nbsp; &nbsp; &nbsp; [string]$Action,<br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; [string]$Phrase<br>&nbsp; &nbsp; )<br>&nbsp; &nbsp; $regKey = "HKLM:\software\Wow6432Node\Microsoft\windows\CurrentVersion\Uninstall\*"<br>&nbsp; &nbsp; <br>&nbsp; &nbsp; if($Action -eq "Full") {<br>&nbsp; &nbsp; &nbsp; &nbsp; Get-ItemProperty $regKey | Select-Object DisplayName |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Where-Object { $_.DisplayName -ne $null} |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sort-Object DisplayName<br>&nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; if($Phrase -ne "") {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Get-ItemProperty $regKey |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ForEach-Object {Get-ItemProperty $_.PSPath} |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Select-Object DisplayName |<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sort-Object DisplayName<br>&nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Write-Host "Otsingu fraas on puudu"<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; <br>}<br>show-installedsoftware</div>]]></description>
         <enclosure url="" />
         <pubDate>2017-01-20 09:28:25 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/148304064</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/252514268</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/282849655/e1104bb1ec9bda030ad9b6babd356fb5/Essentials_Training_Course.pdf" />
         <pubDate>2018-04-17 11:38:17 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/252514268</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/252514486</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/282849655/94c5f9586ce5b080250149079a325842/mtcna_training_materials__2016_03_.pdf" />
         <pubDate>2018-04-17 11:39:07 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/252514486</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/252903616</link>
         <description><![CDATA[]]></description>
         <enclosure url="http://copycatl.blogspot.com.ee/2017/01/contoh-soal-dalam-test-mtcna-mikrotik.html" />
         <pubDate>2018-04-18 09:18:33 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/252903616</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/252903784</link>
         <description><![CDATA[]]></description>
         <enclosure url="http://penegy.blogspot.com.ee/2014/09/mtcna-exam-sample.html" />
         <pubDate>2018-04-18 09:18:44 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/252903784</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/252903950</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://www.scribd.com/document/366814681/MikroTik-MTCNA-Test" />
         <pubDate>2018-04-18 09:18:54 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/252903950</guid>
      </item>
      <item>
         <title>https://pauliggroup.sharepoint.com/sites/projects2/PG_EST_HUB_STICKERING/STICKERS%20BALTIC/Forms/AllItems.aspx?viewpath=%2Fsites%2Fprojects2%2FPG%5FEST%5FHUB%5FSTICKERING%2FSTICKERS%20BALTIC%2FForms%2FAllItems%2Easpx&amp;id=%2Fsites%2Fprojects2%2FPG%5FEST%5FHUB%5FSTICKERING%2FSTICKERS%20BALTIC%2FWORK%20INSTRUCTIONS</title>
         <author></author>
         <link>https://padlet.com/mariokuum/skriptit15/wish/351585719</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2019-04-15 08:15:34 UTC</pubDate>
         <guid>https://padlet.com/mariokuum/skriptit15/wish/351585719</guid>
      </item>
   </channel>
</rss>
