Ir al contenido principal

Entradas

Mostrando las entradas etiquetadas como PowerShell

[O365] Bloquear globalmente la compra de autoservicio en Microsoft 365 | Configuración única, protección permanente

  Para deshabilitar los registros de autoservicio de Microsoft en Microsoft 365, simplemente puede ejecutar el siguiente cmdlet.   Set-MsolCompanySettings -AllowAdHocSubscriptions $false Nota:  Debe instalar el módulo MSOnline antes de ejecutar el cmdlet.  Para instalar y conectarse a MSolService, ejecute el siguiente código.   Install-Module MSOnline Import-Module –Name MSOnline Connect-MsolService     Para comprobar el estado del autoservicio en todo el inquilino, ejecute el siguiente cmdlet.   Set-MsolCompanySettings -AllowAdHocSubscriptions $false Si el valor se establece en  $true  , la capacidad de autoservicio está habilitada.  Si el valor se establece en  $false  , la prueba y la compra de autoservicio están deshabilitadas.   En cualquier momento, los administradores tienen la flexibilidad de habilitar el registro de autoservicio según los requisitos de la organización.  Para habilitarlo, puede utilizar e...

PowerShell - SharePoint - How to get SPO site created date

You can get SPO site collection date by using below PowerShell script Get-SPSite -Limit All | % { $root = $_ . rootweb; $date = $root . created . toShortDateString();   Write-Host " $( $root . url) was created on $( $date ) " }    Fuente: https://www.c-sharpcorner.com/forums/how-to-get-spo-site-created-date 

PowerShell - SPOnPremise - Calculate and Set Distributed Cache Size

#calculation from:  http://technet.microsoft.com/en-us/library/jj219613.aspx $membanks = get-wmiobject Win32_PhysicalMemory $sum = 0 $i = 1 foreach ( $membank in $membanks ) {   write-host "Capacity Memory $i = " ( $membank . capacity / 1024 / 1024 )   $sum = ( $membank . capacity / 1024 / 1024 ) + $sum   $i = $i + 1 } write-host "Sum of Memory = " $sum $cachesize = ( $sum - 2048 ) / 2 if ( $cachesize > 16384 )   {   $cachesize = 16384 #not more than 16GB   } write-host "Distributed Cachesize will be updated to: " $cachesize #Update-SPDistributedCacheSize -CacheSizeInMB $cachesize Fuente: https://blogs.technet.microsoft.com/sp/?p=213 

PowerShell - SharePointOnline - Queries the active site collections in O365 tenant to generate reports based on template type used by the site collection

# Requires Windows PowerShell version 3 $tenant = "" <#   Description:     Queries the active site collections in O365 tenant to generate reports based on template type used     by the site collection. And will generate report with all site collections in tenant.     Details of the discovered sites are written to a .csv file for each template type.     The .csv files will be found in the directory the script is ran from.   Requirements:     SharePoint Online Management Shell - Current build     http://www.microsoft.com/en-us/download/details.aspx?id=35588 ============================================================== #> # Set tenant values $SPOAdminCenter = "https:// $tenant -admin.sharepoint.com" $AdminCredential = "" #Report Files Names $reportNameGroups = "GroupsSiteInfo_ $(( Get-Date ) . ToString( "yyyy-MM-dd_hh.mm.ss" )) .c...

PowerShell - Get Database Size for all SharePoint DBs via PowerShell

Get Database Size for all SharePoint DBs via PowerShell Add-PSSnapin microsoft.sharepoint.powershell $size = 0 foreach ( $db in Get-SPContentDatabase ) {     $size = $size + $db . DiskSizeRequired } $cdbs = "{0:N2}" -f ( $size / 1gb ) $ssa = Get-SPEnterpriseSearchServiceApplication $topo = $ssa | Get-SPEnterpriseSearchTopology   -Active $indexcomponent = ( Get-SPEnterpriseSearchComponent -SearchTopology $topo | ? { $_ . name -like "*index*" }) [ 0 ] $folder = $indexcomponent . RootDirectory $indexsize = "{0:N2}" -f (( Get-ChildItem $folder -Recurse | Measure-Object -sum   Length ) . sum / 1GB ) $dbs = Get-SPDatabase cls write-host "--------------------------------------------------------------------------------------" -fore green Get-Date write-host "" write-host "--------------------------------------------------------------------------------...