Tag Archives: powershell

Dot.Net and PowerShell

PS C:\Users\IBM_ADMIN> [IO.Path]::GetTempPath() C:\windows\TEMP\ Advertisements

Posted in develop | Tagged , | Leave a comment

Remove SQL Server components

From https://www.mssqltips.com/sqlservertip/4050/cleanly-uninstalling-stubborn-sql-server-components/ Prerequisite MSI Inventory tool, which you can download msiinv_new.zip You can get the GUID associated with each installed product by searching around the registry, but I would rather use the MSI Inventory tool, which you can download (msiinv_new.zip) … Continue reading

Posted in tools | Tagged , , , , | Leave a comment

Remotely setting network credentials using cmdkey

https://powershell.org/forums/topic/remotely-setting-network-credentials-using-cmdkey/ I have a task to automate the build on Azure VM with custom extension scripts. One of the tasks of the custom extension scripts is to map network drives [and save its credentials]. The custom extension scripts are automatically … Continue reading

Posted in develop | Tagged , , , , | Leave a comment

Update assemblyinfo.cs for a maintenance release

Function update_assemblyinfo_cs($path) { #[Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8 LogWrite “#####################################################” LogWrite “### Update the assemblyinfo.cs files              ###” LogWrite “#####################################################” $stanzaToFind = “BUILD_TSM_V” + $global:version + $global:release + $global:level $oldStanzaToFind = “BUILD_TSM_V” + $global:previousVersion + $global:previousRelease + $global:previousLevel Get-ChildItem $path -Recurse -Filter “assemblyinfo.cs” … Continue reading

Posted in develop | Tagged , , | Leave a comment

Microsoft SQL Server Powershell

https://www.mssqltips.com/sqlservertip/1759/retrieve-a-list-of-sql-server-databases-and-their-properties-using-powershell/ https://books.google.co.uk/books?id=SjnlCwAAQBAJ&pg=PA344&lpg=PA344&dq=sql+powershell+set+PrimaryFilePath&source=bl&ots=n8gFMa3Cq8&sig=wkCX6kKziGyEgBBPgvXFe9ZbSL0&hl=en&sa=X&ved=0ahUKEwjz2sfxjZvPAhXDZpoKHdDuDiAQ6AEIQDAF#v=onepage&q=sql%20powershell%20set%20PrimaryFilePath&f=false https://books.google.co.uk/books?id=SjnlCwAAQBAJ&printsec=frontcover http://sqlblog.com/blogs/allen_white/archive/2008/04/28/create-database-from-powershell.aspx To see the details on any error run: $error[0]|format-list -force

Posted in develop | Tagged , , , , | Leave a comment

Exchange Remote PS error

Issue C:\Program Files\Tivoli\tsm\TDPExchange>tdpexcc.exe delete back Ca24_MailboxDB_003 copy IBM Spectrum Protect for Mail: Data Protection for Microsoft Exchange Server Version 8, Release 1, Level 0.0 (C) Copyright IBM Corporation 1998, 2016. All rights reserved. [veguardian-ca24] Connecting to remote server veguardian-ca24 failed … Continue reading

Posted in develop | Tagged , , , , , , , | Leave a comment

15 Ways to Bypass the PowerShell Execution Policy

https://blog.netspi.com/15-ways-to-bypass-the-powershell-execution-policy/

Posted in develop | Tagged , | Leave a comment