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-AgeAndGender() | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$true,ValueFromPipeline=$true)] | |
| [string] $ImagePath | |
| ) | |
| $Splat = @{ | |
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 Create-Form | |
| { | |
| #Calling the Assemblies | |
| [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null | |
| # Create the Conatainer Form to place the Labels and Textboxes | |
| $Form = New-Object “System.Windows.Forms.Form”; | |
| $Form.Width = 500; | |
| $Form.Height = 400; | |
| $Form.Text = 'Enter the required details' |
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 Break-IntoWords() | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] | |
| [string] $String | |
| ) | |
| Process{ | |
| Foreach($S in (Clean-String $String)) |
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 Check-Spelling() | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=0,ValueFromPipeline=$True)] | |
| [String] $String, | |
| [Switch] $ShowErrors, | |
| [Switch] $RemoveSpecialChars | |
| ) | |
| Process{ |
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-ImageText() | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=0,ValueFromPipeline=$True)] | |
| [String] $Path | |
| ) | |
| Process{ | |
| $SplatInput = @{ |
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-Snoverism | |
| { | |
| $URL = "http://snoverisms.com/" | |
| (Invoke-WebRequest $URL).images.src |?{$_ -match 'quotes'}| Get-Random -Count 1 | %{$URL+$_} | |
| } | |
| Function Get-ImageText() | |
| { | |
| [CmdletBinding()] | |
| Param( |
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-MailboxStatistics -Database DBNAME | where {$_.DisconnectReason -eq “SoftDeleted”} | ` | |
| %{Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted -Confirm:$false} |
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
| #Exchange | |
| Import-pssession $(New-PSSession -ConfigurationName Microsoft.Exchange ` | |
| -ConnectionUri http://CAS_SERVER/PowerShell/ -Authentication Kerberos -Credential (Get-Credential)) | |
| #Lync | |
| Import-pssession $(New-PSSession -ConnectionUri https://LYNC_SERVER_FQDN/ocspowershell/ -Credential (Get-Credential)) |
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 Start-Translation() | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=0,ValueFromPipeline=$True)] | |
| [String] $Text, | |
| [String] [validateSet('Arabic','Hindi','Japanese','Russian','Spanish','French',` | |
| 'English','Korean','Urdu','Italian','Portuguese','German','Chinese Simplified') | |
| ]$From, | |
| [String] [validateSet('Arabic','Hindi','Japanese','Russian','Spanish','French',` |
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-Content C:\server.txt | ` | |
| foreach { Test-Connection ($_.ToString()+'ilo') -Count 1} ` | |
| | ft -property @{l='Server Name';e={(($_.address).split("ilo"))[0]}}, @{l='iLO Ip Address';e={$_.ipv4address}} -AutoSize |