#>
function Show-LargeFiles() {
param(
- [int]$Max=10
+ [int]$Max=10,
+ [string]$path="C:\Users"
)
- Get-ChildItem c:\ -r| sort -descending -property length | select -first $Max name, Length, FullName
+ Get-ChildItem $path -r | sort -descending -property length | select -first $Max name, Length, FullName
}
<#
# Stay awake to allow large transfers to complete
# without permanently giving up battery saving features
-function Invoke-StayAwake() {
+function Invoke-StayAwakeWindows() {
param($minutes=90)
$wsh = New-Object -ComObject WScript.Shell
do{
# Thank you to http://www.zhornsoftware.co.uk/caffeine/
}
-Export-ModuleMember -Function Invoke-StayAwake
\ No newline at end of file
+Export-ModuleMember -Function Invoke-StayAwakeWindows
+
+function Invoke-StayAwake() {
+ param($minutes=90)
+ do{
+ "Staying awake for $minutes minutes"
+ systemd-inhibit sleep 60
+ $minutes-=1;
+ }until($minutes -lt 0)
+}
+
+Export-ModuleMember -Function Invoke-StayAwake