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 | |
Function Get-TimezoneFromOffset() | |
{ | |
<# | |
.Synopsis | |
A function that gets the timezones that match a particular offset from UTC | |
.Parameter UTCOffset | |
A string containing offset time you require. This must match the form +NN:NN or -NN:NN. |
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
pushd %~dp0 | |
set _bcu=BiosConfigUtility.exe | |
if /I "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" set _bcu=BiosConfigUtility64.exe | |
"%_bcu%" /nspwdfile:"%~dp0BIOSPW.bin" /set:"%~dp0ProBook6470bConfig.cfg" | |
IF %ERRORLEVEL% NEQ 0 "%_bcu%" /cspwdfile:"%~dp0BIOSPW.bin" /set:"%~dp0ProBook6470bConfig.cfg" | |
popd |
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
#Set UPN for all users with mobile phone numbers to email address | |
Get-ADuser -Filter * -Properties mobilephone, mail | where {$_.mobilephone -and $_.mail -ne $_.userPrincipalName} | ForEach-Object {Set-ADuser -Identity $_.ObjectGUID -UserPrincipalName $_.mail} | |
#Set UPN for all users to email address | |
Get-ADuser -Filter * -Properties mail | where {$_.mail -ne $_.userPrincipalName} | ForEach-Object {Set-ADuser -Identity $_.ObjectGUID -UserPrincipalName $_.mail} |
NewerOlder