Known Issues: On High Sierra there are problems related to the screen brightness and sleep issues.
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
az ad sp list \ | |
--all \ | |
--query "[?passwordCredentials[0].endDate<='$(date -d "+60 days" +%Y-%m-%d)'||keyCredentials[0].endDate<='$(date -d "+60 days" +%Y-%m-%d)'].{\"App ID Display Name\":appDisplayName,\"SP appId\":appId,\"Password Expiry Date\":passwordCredentials[0].endDate, \"Key Expiry Date\":keyCredentials[0].endDate}" \ | |
-o table |
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
$tokenPoSh = ((New-Object Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient([Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile)).AcquireAccessToken((Gaz account get-access-tokenId)).AccessToken | |
$tokenCLI = az account get-access-token --query "accessToken" |
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
#!/bin/bash | |
# Update the package index | |
sudo apt-get update | |
# Install the latest version of docker | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
# add current user to the docker group |
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
Add-WindowsFeature Web-Server; powershell Add-Content -Path "C:\inetpub\wwwroot\Default.htm" -Value $($env:computername) |
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
#!/bin/bash | |
# | |
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
# Adapted to work with the official image available into Mac App Store | |
# | |
# Enjoy! | |
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
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-aduser -filter {-not(employeeid -like "*") -and (enabled -eq $true)} -properties * | select userprincipalname, samaccountname, surname, givenname, sid, employeeid | export-csv ~\Downloads\ADUsersWithNoEmployeeID.csv -NoTypeInformation |
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-aduser -filter {-not(office -like "*") -and (enabled -eq $true)} -properties * | select userprincipalname, samaccountname, surname, givenname, sid, office | export-csv ~\Downloads\ADUsersWithNoOffice.csv -NoTypeInformation |
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
$cred = Get-Credential | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection | |
Import-PSSession $Session | |
$mailboxes = Get-Mailbox -ResultSize Unlimited | |
foreach ($mailbox in $mailboxes) { | |
$mbSize = 0 | |
$mbSizeText = (Get-MailboxStatistics -Identity $mailbox.UserPrincipalName).TotalItemSize | |
if ($mbSizeText -ne "Unlimited") { | |
$mbSize = ((Get-MailboxStatistics -Identity $mailbox.UserPrincipalName).TotalItemSize -replace “(.*\()|,| [a-z]*\)”, “”) |
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 MSOline -EA 0 | |
Connect-MsolService -Credential (Get-Credential) | |
$admins=@() | |
$roles = Get-MsolRole | |
foreach ($role in $roles) { | |
$roleUsers = Get-MsolRoleMember -RoleObjectId $role.ObjectId |