Onedrive: Jesús Octavio Rodríguez

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

OneDrive

Jesús Octavio Rodríguez

Archivos de ejercicios
Esta hoja de ejercicios pertenece al curso « Microsoft Intune y Autopilot
esencial » de https://www.linkedin.com/learning
#Guardar con extensión .PS1
#######################################################################
###########################
<#
.SYNOPSIS
Policy Definition template file for Intune to run with the Microsoft Intune Management
Extention
This policy setup OneDrive For Business with AutoConfigure and KFM
.NOTES
FileName: OneDrive for Business Configure.ps1
Author: Per Larsen
Created: 11-07-2018
Product: OneDrive for Business
Version: 1.0
#>
#######################################################################
############################

$TenantID = «cf452018-792d-4227-af1a-66f280f9c30c»

$registryPath = «HKLM:\SOFTWARE\Policies\Microsoft\OneDrive»
$Name = «SilentAccountConfig»
$value = «1»
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
$registryPath = «HKLM:\SOFTWARE\Policies\Microsoft\OneDrive»
$Name = «FilesOnDemandEnabled»
$value = «1»

Microsoft Intune y Autopilot esencial


OneDrive página 1
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
$registryPath = «HKLM:\SOFTWARE\Policies\Microsoft\OneDrive»
$Name = «KFMBlockOptIn»
$value = «1»
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
$registryPath = «HKLM:\SOFTWARE\Policies\Microsoft\OneDrive»
$Name = «KFMSilentOptIn»
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $TenantID `
-PropertyType String -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $TenantID `
-PropertyType String -Force | Out-Null}
$registryPath = «HKLM:\SOFTWARE\Policies\Microsoft\OneDrive»
$Name = «KFMSilentOptInWithNotification»
$value = «0»

Microsoft Intune y Autopilot esencial


OneDrive página 2
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
$registryPath = «HKLM:\SOFTWARE\Policies\Microsoft\OneDrive»
$Name = «KFMBlockOptOut»
$value = «1»
IF(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value `
-PropertyType DWORD -Force | Out-Null}

Microsoft Intune y Autopilot esencial


OneDrive página 3

You might also like