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
<# | |
.NOTES | |
=========================================================================== | |
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.99 | |
Created on: 03.02.2016 13.58 | |
Created by: Stian Myhre | |
Organization: Amedia Teknologi AS | |
Filename: DisableAndMoveComputerObjects.ps1 | |
=========================================================================== | |
.Synopsis |
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 3 | |
<# | |
.NOTES | |
=========================================================================== | |
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.95 | |
Created on: 28.10.2015 16.18 | |
Created by: Stian Myhre (including some "stealing with pride" from Kaido Järvemets, CoreTech) | |
Organization: Amedia Teknologi | |
Filename: Add-AllPackageIDsToDistributionPointGroup.ps1 | |
=========================================================================== |
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-ADComputer -Filter {OperatingSystem -like "*Server*"} -properties * -OutVariable nodes | |
foreach ($node in $nodes.Name) | |
{ | |
if (Test-Connection -Quiet -Count 1 -ComputerName $node) | |
{ | |
if ((gwmi Win32_BIOS -ComputerName $node).serialnumber -match "VMware") | |
{ | |
Add-Content "\\path-to-txt\txt.txt" "`r$node is running VMmware" -PassThru | |
} |
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
# start as admin! | |
# prompt for username | |
$SkypeUserName = Read-Host -Prompt "What is your Skype username?" | |
# stop skype-process | |
try{ | |
if(Get-Process | ? {$_.Name -like 'skype'}) {Stop-Process -Name skype} | |
# commit changes to hosts file | |
$hostfile = "C:\Windows\System32\Drivers\etc\hosts" |