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-Module -Name azure* -ListAvailable | | |
Where-Object -Property Name -ne 'AzureRM' | | |
ForEach-Object { | |
$currentVersion = [Version] $_.Version | |
$newVersion = [Version] (Find-Module -Name $_.Name).Version | |
if ($newVersion -gt $currentVersion) { | |
Write-Host -Object "Updating $_ Module from $currentVersion to $newVersion" | |
Update-Module -Name $_.Name -RequiredVersion $newVersion -Force | |
Uninstall-Module -Name $_.Name -RequiredVersion $currentVersion -Force | |
} |
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 New-WPFMessageBox { | |
# For examples for use, see my blog: | |
# https://smsagent.wordpress.com/2017/08/24/a-customisable-wpf-messagebox-for-powershell/ | |
# CHANGES | |
# 2017-09-11 - Added some required assemblies in the dynamic parameters to avoid errors when run from the PS console host. | |
# Define Parameters | |
[CmdletBinding()] |
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
# ******************************************************************************** | |
# | |
# Script Name: DangItBobby.ps1 | |
# Version: 1.0.0 | |
# Author: bluesoul <https://bluesoul.me> | |
# Date: 2016-04-06 | |
# Applies to: Domain Environments | |
# | |
# Description: This script searches for a specific, logged on user on all or | |
# specific Computers by checking the process "explorer.exe" and its owner. It |
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 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' |