[Forum FAQ] How to format and combine PowerShell outputs

Format the output with “Format-Table” and “Format-list”
Sometimes when we query Powershell cmdlet, we would get ellipses in the result, which is not desirable.
In this scenario, we can use the cmdlet “Format-Table” and “Format-list” to view the entire output:
Get-Service | where{$_.name -like "BrokerInfrastr*"}
Get-Service | where{$_.name -like "BrokerInfrastr*"}|Format-Table –AutoSize
Get-Service | where{$_.name -like "BrokerInfrastr*"}|Format-list
Figure 1:  format powershell output
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

Thanks, this has been helpful. I have been trying to figure out how the PSObjects work.
I created a function that takes an object and creates a function to create PSObjects
Function Get-ObjectPropertiesFunction
[CmdletBinding()]
[OutputType([string])]
param
[Parameter(Mandatory=$true,
ValueFromPipeline=$false,
ValueFromPipelineByPropertyName=$false,
ValueFromRemainingArguments=$false,
Position=0,
ParameterSetName='Object')]
[ValidateNotNull()]
[ValidateNotNullOrEmpty()]
[Object]$Object
Begin
$Members=Get-Member -InputObject $Object
$ValidPropertyType = @{"{get;set;}"=$True;"{get;}"=$True;}
$ValidReturnType = @{"bool"=$True;"byte"=$True;"string"=$True;"string[]"=$True;
"int"=$True;"int16"=$True;"int32"=$True;"int64"=$True;
"uint"=$True;"uint16"=$True;"uint32"=$True;"uint64"=$True;
[string]$String=""
$String=$String+"Function Get-PSObjectPropertiesFromObject `n"
$String=$String+"{ `n"
$String=$String+" [CmdletBinding()] `n"
$String=$String+" [OutputType([PSObject[]])] `n"
$String=$String+" param `n"
$String=$String+" ( `n"
$String=$String+" [Parameter(Mandatory="+"$"+"true, `n"
$String=$String+" ValueFromPipeline="+"$"+"false, `n"
$String=$String+" ValueFromPipelineByPropertyName="+"$"+"false, `n"
$String=$String+" ValueFromRemainingArguments="+"$"+"false, `n"
$String=$String+" Position=0, `n"
$String=$String+" ParameterSetName='Object')] `n"
$String=$String+" [ValidateNotNull()] `n"
$String=$String+" [ValidateNotNullOrEmpty()] `n"
$String=$String+" [Object]"+"$"+"Object `n"
$String=$String+" ) `n"
$String=$String+" Begin `n"
$String=$String+" { `n"
$String=$String+" $"+"Output = New-Object PSObject -Property ([Ordered]@{ `n"
ForEach ($Member in $Members)
IF ($Member.MemberType -EQ "Property")
[string]$Name=$Member.Name
IF ($Name.Substring(1,1) -NE "_")
[String[]]$Definition=$Member.Definition.Split(" ")
[string]$PropertyType=$Definition[2]
IF ($ValidPropertyType[$PropertyType])
$ReturnType=$Definition[0]
if ($ValidReturnType[$ReturnType])
$String=$String+" $Name="+"$"+"Object.$Name `n"
$String=$String+" }) `n"
$String=$String+" $"+"Output `n"
$String=$String+" } `n"
$String=$String+"} `n"
$String
Here is the output from the above function for the WIN32_BootConfiguration class (Small Class)
$Class="Win32_BootConfiguration"
$Function=Get-ObjectPropertiesFunction (Get-WMIObject -Class $Class)
PS C:\>> $Function
Function Get-PSObjectPropertiesFromObject
[CmdletBinding()]
[OutputType([PSObject[]])]
param
[Parameter(Mandatory=$true,
ValueFromPipeline=$false,
ValueFromPipelineByPropertyName=$false,
ValueFromRemainingArguments=$false,
Position=0,
ParameterSetName='Object')]
[ValidateNotNull()]
[ValidateNotNullOrEmpty()]
[Object]$Object
Begin
$Output = New-Object PSObject -Property ([Ordered]@{
BootDirectory=$Object.BootDirectory
Caption=$Object.Caption
ConfigurationPath=$Object.ConfigurationPath
Description=$Object.Description
LastDrive=$Object.LastDrive
Name=$Object.Name
ScratchDirectory=$Object.ScratchDirectory
SettingID=$Object.SettingID
TempDirectory=$Object.TempDirectory
$Output
PS C:\>>
The function also works for other and more interesting classes like SQL Server.
PS C:\>>
$srv = New-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database($srv, "AdventureWorks2012")
$Function=Get-ObjectPropertiesFunction $db
$Function
Function Get-PSObjectPropertiesFromObject
[CmdletBinding()]
[OutputType([PSObject[]])]
param
[Parameter(Mandatory=$true,
ValueFromPipeline=$false,
ValueFromPipelineByPropertyName=$false,
ValueFromRemainingArguments=$false,
Position=0,
ParameterSetName='Object')]
[ValidateNotNull()]
[ValidateNotNullOrEmpty()]
[Object]$Object
Begin
$Output = New-Object PSObject -Property ([Ordered]@{
ActiveConnections=$Object.ActiveConnections
AnsiNullDefault=$Object.AnsiNullDefault
AnsiNullsEnabled=$Object.AnsiNullsEnabled
AnsiPaddingEnabled=$Object.AnsiPaddingEnabled
AnsiWarningsEnabled=$Object.AnsiWarningsEnabled
ArithmeticAbortEnabled=$Object.ArithmeticAbortEnabled
AutoClose=$Object.AutoClose
AutoCreateStatisticsEnabled=$Object.AutoCreateStatisticsEnabled
AutoShrink=$Object.AutoShrink
AutoUpdateStatisticsAsync=$Object.AutoUpdateStatisticsAsync
AutoUpdateStatisticsEnabled=$Object.AutoUpdateStatisticsEnabled
AvailabilityGroupName=$Object.AvailabilityGroupName
BrokerEnabled=$Object.BrokerEnabled
CaseSensitive=$Object.CaseSensitive
ChangeTrackingAutoCleanUp=$Object.ChangeTrackingAutoCleanUp
ChangeTrackingEnabled=$Object.ChangeTrackingEnabled
ChangeTrackingRetentionPeriod=$Object.ChangeTrackingRetentionPeriod
CloseCursorsOnCommitEnabled=$Object.CloseCursorsOnCommitEnabled
Collation=$Object.Collation
ConcatenateNullYieldsNull=$Object.ConcatenateNullYieldsNull
DatabaseOwnershipChaining=$Object.DatabaseOwnershipChaining
DatabaseSnapshotBaseName=$Object.DatabaseSnapshotBaseName
DateCorrelationOptimization=$Object.DateCorrelationOptimization
DboLogin=$Object.DboLogin
DefaultFileGroup=$Object.DefaultFileGroup
DefaultFileStreamFileGroup=$Object.DefaultFileStreamFileGroup
DefaultFullTextCatalog=$Object.DefaultFullTextCatalog
DefaultSchema=$Object.DefaultSchema
EncryptionEnabled=$Object.EncryptionEnabled
FilestreamDirectoryName=$Object.FilestreamDirectoryName
HonorBrokerPriority=$Object.HonorBrokerPriority
ID=$Object.ID
IsAccessible=$Object.IsAccessible
IsDatabaseSnapshot=$Object.IsDatabaseSnapshot
IsDatabaseSnapshotBase=$Object.IsDatabaseSnapshotBase
IsDbAccessAdmin=$Object.IsDbAccessAdmin
IsDbBackupOperator=$Object.IsDbBackupOperator
IsDbDatareader=$Object.IsDbDatareader
IsDbDatawriter=$Object.IsDbDatawriter
IsDbDdlAdmin=$Object.IsDbDdlAdmin
IsDbDenyDatareader=$Object.IsDbDenyDatareader
IsDbDenyDatawriter=$Object.IsDbDenyDatawriter
IsDbManager=$Object.IsDbManager
IsDbOwner=$Object.IsDbOwner
IsDbSecurityAdmin=$Object.IsDbSecurityAdmin
IsDesignMode=$Object.IsDesignMode
IsFederationMember=$Object.IsFederationMember
IsFullTextEnabled=$Object.IsFullTextEnabled
IsLoginManager=$Object.IsLoginManager
IsMailHost=$Object.IsMailHost
IsManagementDataWarehouse=$Object.IsManagementDataWarehouse
IsMirroringEnabled=$Object.IsMirroringEnabled
IsParameterizationForced=$Object.IsParameterizationForced
IsReadCommittedSnapshotOn=$Object.IsReadCommittedSnapshotOn
IsSystemObject=$Object.IsSystemObject
IsUpdateable=$Object.IsUpdateable
IsVarDecimalStorageFormatEnabled=$Object.IsVarDecimalStorageFormatEnabled
LocalCursorsDefault=$Object.LocalCursorsDefault
MirroringPartner=$Object.MirroringPartner
MirroringPartnerInstance=$Object.MirroringPartnerInstance
MirroringRedoQueueMaxSize=$Object.MirroringRedoQueueMaxSize
MirroringRoleSequence=$Object.MirroringRoleSequence
MirroringSafetySequence=$Object.MirroringSafetySequence
MirroringTimeout=$Object.MirroringTimeout
MirroringWitness=$Object.MirroringWitness
Name=$Object.Name
NestedTriggersEnabled=$Object.NestedTriggersEnabled
NumericRoundAbortEnabled=$Object.NumericRoundAbortEnabled
Owner=$Object.Owner
PrimaryFilePath=$Object.PrimaryFilePath
QuotedIdentifiersEnabled=$Object.QuotedIdentifiersEnabled
ReadOnly=$Object.ReadOnly
RecursiveTriggersEnabled=$Object.RecursiveTriggersEnabled
TargetRecoveryTime=$Object.TargetRecoveryTime
TransformNoiseWords=$Object.TransformNoiseWords
Trustworthy=$Object.Trustworthy
TwoDigitYearCutoff=$Object.TwoDigitYearCutoff
UserName=$Object.UserName
Version=$Object.Version
$Output
PS C:\>>

Similar Messages

  • [Forum FAQ] How to install and configure Windows Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely

    As we all know,
    the Windows Server Essentials Experience role is available in Windows Server 2012 R2 Standard and Windows Server 2012 R2 Datacenter. We can add the Windows Server
    Essentials Experience role in Server Manager or via Windows PowerShell.
    In this article, we introduce the steps to install and configure Windows
    Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely. For better analyze, we divide this article into two parts.
    Before installing the Windows Server Essentials Experience Role, please use
    Get-WindowsFeature
    PowerShell cmdlet to ensure the Windows Server Essentials Experience (ServerEssentialsRole) is available. (Figure 1)
    Figure 1.
    Part 1: Install Windows Server Essentials Experience role locally
    Add Windows Server Essentials Experience role
    Run Windows PowerShell as administrator, then type
    Add-WindowsFeature ServerEssentialsRole cmdlet to install Windows Server Essentials Experience role. (Figure 2)
    Figure 2.
    Note: It is necessary to configure Windows Server Essentials Experience (Post-deployment Configuration). Otherwise, you will encounter following issue when opening Dashboard.
    (Figure 3)
    Figure 3.
      2. Configure Windows Server Essentials Experience role
    (1)  In an existing domain environment
    Firstly, please join the Windows Server 2012 R2 Standard computer to the existing domain through the path:
    Control Panel\System\Change Settings\”Change…”\Member of. (Figure 4)
    Figure 4.
    After that, please install Windows Server Essentials Experience role as original description. After installation completed, please use the following command to configure Windows
    Server Essentials:
    Start-WssConfigurationService –Credential <Your Credential>
    Note: The type of
    Your Credential should be as: Domain-Name\Domain-User-Account.
    You must be a member of the Enterprise Admin group and Domain Admin group in Active Directory when using the command above to configure Windows Server Essentials. (Figure 5)
    Figure 5.
    Next, you can type the password for the domain account. (Figure 6)
    Figure 6.
    After setting the credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 7)
    Figure 7.
    By the way, you can use
    Get-WssConfigurationStatus
    PowerShell cmdlet to
    get the status of the configuration of Windows Server Essentials. Specify the
    ShowProgress parameter to view a progress indicator. (Figure 8)
    Figure 8.
    (2) In a non-domain environment
    Open PowerShell (Run as Administrator) on the Windows Server 2012 R2 Standard and type following PowerShell cmdlets: (Figure 9)
    Start-WssConfigurationService -CompanyName "xxx" -DNSName "xxx" -NetBiosName "xxx" -ComputerName "xxx” –NewAdminCredential $cred
    Figure 9.
    After you type the commands above and click Enter, you can create a new administrator credential. (Figure 10)
    After creating the new administrator credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 11)
    After a reboot, all the configurations will be completed and you can open the Windows Server Essentials Dashboard without any errors. (Figure 12)
    Figure 12.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Part 2: Install and configure Windows Server Essentials Experience role remotely
    In an existing domain environment
    In an existing domain environment, please use following command to provide credential and then add Server Essentials Role: (Figure 13)
    Add-WindowsFeature -Name ServerEssentialsRole
    -ComputerName xxx -Credential DomainName\DomainAccount
    Figure 13.
    After you enter the credential, it will start install Windows Server Essentials role on your computer. (Figure 14)
    Figure 14.
    After the installation completes, it will return the result as below:
    Figure 15.
    Next, please use the
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with a remote computer. You can use the commands below:
    Enter-PSSession –ComputerName
    xxx –Credential DomainName\DomainAccount (Figure 16)
    Figure 16.
    Then, please configure Server Essentials Role via
    Add-WssConfigurationService cmdlet and it also needs to provide correct credential. (Figure 17)
    Figure 17.
    After your credential is accepted, it will update and prepare your server. (Figure 18)
    Figure 18.
    After that, please type “Y” to continue to configure Windows Server Essentials. (Figure 19)
    Figure 19.
    2. In a non-domain environment
    In my test environment, I set up two computers running Windows Server 2012 R2 Standard and use Server1 as a target computer. The IP addresses for the two computers are as
    below:
    Sevrer1: 192.168.1.54
    Server2: 192.168.1.53
    Run
    Enable-PSRemoting –Force on Server1. (Figure 20)
    Figure 20.
    Since there is no existing domain, it is necessary to add the target computer (Server1) to a TrustedHosts list (maintained by WinRM) on Server 2. We can use following command
    to
    add the TrustedHosts entry:
    Set-Item WSMan:\localhost\Client\TrustedHosts IP-Address
    (Figure 21)
    Figure 21.
    Next, we can use
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with the remote computer. (Figure 22)
    Figure 22.
    After that, you can install Windows Server Essentials Experience Role remotely via Add-WindowsFeature ServerEssentialsRole cmdlet. (Figure 23)
    Figure 23.
    From figure 24, we can see that the installation is completed.
    Figure 24.
    Then you can use
    Start-WssConfigurationService cmdlet to configure Essentials Role and follow the steps in the first part (configure Windows Server Essentials Experience in a non-domain environment) as the steps would be the same.
    The figure below shows the status of Windows Server Essentials.
    Figure
    25.
    Finally, we have successfully configured Windows Server Essentials on Server1. (Figure 26)
    Figure 26.
    More information:
    [Forum
    FAQ] Introduce Windows Powershell Remoting
    Windows Server Essentials Setup Cmdlets
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • [Forum FAQ] How to find and replace text strings in the shapes in Excel using Windows PowerShell

    Windows PowerShell is a powerful command tool and we can use it for management and operations. In this article we introduce the detailed steps to use Windows PowerShell to find and replace test string in the
    shapes in Excel Object.
    Since the Excel.Application
    is available for representing the entire Microsoft Excel application, we can invoke the relevant Properties and Methods to help us to
    interact with Excel document.
    The figure below is an excel file:
    Figure 1.
    You can use the PowerShell script below to list the text in the shapes and replace the text string to “text”:
    $text = “text1”,”text2”,”text3”,”text3”
    $Excel 
    = New-Object -ComObject Excel.Application
    $Excel.visible = $true
    $Workbook 
    = $Excel.workbooks.open("d:\shape.xlsx")      
    #Open the excel file
    $Worksheet 
    = $Workbook.Worksheets.Item("shapes")       
    #Open the worksheet named "shapes"
    $shape = $Worksheet.Shapes      
    # Get all the shapes
    $i=0      
    # This number is used to replace the text in sequence as the variable “$text”
    Foreach ($sh in $shape){
    $sh.TextFrame.Characters().text  
    # Get the textbox in the shape
    $sh.TextFrame.Characters().text = 
    $text[$i++]       
    #Change the value of the textbox in the shape one by one
    $WorkBook.Save()              
    #Save workbook in excel
    $WorkBook.Close()             
    #Close workbook in excel
    [void]$excel.quit()           
    #Quit Excel
    Before invoking the methods and properties, we can use the cmdlet “Get-Member” to list the available methods.
    Besides, we can also find the documents about these methods and properties in MSDN:
    Workbook.Worksheets Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff835542(v=office.15).aspx
    Worksheet.Shapes Property:
    http://msdn.microsoft.com/en-us/library/office/ff821817(v=office.15).aspx
    Shape.TextFrame Property:
    http://msdn.microsoft.com/en-us/library/office/ff839162(v=office.15).aspx
    TextFrame.Characters Method (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff195027(v=office.15).aspx
    Characters.Text Property (Excel):
    http://msdn.microsoft.com/en-us/library/office/ff838596(v=office.15).aspx
    After running the script above, we can see the changes in the figure below:
    Figure 2.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thank you for the information, but does this thread really need to be stuck to the top of the forum?
    If there must be a sticky, I'd rather see a link to a page on the wiki that has links to all of these ForumFAQ posts.
    EDIT: I see this is no longer stuck to the top of the forum, thank you.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Can somebody please explain how to format and then reinstall Mac lion10.7 without cd

    can somebody please explain how to format and then reinstall Mac lion10.7 without cd

    You will need either an Ethernet or Wifi Connection to the Internet - USB Mobile device is not supported.
    If you already have Lion installed you can boot to Recovery with Command R and use the Disk Utility to erase the Macintosh HD and then reinstall the OS from the Mac OS X Utilities.
    You will need the Apple Id used for purchase if the Mac did not ship with Lion installed originally.
    If you want to repartition the HDD you can use the Recovery Disk Assistant to make a recovery USB drive
    http://support.apple.com/kb/DL1433
    http://support.apple.com/kb/HT4848
    As Always - Back up the Mac before erasing unless you are confident there is absolutely nothing on the mac that you might possibly need later.
    If the machine is a 2011 build or later you might be able to boot to Internet Recovery with Command Option R

  • [Forum FAQ] How do I have Invoke-SqlCmd return a date value without adding time

    Introduction
    A select statement executed from Invoke-SqlCmd returns a value from a Date column, the value has "12:00:00 AM" appended.  The same select statement executed within SQL Server Management Studio displays the date properly without any time formatting.
    Sample data is as follows:
    How to have Invoke-SqlCmd return Date values without adding time for multiple Date type columns and pipe the output into CSV file?
    Solution
    In SQL Server 2012 or onwards, use the FORMAT() function to convert datetime values to date format when executing query from Invoke-SqlCmd. In earlier versions such as SQL Server 2008 R2, use the traditional CONVERT() function to format datetime values to
    different date formats(yyyy.mm.dd, mm/dd/yyyy, etc) when executing query from Invoke-SqlCmd. Then pipe the output of SQL query result into CSV file by specifying export-csv parameter. An example is as follows.
    Create a table named “Test_invokesqlcmd” that contains Date type columns in SQL Server.
    USE Test
    Go
    CREATE TABLE [dbo].[Test_invokesqlcmd](
        [id] [int] NOT NULL,
        [name] [varchar](20) NULL,
        [test1] [date] NULL,
        [test2] [date] NULL
    ) ON [PRIMARY]
    GO
    insert into [dbo].[Test_invokesqlcmd]
    values(1,'David','2014-10-15','2015-01-07'),(2,'Jane','2011-08-05','2012-11-7'),(3,'Crystal','2013-09-15','2010-02-24')
    Define a query string, execute it from Invoke-SqlCmd and save the query result to a CSV file.
    Scripts for SQL Server 2012:
    $query1 = @"
        use Test;
        SELECT FORMAT(test1,'d') as newtest1, FORMAT(test2,'d') as newtest2 from dbo.Test_invokesqlcmd
    write-host $query1
    Invoke-Sqlcmd -Query $query1 -ServerInstance localhost | export-csv -notypeinformation -path c:\Files\test.csv
    Scripts for SQL Server 2008 R2:
    $query2 = @"
        Use Test;
        SELECT CONVERT(varchar, test1, 102) as newtest1,CONVERT(varchar, test2, 102) as newtest2
        FROM dbo. Test_invokesqlcmd
    write-host $query2
    Invoke-Sqlcmd -Query $query2 -ServerInstance localhost | export-csv -notypeinformation -path c:\Files\test.csv
    Check the results in SQL Server PowerShell window and csv file.
    SQL Server 2012:
    SQL Server 2008 R2:
    Reference
    Using the Invoke-Sqlcmd cmdlet
    SQL Server Functions that helps to convert date and time values to and from string literals and other date and time formats
    Applies to
    SQL Server 2014
    SQL Server 2012
    SQL Server 2008 R2
    SQL Server 2008
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Cross posted. More appropriate in JSF forum so continue conversation there.
    http://forum.java.sun.com/thread.jspa?threadID=717292&messageID=4142615#4142615

  • HT3910 How to format and erase Lion 10.7.3 completely?

    I've erased and reinstalled my Lion 10.7.3 but after rebooting, all my previous programs are also installed.How do I format and erase my HD completely so I get a clean OS like I had when I bought my Macbook Pro?

    Downgrade Lion to Snow Leopard
    1.  Boot from your Snow Leopard Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Quit DU and return to the installer. Install Snow Leopard.
    This will erase the whole drive so be sure to backup your files if you don't have a backup already. If you have performed a TM backup using Lion be aware that you cannot restore from that backup in Snow Leopard (see below.) I suggest you make a separate backup using Carbon Copy Cloner 3.4.1.
    If you have Snow Leopard Time Machine backups, do a full system restore per #14 in Time Machine - Frequently Asked Questions.  If you have subsequent backups from Lion, you can restore newer items selectively, via the "Star Wars" display, per #15 there, but be careful; some Snow Leopard apps may not work with the Lion files.

  • How to format and make partitions on my G20?

    hello
    how are you there...I am try to format C: and I want to partitions it to make it smill it is now 80GB I want to make it 20GB, really I hope to answer my Q as followe:
    1- format C: with use windows Pro XP.
    2- how I change my operator system from XP Home to pro XP
    3- how can I partitions my C: from 80GB to 20GB
    thanks
    Please ASAP

    Hi
    If you install the OS using Microsoft WXP full version at the beginning of the installations procedure there is an option who allows you to create the partition C. before the installation starts the partition will be formatted and prepared for the new installation.
    You can install what you want. Buy the WXP Professional and install it on your Qosmio. All drivers, tools and utilities for WXP Home and Prof. version are the same.
    Make attention about HDD free space for Qosmioplayer. The best tool for HDD prearrangement is a Partition magic. This tool is very powerful.

  • [Forum FAQ] How to get SSIS packages XML definition which are stored in SQL Server Integration Services instance

    Introduction
    Integration Services gives you the ability to import and export packages, and by doing this change the storage format and location of packages. But after import packages into package store, how can we get the package XML definition?
    Solution
    As we know, SSIS packages are stored in msdb using existing SSIS storage table([msdb].[dbo].[sysssispackages]). The “packagedata” column store the actual SSIS package with Image data type. In order to get the package XML definition, we need to convert “packagedata”
    column through Varbinary to XML. You can refer to the following steps:
    Using the following query to get package GUID:
    SELECT [name],
                [id]
      FROM [msdb].[dbo].[sysssispackages]
    Using the following query to convert packagedata column to XML: SELECT id, CAST(CAST(packagedata AS VARBINARY(MAX)) AS XML) PackageDataXML
    FROM      [msdb].[dbo].[sysssispackages]
    WHERE id= 'ABB264CC-A082-40D6-AEC4-DBF17FA057B2'
    More Information
    sysssispackages (Transact-SQL):
    http://msdn.microsoft.com/en-us/library/ms181582.aspx
    Applies to
    SQL Server 2005
    SQL Server 2008
    SQL Server 2008R2
    SQL Server 2012
    SQL Server 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Hi Ketak. Thank you for replying. I already followed your instructions - specifically -
    You do not see the SQL Server Reporting Services  service in SharePoint Central Administration after installing SQL Server 2012 SSRS in SharePoint mode
    I get the following error when I run rssharepoint.msi on the APP sever (where Central Admin is installed). I have to run this other wise
    Install-SPRSService and Install-SPRSServiceProxy 
    are not recognized as commands on that server.
    Failed to call GetTypes on assembly Microsoft.AnalysisServices.SPAddin, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91. Could not load file or assembly Microsoft.AnalysisServices.SPClient, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
    or one of its dependencies. The system cannot find the file specified.
    macrel

  • HP ENVY- How to format and keep licensed windows?

    Hi everybody,
    I want to format my computer and reinstall windows though I don't think I ever typed in the license key (it was a year ago though).
    when I go to:
    right click on my computer -> properties
    I have under windows activation the Product ID.
    If I write it down is it enough for when I'll format and reinstall the same windows version?
    Thanks,
    Willy
    This question was solved.
    View Solution.

    Hi,
    No, the Product Id cannot be used to activate.
    If you use OEM installation media ( ie Recovery Discs/Flash Drive ) the activation key is automatically read from the bios chip, however this key will only work for an OEM version and not if you install from a 'retail' installation disc.
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • How to format and install a fresh copy of Mac OS 10.6.4, with another MacBook CD, because i lost the one that came with mine, thanks.

    Dear user, can i format and install a fresh copy of Mac OS 10.6.4, with another MacBook CD, because i lost the one that came with mine, thanks.

    As you need to be on 10.6 to be able access the App Store to download Lion, either get replacement discs via Applecare (you'll need the MBP's serial number to get the right ones) or get the SL retail disc. I would recommend the Original disc replacement set (assuming they were 10.6) as they carry not onlyApple Hardware Test for your model, but the iLife apps other bundled sftware that isn't on the retail disc.
    Once you've installed, and used Software Update to get to 10.6.8, you can then get Lion if you're feeling masochistic.

  • How to format and reinstall OS on mbp late 2009

    I'd like to format and reinstall operating system for my mbp 15 inch from internet (no startup CD required). What keys I should press when the mbp Startup?

    To access the recovery partition, turn the mac on and hold the option key down.  http://support.apple.com/kb/HT4718

  • [Forum FAQ] How do I disable all subscriptions without disabling Reporting Services and SQL Server Agent?

    Introduction
    There is the scenario that users configured hundreds of subscriptions for reports. Now they want to disable all the subscriptions, but Reporting Services and SQL Server Agent service should be enable, so the subscriptions will not delivery reports to users
    and users could run the reports and create jobs on the server.
    Solution
    To achieve this requirement, we need to list all subscriptions and their schedules by running query, then use loop statement to disable all the subscription schedules by Job name.
    On the Start menu, point to All Programs, point to Microsoft SQL Server instance, and then click SQL Server Management Studio.
    Type Server name and select Authentication, click Connect.
    Click New Query in menu to open a new Query Editor window.
    List all subscriptions and their schedules by running the following query:
    Use ReportServer
    go
    SELECT   c.[Name] ReportName,           
    s.ScheduleID JobName,           
    ss.[Description] SubscriptionDescription,           
    ss.DeliveryExtension SubscriptionType,           
    c.[Path] ReportFolderPath,           
    row_number() over(order by s.ScheduleID) as rn             
    into
    #Temp  
    FROM     
    ReportSchedule rs           
    INNER JOIN Schedule s ON rs.ScheduleID = s.ScheduleID           
    INNER JOIN Subscriptions ss ON rs.SubscriptionID = ss.SubscriptionID           
    INNER JOIN [Catalog] c ON rs.ReportID = c.ItemID AND ss.Report_OID = c.ItemID   
    select * from #temp
    Use the loop statement to disable all the subscription schedules by Job name:
    DECLARE
    @count INT,
    @maxCount INT  
    SET @COUNT=1  
    SELECT @maxCount=MAX(RN)
    FROM
    #temp         
    DECLARE
    @job_name VARCHAR(MAX)                  
    WHILE @COUNT <[email protected]        
    BEGIN      
    SELECT @job_name=jobname FROM #temp WHERE [email protected]  
    exec msdb..sp_update_job @job_name = @job_name,@enabled = 0     
    SET @[email protected]+1   P
    RINT @job_name   
    END   
    PRINT @COUNT 
    Reference
    SQL Agent – Disable All Jobs
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • [Forum FAQ] How to use multiple field terminators in BULK INSERT or BCP command line

    Introduction
    Some people want to know if we can have multiple field terminators in BULK INSERT or BCP commands, and how to implement multiple field terminators in BULK INSERT or BCP commands.
    Solution
    For character data fields, optional terminating characters allow you to mark the end of each field in a data file with a field terminator, as well as the end of each row with a row terminator. If a terminator character occurs within the data, it is interpreted
    as a terminator, not as data, and the data after that character is interpreted and belongs to the next field or record. I have done a test, if you use BULK INSERT or BCP commands and set the multiple field terminators, you can refer to the following command.
    In Windows command line,
    bcp <Databasename.schema.tablename> out “<path>” –c –t –r –T
    For example, you can export data from the Department table with bcp command and use the comma and colon (,:) as one field terminator.
    bcp AdventureWorks.HumanResources.Department out C:\myDepartment.txt -c -t ,: -r \n –T
    The txt file as follows:
    However, if you want to bcp by using multiple field terminators the same as the following command, which will still use the last terminator defined by default.
    bcp AdventureWorks.HumanResources.Department in C:\myDepartment.txt -c -t , -r \n -t: –T
    The txt file as follows:
    When multiple field terminators means multiple fields, you use the below comma separated format,
    column1,,column2,,,column3
    In this occasion, you only separate 3 fields (column1, column2 and column3). In fact, after testing, there will be 6 fields here. That is the significance of a field terminator (comma in this case).
    Meanwhile, using BULK INSERT to import the data of the data file into the SQL table, if you specify terminator for BULK import, you can only set multiple characters as one terminator in the BULK INSERT statement.
    USE <testdatabase>;
    GO
    BULK INSERT <your table> FROM ‘<Path>’
     WITH (
    DATAFILETYPE = ' char/native/ widechar /widenative',
     FIELDTERMINATOR = ' field_terminator',
    For example, using BULK INSERT to import the data of C:\myDepartment.txt data file into the DepartmentTest table, the field terminator (,:) must be declared in the statement.
    In SQL Server Management Studio Query Editor:
    BULK INSERT AdventureWorks.HumanResources.DepartmentTest FROM ‘C:\myDepartment.txt’
     WITH (
    DATAFILETYPE = ‘char',
    FIELDTERMINATOR = ‘,:’,
    The new table contains like as follows:  
    We could not declare multiple field terminators (, and :) in the Query statement,  as the following format, a duplicate error will occur.
    In SQL Server Management Studio Query Editor:
    BULK INSERT AdventureWorks.HumanResources.DepartmentTest FROM ‘C:\myDepartment.txt’
     WITH (
    DATAFILETYPE = ‘char',
    FIELDTERMINATOR = ‘,’,
    FIELDTERMINATOR = ‘:’
    However, if you want to use a data file with fewer or more fields, we can implement via setting extra field length to 0 for fewer fields or omitting or skipping more fields during the bulk copy procedure.  
    More Information
    For more information about filed terminators, you can review the following article.
    http://technet.microsoft.com/en-us/library/aa196735(v=sql.80).aspx
    http://social.technet.microsoft.com/Forums/en-US/d2fa4b1e-3bd4-4379-bc30-389202a99ae2/multiple-field-terminators-in-bulk-insert-or-bcp?forum=sqlgetsta
    http://technet.microsoft.com/en-us/library/ms191485.aspx
    http://technet.microsoft.com/en-us/library/aa173858(v=sql.80).aspx
    http://technet.microsoft.com/en-us/library/aa173842(v=sql.80).aspx
    Applies to
    SQL Server 2012
    SQL Server 2008R2
    SQL Server 2005
    SQL Server 2000
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • [Forum FAQ] How to show Windows Update in Control Panel in Clean Installation of Windows 10 Technical Preview Build 9926

    Scenario
    If you performed a clean installation of the new Windows 10 Technical Preview Build 9926, you would find Windows Update is only available in
    Settings and is hidden in Control Panel by default. However, Windows Update is still available in Control Panel if it is an upgrade version of Windows 10 Technical Preview Build 9926.
    Solution
    After the comparison of the two different version, the differences is the following registry:
    HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\IsConvergedUpdateStackEnabled
    In clean installation version:
    In upgrade version:
    The method to make Windows Update show in Control Panel in the clean installation of Windows 10 Technical Preview Build 9926:
    Edit the REG_DWORD value of IsConvergedUpdateStackEnabled from 1 to 0.
    Applies to
    Clean installation of Windows 10 Technical Preview Build 9926
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    We’ve seen a few forum posts talking about changing registry keys to alter the update experience we shipped in Technical Preview build 9926. There are a couple of reasons that we don’t recommend doing things like that.
    First, the default experience is what we’ve tested across not just the Windows 10 team, but across all of Microsoft before we released it to you. That doesn’t mean that you won’t still find bugs, but it’s definitely the code that’s been most thoroughly
    tested. Changing things back to older versions is risky because the combination of those old settings with the rest of Windows 10 is not something that’s been validated or supported, so we can’t predict the side effects. It’s possible that changing registry
    settings related to update could cause a machine to no longer be able to get new updates or Technical Preview builds.
    The other reason to avoid changing the default update experience is that a lot of update-related code is actually being re-written in order to scale across the variety of different device types Windows 10 will support. Since Technical Previews are
    a work-in-progress, some code that may still be in build 9926 won’t actually ship in the final version of Windows 10 that we provide to all our customers, so trying to re-enable that code temporarily won’t provide a way to accurately assess Windows 10’s update
    capabilities.
    We want to hear your feedback! We’re sharing Technical Preview releases early so we can understand exactly how customers are using our software and make sure we are designing our experiences to address those scenarios. The more
    specific the feedback, the more helpful it is for us – saying “I hate the new Windows Update UI” isn’t very useful, but when we see “I need to be able to tell Windows Update to grab updates from WU itself and not from my internal corporate server, so the new
    Windows Update UI is painful for me”, we can actually understand what changes we could make to solve those specific problems. We can’t promise to fix everything that everyone asks for – and sometimes what one customer wants is exactly what another customer
    doesn’t want – but the more you can help us understand why you want something changed, the better we can try to meet those needs.
    Thanks for listening, and we look forward to hearing your responses.
    http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_update/warning-disabling-the-new-windows-update-ui-may/dc846517-eca0-4960-b0ff-1eb7227223f5

  • External drive, how to format and partition?

    Hey everybody!
    I'm about to buy an external drive for my mac. I am reasonably capable on a computer, but I've never done formatting or partitioning so I have two questions:
    1) I just want to check that I do not need to buy a mac-formatted drive. A little big of googling told me I could do the formatting myself with Disk Utility, just wanted to double check that that was true.
    2) Once I get my external drive, what I want to do is create two partitions within that drive, one for my Time Machine backup and one for random files and movies. I'm not sure how to do that (apparently I might need to pick different formats for each in Disk Utility?) so if anybody could help out that would be brilliant.
    Thanks
    (if that helps, I have a MacBook Pro with a 512GB hardrive, and I want to buy a 1TB external drive)

    Hi,
    Here is a link that will help you set up your external drive. http://www.cnet.com/how-to/how-to-set-up-an-external-hard-drive-for-use-with-os- x/
    You won't need different formats for Time Machine backups and storage space partitions. However, given the size of your hard drive, 500 gb for Time Machine may not be enough. You could buy a separate one for Time Machine, budget permitting.
    Check the size of your startup disk, and if it is only 250 gb or less, then 500 gb for Time Machine may be OK, for a while. It will soon fill up, but the older backups will be erased.
    Regards.

Maybe you are looking for

  • Is there a limit to the number of mail boxes in mail?

    I cannot set up a new mailbox under the mail box menu within Mail. All I get is a "boing.

  • Beginners guide screwed|Is impossible to edit large pages on the wiki

    When you're trying to edit a large page on the wiki you get this message: WARNING: This page is 40 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.

  • Valuation class of material master to be changed

    Hello, My master data team has insereted a wrong valuation class in the material master record. Purchase order has been raised and a GR has been done for the same. SAP gives following steps to change the valuation class: The valuation class cannot be

  • Cable between hub and modem

    Hi I had infinity installed yesterday. The engineer installed the hub & modem in my hallway. I explained that my existing setup comprised of 3 desktop computers in the loft and two laptops. From the main bt socket in the hall a cable runs up to the f

  • Installing Solaris 10 with Windows XP

    Hi, I have an existing Windows XP installation, and want to install Solaris 10 on the same hard drive, for which I have created an extra primary partition. However, the installation seems to want to take over the whole hard drive, so I am a bit hesit