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 2.0 | |
| function Publish-LyncContactInformation { | |
| <# | |
| .Synopsis | |
| Publish-LyncContactInformation is a PowerShell function to configure a set of settings in the Microsoft Lync client. | |
| .DESCRIPTION | |
| The purpose of Publish-LyncContactInformation is to demonstrate how PowerShell can be used to interact with the Lync SDK. | |
| Tested with Lync 2013 only. |
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
| $cred = Get-Credential | |
| Register-ScheduledJob -Name "Publish-LyncContactInformation - Available" -ScriptBlock { | |
| function Publish-LyncContactInformation { | |
| <# | |
| .Synopsis | |
| Publish-LyncContactInformation is a PowerShell function to configure a set of settings in the Microsoft Lync client. | |
| .DESCRIPTION |
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-PrinterDriver | Select-Object Name,@{ | |
| n="DriverVersion";e={ | |
| $ver = $_.DriverVersion | |
| $rev = $ver -band 0xffff | |
| $build = ($ver -shr 16) -band 0xffff | |
| $minor = ($ver -shr 32) -band 0xffff | |
| $major = ($ver -shr 48) -band 0xffff | |
| "$major.$minor.$build.$rev" |
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
| $ClusterDisks = Get-CimInstance -ClassName MSCluster_Resource -Namespace root/mscluster -Filter "type = 'Physical Disk'" | |
| foreach ($Disk in $ClusterDisks) { | |
| $DiskResource = Get-CimAssociatedInstance -InputObject $Disk -ResultClass MSCluster_DiskPartition | |
| if (-not ($DiskResource.VolumeLabel -eq $Disk.Name)) { | |
| Invoke-CimMethod -InputObject $Disk -MethodName Rename -Arguments @{newName = $DiskResource.VolumeLabel} |
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
| # Import the module | |
| $RTSPSModule = Join-Path -Path ${env:ProgramFiles(x86)} -ChildPath 'code4ward.net\Royal TS V3\RoyalDocument.PowerShell.dll' | |
| Import-Module $RTSPSModule | |
| # Explore available cmdlets | |
| Get-Command -Module RoyalDocument.PowerShell | |
| # Create a new RoyalStore in memory | |
| $Store = New-RoyalStore -UserName ($env:USERDOMAIN + '\' + $env:USERNAME) |
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
| # 1 | |
| $Capabilities = @{MilitaryService = $false | |
| DrinkAlcohol = $false | |
| Vote = $false} | |
| # 2 | |
| $Capabilities = @{MilitaryService = $false | |
| DrinkAlcohol = $false | |
| Vote = $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
| PS C:\> Get-TimeZone | |
| Id : W. Europe Standard Time | |
| DisplayName : (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna | |
| StandardName : W. Europe Standard Time | |
| DaylightName : W. Europe Daylight Time | |
| BaseUtcOffset : 01:00:00 | |
| SupportsDaylightSavingTime : True |
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 5 | |
| <# | |
| NAME: Install-SysinternalsSuiteNano.ps1 | |
| AUTHOR: Jan Egil Ring (@JanEgilRing) | |
| COMMENT: This script will download the Nano Server version of the Sysinternals Suite and extract it to the specified target directory. |
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 Send-ToastyMessage | |
| { | |
| [CmdletBinding()] | |
| param | |
| ( | |
| [Parameter(Mandatory=$false)] | |
| [string] | |
| $DeviceID = '337f73c3-9c13-4b34-a2b4-63a14b1d2dd', | |
| [Parameter(Mandatory=$true)] |
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
| <# | |
| NAME: Invoke-OMSAlertDiskCleanup.ps1 | |
| AUTHOR: Jan Egil Ring (@JanEgilRing) | |
| COMMENT: This is a demo script intended to be imported as a runbook in Azure Automation to demonstrate the alerts integration | |
| between Microsoft Operations Management Suite (OMS) and Azure Automation. | |
| The runbook is intended to be run on a Hybrid Runbook Worker. | |
| More information about the context for this demo script is available in this article on PowerShell Magazine: |