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-StoicQuote { | |
<# | |
.SYNOPSIS | |
Fetches a random Stoicism quote from the Stoic API. | |
.DESCRIPTION | |
This function retrieves a random Stoicism quote from the API and displays the | |
author and quote to the user. The API does not require authentication. | |
.EXAMPLE |
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
#Requires -Version 7.0 | |
<# | |
.SYNOPSIS | |
Updates PowerShell modules to their latest versions. | |
.DESCRIPTION | |
Updates all or specified PowerShell modules to their latest versions, with options for | |
prerelease versions and parallel processing. Automatically removes older versions after update. | |
.PARAMETER AllowPrerelease | |
If specified, allows updating to prerelease versions. | |
.PARAMETER Name |
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
# Output | |
Write-Output "Hello, World!" # Outputs: Hello, World! | |
# Variables | |
$x = 5 # Integer variable | |
$name = "Alice" # String variable | |
$a, $b, $c = 1, 2, 3 # Multiple assignments | |
# Data Types | |
$integer = 10 # [int] |
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
"Get-MgBetaUser", | |
"Get-MgBetagroup", | |
"Sync-MgBetaDeviceManagementDepOnboardingSettingWithAppleDeviceEnrollmentProgram", | |
"Get-MgBetaDeviceAppManagementMobileApp", | |
"Sync-MgBetaDeviceAppManagementVppTokenLicense", | |
"Get-MgBetaDeviceAppManagementVppToken" | % { | |
$cmdlet = $_ | |
Find-MgGraphCommand $cmdlet | select -ExpandProperty Permissions | |
} | Sort-Object Name -Unique |
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-PSModuleUpdates { | |
param | |
( | |
[Parameter(ValueFromPipelineByPropertyName, Mandatory)] | |
[string]$Name, | |
[Parameter(ValueFromPipelineByPropertyName, Mandatory)] | |
[version]$Version, | |
[Parameter(ValueFromPipelineByPropertyName)] |