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
| <# | |
| More about Feedly API - #The feedly Cloud API - https://developer.feedly.com/ | |
| What are the differences with a regular access token? | |
| A developer access token has a longer life than a regular access token: it expire after 30 days (instead of one week). | |
| It can be renewed by feedly pro accounts. It is limited to 250 API requests per day | |
| #> | |
| ######################### Global variable ####################################### |
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
| try | |
| { | |
| Get-Function | |
| } | |
| catch | |
| { | |
| $_.Exception.Message | |
| } |
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
| try | |
| { | |
| Get-Item E:\File | |
| } | |
| catch | |
| { | |
| $_.Exception.Message | |
| } |
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
| try | |
| { | |
| Get-Item -Path F:\file, D:\temp -ErrorAction Stop | |
| } | |
| catch | |
| { | |
| Write-Warning $_.Exception.Message | |
| } | |
| finally | |
| { |
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
| $oldErrorActionPreference = $ErrorActionPreference | |
| $ErrorActionPreference = 'Stop' | |
| try | |
| { | |
| Get-Item -Path F:\file, D:\temp | |
| } | |
| catch{ | |
| Write-Warning $_.Exception.Message -ForegroundColor Yellow | |
| } |
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
| $Error.Clear() | |
| Get-Item -Path F:\file, D:\temp -ErrorAction SilentlyContinue | |
| if(-not $?) | |
| { | |
| Write-Warning $Error[0].Exception.Message | |
| } |
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
| $Error.Clear() | |
| $oldErrorActionPreference = $ErrorActionPreference | |
| $ErrorActionPreference = 'SilentlyContinue' | |
| Get-Item -Path F:\file, D:\temp | |
| if(-not $?) | |
| { | |
| Write-Warning $Error[0].Exception.Message | |
| } | |
| $ErrorActionPreference = $oldErrorActionPreference |
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
| try | |
| { | |
| Get-ItemFile | |
| } | |
| catch{ | |
| Write-Host $_.Exception.Message | |
| } | |
| finally | |
| { | |
| Write-Host "koniec przykładu ..." |
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 Test-Trap { | |
| trap {"Error found: $_"} | |
| $WebSite = Invoke-WebRequest -Uri "https://google.tv" -TimeoutSec 5 | |
| Write-Output $WebSite.StatusDescription | |
| } | |
| Test-Trap |
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
| powercfg /list | |
| <# | |
| Existing Power Schemes (* Active) | |
| ----------------------------------- | |
| Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Zr˘wnowaľony) * | |
| Power Scheme GUID: 64e503f0-b342-49a3-be71-aea540101d3f (Zegary wyĄczone (prezentacja)) | |
| Power Scheme GUID: 94334198-5f41-42e4-b4b5-6732b7e13386 (Samolotowy) | |
| #> | |
| $PowerSchemeGUID = "381b4222-f694-41f0-9685-ff5bb260df2e" |
OlderNewer