This file contains 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
%global pecl_name yaml | |
%global ini_name 40-%{pecl_name}.ini | |
# Change default build against scl rh-php71 | |
%{!?scl:%global scl rh-php71} | |
%{?scl:%scl_package php-pecl-yaml} | |
%{!?scl:%global pkg_name %{name}} | |
Name: %{?scl_prefix}php-pecl-yaml |
This file contains 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
$passwd = (Get-Content /etc/passwd).ForEach({ | |
$userfields = $_ -split ':' | |
return [pscustomobject]@{ | |
UserName = $UserFields[0] | |
ShadowFile = $(if ($userfields[1] -eq 'x') { $true }else { $false }) | |
UserId = $UserFields[2] | |
GroupId = $userfields[3] | |
FullName = $Userfields[4] | |
HomeDirectory = $UserFields[5] | |
ShellAccount = $Userfields[6] |
This file contains 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
Set-AdAccountPassword -Identity $env:UserName -OldPassword (Read-Host -asSecureString "Enter the current password") -NewPassword (Read-Host -asSecureString "Enter the new password") |
This file contains 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
([adsi]'WinNT://domain/username,user').ChangePassword('oldpassword','newpassword') |
This file contains 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-VM).Where( {$_.ExtensionData.Guest.ToolsVersionStatus -eq "guestToolsNeedUpgrade" -and $_.PowerState -eq "PoweredOn"}) | Get-VMGuest | Where-Object {$_.GuestFamily -eq "windowsGuest" } | Update-Tools -NoReboot -RunAsync |
This file contains 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 5.1 | |
<# | |
sample usage | |
get-dockercontainer | |
get-dockercontainer | select * | |
get-dockercontainer -all | format-table -view stats | |
#> | |
Function Get-DockerContainer |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration> | |
<ViewDefinitions> | |
<View> | |
<!--Created 03/27/2019 17:01:10 by BOVINE320\Jeff--> | |
<Name>default</Name> | |
<ViewSelectedBy> | |
<TypeName>Get-DockerContainer.myDockerContainer</TypeName> | |
</ViewSelectedBy> | |
<GroupBy> |
This file contains 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 5.1 | |
Function Get-GitConfig { | |
<# | |
.SYNOPSIS | |
Get git configuration settings | |
.DESCRIPTION | |
Git stores configurations settings in a simple text file format. Fortunately, this file is structured and predictable. This command will process git configuration information into PowerShell friendly output. | |
.PARAMETER Scope |
This file contains 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-GitSize { | |
<# | |
.SYNOPSIS | |
Get the size of .git folder | |
.DESCRIPTION | |
When using git, it creates a hidden folder for change tracking. Because the file is hidden it is easy to overlook how large it might become. Specify the parent folder path. The result displays the size value in bytes but there are additional properties that show the value formatted in KB, MB or GB. | |
.PARAMETER Path | |
The path to the parent folder, not the .git folder. | |
.EXAMPLE | |
PS C:\scripts\PiedPiperBox> Get-GitSize |
This file contains 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 5.1 | |
Function Get-DockerDiskUsage | |
{ | |
[cmdletbinding()] | |
[alias("gddu")] | |
[OutputType("Get-DockerDiskUsage.DockerDiskUsage")] | |
Param( | |
[Parameter(Position = 0, HelpMessage = "Get specific usage types. The default is All")] | |
[ValidateSet("Images", "Containers", "Volumes", "Cache")] |
OlderNewer