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-ADUser -Filter * -Properties proxyaddresses | Select-Object Name, @{L = "ProxyAddresses"; E = { $_.ProxyAddresses -join ";"}} | Export-Csv -Path c:\temp\proxyaddresses.csv -NoTypeInformation |
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
| #To generate the encrypted password file, login as the user in which the task will run under. | |
| $credential = Get-Credential [email protected] | |
| $credential.Password | ConvertFrom-SecureString | Set-Content "Schedule365.txt" | |
| #365 Admin Account to be used | |
| $admin = "[email protected]" | |
| #Get Encrypted Password File | |
| $password = Get-Content "C:\Scripts\Schedule365.txt" | ConvertTo-SecureString |
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
| /* CREATE A NEW ROLE */ | |
| CREATE ROLE db_executor | |
| /* GRANT EXECUTE TO THE ROLE */ | |
| GRANT EXECUTE TO db_executor |
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
| Add-AzureRemoteAppUser -CollectionName "Contoso" -Type OrgId -UserUpn [email protected] |
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
| $Credential = Get-Credential | |
| $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic -AllowRedirection | |
| Import-PSSession $Session |
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-ADObject -SearchBase ((GET-ADRootDSE).SchemaNamingContext) -Filter {Name -like "ms-FVE-*"} |
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
| '=============================================================================== | |
| ' | |
| ' This script demonstrates the addition of an Access Control Entry (ACE) | |
| ' to allow computers to write Trusted Platform Module (TPM) | |
| ' recovery information to Active Directory. | |
| ' | |
| ' This script creates a SELF ACE on the top-level domain object, and | |
| ' assumes that inheritance of ACL's from the top-level domain object to | |
| ' down-level computer objects are enabled. | |
| ' |
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
| $VM = Get-AzureVM -ServiceName "cloudservicename" -Name "VirtualMachineName" | |
| for ($Port = 6000; $Port -le 6100; $Port++) | |
| { | |
| $VM = $VM | Add-AzureEndpoint -Name "FTP-Pasv-$Port" -Protocol 'TCP' -LocalPort $Port -PublicPort $Port | |
| } | |
| $VM | Update-AzureVM |
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
| # To Enable Modern Auth | |
| Set-OrganizationConfig -OAuth2ClientProfileEnabled:$true | |
| # Verify that the change was successful by running the following: | |
| Get-OrganizationConfig | ft name, *OAuth* |
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
| # Download and install the Skype PowerShell Command http://go.microsoft.com/fwlink/?LinkId=294688 | |
| $credential = Get-Credential | |
| $session = New-CsOnlineSession -Credential $credential | |
| Import-PSSession $session |
OlderNewer