Podemos usar la función "Remove" para eliminar al ultimo caracter de nuestro texto: myText = myText.Remove(myText.Length - 1, 1); Por ejemplo, si queremos eliminar si el ultimo caracter de nuestro texto es una coma: if(myText.EndsWith(",")) { myText = myText.Remove(myText.Length - 1, 1); }
Etiqueta: remove
Crear Team Site en SharePoint Online Sin Office 365 Group con PnP PowerShell
Para crear un Team Site sin que tenga un grupo de Office 365 asignado por defecto tan solo debemos específicar el template "STS#3" a la hora de crearlo. Ejemplo con PnP PowerShell: Connect-PnPOnline -Url https://MY_TENANT.sharepoint.com New-PnPTenantSite ` -Title "MY_SITE" ` -Url "https://MY_TENANT.sharepoint.com/sites/MY_SITE" ` -Owner "MY_USER@MY_TENANT.onmicrosoft.com" ` -Template "STS#3" ` -TimeZone 3 ` -Wait Para obtener …
Sigue leyendo Crear Team Site en SharePoint Online Sin Office 365 Group con PnP PowerShell
Eliminar una columna de todas las listas via Power Shell
Puede ocurrir que al crear una Site Column y agregarla a un Content Type, nos hayamos equivocado en algún parámetro (el campo Required, por ejemplo). Hemos decidido borrar la columna y para ello la borramos del Content Type y procedemos a eliminarla de las columnas de sitio. No obstante, si tenemos listas que utilicen ese …
Sigue leyendo Eliminar una columna de todas las listas via Power Shell
Eliminar una App de SharePoint via Power Shell
1. Abrimos la SharePoint Management Shell. 2. Ejecutamos el comando que nos obtiene la app, ya sea por nombre o por identificador: $app = Get-WmiObject -Class Win32_Product -Filter "Name='MY APP NAME'" $app = Get-WmiObject -Class Win32_Product -Filter "IdentifyingNumber='MY APP ID'" 3. Ejecutamos el comando que la desinstala: $app.Uninstall()
Crear notificaciones nativas de SharePoint en código cliente
Crear notificación propia de SharePoint: var notifyId = ''; notifyId = SP.UI.Notify.addNotification("Hello World!", true); El primer parametro es HTML (podemos personalizarlo). El segundo parametro es para que desaparezca: "true" hará que se mantenga hasta que clickemos sobre él, "false" hará que desaparezca al cabo de unos segundos. notifyId tendrá el identificador, que nos servirá para …
Sigue leyendo Crear notificaciones nativas de SharePoint en código cliente
Borrar DLL de la GAC
El método correcto de borrar DLLs de la GAC es el siguiente: 1. Abrimos la consola de Visual Studio (Developer Command Prompt for VS2013 en el caso de Visual Studio 2013). 2. Navegamos hasta el directorio donde están nuestras DLL (cd C:WindowsMicrosoft .NETassemblyGAC_MSIL). 3. Ejecutamos el siguiente comando: gacutil -u NOMBRE_DE_MI_DLL Ejemplo (Borrar la DLL …
Windows Server 2012: Turn Off Windows Firewall in 5 steps
1. Go to Control Panel and System and Security 2. Go to Windows Firewall 3. From the left menu, select Turn Windows Firewall on or off 4. Check all options with Turn off Windows Firewall (not recommended) 5. All options should be red now
Mount VHD from Command Prompt
Mount VHD: DISKPART SELECT VDISK FILE="D:MyVHDDisk.vhd" ATTACH VDISK Dismount VHD: DETACH VDISK
Hide elements in Modal Dialog (SharePoint PopUp)
When a page is loaded in a Modal Dialog, its URL ends with "IsDlg=1", that means that it's being opened in a SharePoint PopUp. If you need to hide some elements when that happens (e.g. hide master page elements) you need to add a new class to these elements: Adding class "ms-dialogHidden" to an element …
Sigue leyendo Hide elements in Modal Dialog (SharePoint PopUp)
Change IP from Host File
This script works doing a PING request and obtaining its resultant IP. Feel free to change it and modify it as you need. First part does the PING request, second part changes the Host File and the third part opens the hosts file. Explanation of the secon part: 1. Save the Hosts File text in …