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
# CountWACores.ps1 | |
# Morgan Simonsen, www.cloudpower.no | |
# Count all CPU cores for subscription across all cloud services | |
$colVMs = @() | |
[int]$TotalCores = 0 | |
$VMs = (Get-AzureService).servicename | foreach {Get-AzureVM -ServiceName $_ } | |
foreach ( $VM in $VMs ) |
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-AzureService).servicename | foreach {Get-AzureVM -ServiceName $_ } | select name,AvailabilitySetName |
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
$mu = New-Object -ComObject Microsoft.Update.ServiceManager -Strict | |
$mu.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"") |
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
' FindOutdatedComputers.vbs | |
' by Morgan Simonsen | |
' http://morgansimonsen.wordpress.com | |
' | |
' This script will search an Active Directory domain for computer accounts that have | |
' not logged on the domain in the specified time limit (default 60 days). | |
' | |
' 600 000 000 100-nanosecond intervals in 1 minute | |
' 1440 minutes in 24-hours | |
' 30 * 1440 * 600 000 000 = time in 100-nanosecond intervals since 1.1.1601 |
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
<rewrite> | |
<rewriteMaps> | |
<rewriteMap name="Exchange Server" /> | |
</rewriteMaps> | |
<rules> | |
<clear /> | |
<rule name="Redirect root (Exchange Server)" enabled="true" stopProcessing="true"> | |
<match url="^$" /> | |
<conditions logicalGrouping="MatchAny" trackAllCaptures="false" /> | |
<action type="Redirect" url="/owa" appendQueryString="false" /> |
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-qadobject -SearchRoot <canonical name of domain> ´ | |
-ldapFilter '(&(objectClass=group)(mailnickname=*))' ´ | |
-service <DC FQDN> -SizeLimit 0 | Set-QADObject -ObjectAttributes ´ | |
@{adminDisplayName='';´ | |
altRecipient='';´ | |
authOrig='';´ | |
autoReplyMessage='';´ | |
deletedItemFlags='';´ | |
delivContLength='';´ | |
deliverAndRedirect='';´ |
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
Import-Module MSOnline | |
$MSOLCred = Get-Credential | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $MSOLCred -Authentication Basic –AllowRedirection | |
Import-PSSession $Session | |
Connect-MsolService -Credential $MSOLCred |
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
# Control-AzureVMs.ps1 | |
# Shut down or start a set of Windows Azure VMs in sequence | |
# v0.1 2014-01-20 | |
# | |
# Morgan Simonsen | |
# www.cloudpower.no | |
# morgansimonsen.wordpress.com | |
Select-AzureSubscription "<subscription name>" |
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
03/11/2014 22:24:44:407 NetpDoDomainJoin | |
03/11/2014 22:24:44:407 NetpMachineValidToJoin: ‘SERVER1′ | |
03/11/2014 22:24:44:407 OS Version: 6.2 | |
03/11/2014 22:24:44:407 Build number: 9200 (9200.win8_gdr.130531-1504) | |
03/11/2014 22:24:44:407 SKU: Windows Server 2012 Datacenter | |
03/11/2014 22:24:44:407 Architecture: 64-bit (AMD64) | |
03/11/2014 22:24:44:407 NetpDomainJoinLicensingCheck: ulLicenseValue=1, Status: 0x0 | |
03/11/2014 22:24:44:407 NetpGetLsaPrimaryDomain: status: 0x0 | |
03/11/2014 22:24:44:407 NetpMachineValidToJoin: status: 0x0 | |
03/11/2014 22:24:44:407 NetpJoinDomain |
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
<ClaimsProvider> | |
<DisplayName>External Azure Active Directory</DisplayName> | |
<TechnicalProfiles> | |
<TechnicalProfile Id="ExternalAzureActiveDirectory-OpenIdConnect"> | |
<DisplayName>Azure Active Directory</DisplayName> | |
<Protocol Name="OpenIdConnect" /> | |
<OutputTokenFormat>JWT</OutputTokenFormat> | |
<Metadata> | |
<Item Key="METADATA">https://login.windows.net/<insert-tenant-id>/.well-known/openid-configuration</Item> | |
<Item Key="ProviderName">https://sts.windows.net/<insert-tenant-id>/</Item> |
OlderNewer