Trying to monitor mount points on Windows server

I need the script below to be able to display in this format(bolded):
Data:
Instance1        value1
Instance2        value2
InstanceN        valueN
The 2 big issues I'm running into is getting the results of $freespacegb to display on the next line after Data:.  Secondly, I need the 2 columns from the results in $freespacegb to be separated by a tab (aka 8 character spaces).
Here's the script I'm working with so far: 
if($args[1] -eq $null -or $args[2] -eq $null)
Write-Host "Message: Credential not given";
exit 1;
$deviceName = $args[0];
$username = $args[1];
$password = $args[2] | ConvertTo-SecureString -asPlainText -Force;
$credential = New-Object System.Management.Automation.PSCredential($username,$password);
$freespacegb=gwmi win32_volume -ComputerName $deviceName -Credential $credential | ft -HideTableHeaders driveletter,@{l='FreeSpaceGB';e={$_.FreeSpace/1024MB -as [int]}}
Write-Host "Data:";
$freespacegb
Any assistance with this would be greatly appreciated

Thanks very much for your help
Here's the script now after your suggestions:
if($args[1] -eq $null -or $args[2] -eq $null)
Write-Host "Message: Credential not given";
exit 1;
$deviceName = $args[0];
$username = $args[1];
$password = $args[2] | ConvertTo-SecureString -asPlainText -Force;
$credential = New-Object System.Management.Automation.PSCredential($username,$password);
$freespacegb=gwmi win32_volume -ComputerName $deviceName -Credential $credential | ft -HideTableHeaders driveletter,@{l='FreeSpaceGB';e={('{0:N2}' -f ($_.FreeSpace/1Gb))}}
Write-Output Data:(write-output $freespacegb)
Here's what the results look like now after I run the script:
Data:
C:                                                                                            13.48                                                                                        
D:                                                                                            16.45                                                                                        
F:                                                                                            289.84                                                                                       
E:                                                                                             0.00                                                                                         
G:                                                                                             105.04
Any additional help you could provide would be great

Similar Messages

  • Creating System Restore Points in Windows Server 2012

    Searching for "Create a restore point" on Windows Server 2012, brings up a link that when clicked takes you to System Properties. Once there, there is no System Protection tab or option to create a system restore point. Windows Server Backup
    is installed and functioning.
    Is this feature available in Windows Server 2012? Was it replaced with Shadow Copies for Shared Folders?
    Thanks for any insight you can provide.

     HI,
    To create a system restore point, run msconfig.exe, that will launch a UI, click the tools tab, select system restore, that should invoke a UI which asks if you want to  restore to an earlier version or do you want to create a new restore point. I clicked
    "create a new restore point" The problem that I ran into is that when I click that button is I receive the error: can't find "C:\Windows\System32\rstrui.exe". That's the .exe which supports the "Create / restore point' processes. I
    posted a question about the missing .exe on the windows > windows 8.1 > Repair and recovery forum and was told to post it here. :>) The subject title of that post is "rstrui.exe Create a system restore point on windows server 8 Standard".
    That post documents the steps that I followed trying to create a system restore point. (FYI: I'm not trying to backup any drives. I know what a system restore point is and what backup is. They are two different animals). I want to create a restore
    point prior in order to prep for installing an App. So, If a problem occurs; the registry keys and app files can be backed out to some extent. BTW: Create system restore point on windows 8.1does work perfectly well, there's a different UI. I just didn't
    know where to post the initial problem.regards,Steve

  • Rstrui.exe Create a system restore point on windows server 8 standard

    Hi,
    Before making system changes, I need to create a system restore point on windows server 2008 Standard with SP2 installed.,  I found where to accomplish that via the UI, but the file isn't found when I search the C:\windows directory on the server.
    The executable should be C:\windows\system32\rstrui.exe, unless it was changed for Server 2008. I have system protection turned on for the C: drive.This problem also exists on Windows server R2 enterprise with all updates applied.
    I searched the install media (DVD) it wasn't there. I tried the full name (rstrui.exe) as well as truncated versions. I've searched on all of the applicable forums for rstrui.exe and "create system restore point".
    Does someone know where I can get rstrui.exe for windows server 8.  It's not available on windows server R2 enterprise or essentials either. If there is an alternative method of creating restore points on windows server 8, please point me in the
    correct direction. Is it available in any of the variations of windows server 12. I have all of the updates installed when checking for how to create a system restore point or with searching for rstrui.exe. BTW, performing "system backups" or implementing
    "previous versions" functionality work just fine.
    Thank you in advance,
    Steve

    Hi Steve,
    I replied the same question you posted earlier:
    https://social.technet.microsoft.com/Forums/en-US/68352496-2fe8-4320-8848-f22d0d1a6f6b/rstruiexe-missing-unable-to-create-restore-point-windows-server-8-std-r2?forum=windowsbackup
    To me it seems that the function is removed in both Windows 2008 SP2 and Windows 2008 R2. Here is my original reply:
    I did not find this file either on my new-installed Windows 2008 SP2 system. I assume it is retired in Windows Server 2008 and the function is replaced by Windows Server Backup. I cannot confirm why there is still an option in MSCONFIG which point to
    rstrui.exe but I can find the file nowhere. Also this option is removed in Windows Server 2008 R2.
    Here link a link for using Windows Server Backup to create system state backup as a restore point:
    Recover
    the System State
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • I am trying to install Oracle 9i on Windows Server 2008

    Hi
    I am trying to install Oracle 9i on Windows Server 2008.
    While installing third CD it shows the following error message
    "jrew.exe has stopped working"
    Please guide me what to do next as early as possible.
    Thanks

    Why?
    The general policy of Oracle is very simple:
    it certifies against the current version of the OS.
    It never re-certifies against new releases of the OS.
    Windows 2008 didn't exist when Oracle 9i was released.
    Sybrand Bakker
    Senior Oracle DBA

  • Trying to install WSUS role on Windows Server 2012 R2 using dedicated SQL Instance with static port on remote SQL Server 2012 SP1 CU7 on Windows Server 2012 R2.

    I am trying to install WSUS role on Windows Server 2012 R2 using dedicated SQL Instance with static port on remote SQL Server 2012 SP1 CU7 on Windows Server 2012 R2.
    It verifies the connection and then throws the error:
    The request to add or remove features on the specified server failed. The operation cannot be completed, because the server you specified requires a restart.
    WSUS Server : Windows Server 2012 R2
    Remote SQL Server: 2012 SP1 CU7 hosted on Windows Server 2012 R2
    Please let me know if anyone has experienced this issue.

    We were trying to install WSUS role on Windows Server 2012 R2 using dedicated SQL Instance with static port on remote SQL Server 2012 SP1 CU7 on Windows Server 2012 R2.
    It verifies the connection and then throws the error:
    The request to add or remove features on the specified server failed. The operation cannot be completed, because the server you specified requires a restart.
    Same error even after rebooting the server multiple times.
    WSUS Server : Windows Server Standard2012 R2
    Remote SQL Server: Windows Server 2012 SP1 CU7 hosted on Windows Server 2012 R2
    Event ID 7000:
    The Windows Internal Database service failed to start due to the following error:
    The service did not start due to a logon failure.
    Event ID 7041
    The MSSQL$MICROSOFT##WID service was unable to log on as NT SERVICE\MSSQL$MICROSOFT##WID with the currently configured password due to the following error:
    Logon failure: the user has not been granted the requested logon type at this computer.
    Service: MSSQL$MICROSOFT##WID
    Domain and account: NT SERVICE\MSSQL$MICROSOFT##WID
    This service account does not have the required user right "Log on as a service."
    User Action
    Assign "Log on as a service" to the service account on this computer. You can use Local Security Settings (Secpol.msc) to do this. If this computer is a node in a cluster, check that this user
    right is assigned to the Cluster service account on all nodes in the cluster.
    If you have already assigned this user right to the service account, and the user right appears to be removed, check with your domain administrator to find out if a Group Policy object associated
    with this node might be removing the right.
    I found following article:
    "MSSQL$MICROSOFT##WID service was unable to log on as NT SERVICE\MSSQL$MICROSOFT##WID" error when you install WID in Windows Server 2012
    http://support.microsoft.com/kb/2832204/en-us
    To work around the issue, use one of the following methods:
    Assign the Log on as a service user right to NT SERVICE\ALL SERVICES in the GPO that defines the user right.
    Exclude the computer from the GPO that defines the user right.
    We moved the SCCM server to OU where no policies were getting applied and then applied the new GPO to that OU. Restarted the server and we were able to install WSUS role.
    Regards
    PR

  • How to create restore point in windows server 2008 service pack1

    hi i am bhaskar ... how to create restore point in windows server 2008 service pack1 and how to restore system from a restore point in windows server 2008 service pack1.. is this option available or not ? what is the difference between shadow copies and
    restore point ? instead of restore point we have this shadow copies option in windows server 2008 ?Bhaskar

    AFIK, Restore Points doesn’t exist in Windows 2008.
    Volume Shadow Copy option can be used to achieve:
    Creating consistent backups of open files and applications
    Creating shadow copies for shared folders
    Creating transportable shadow copies using a hardware provider — for backup, testing and data mining scenarios
    Quickly recovering and restoring files and data
    It is more like a file, data, application backup. 
    Santhosh Sivarajan | MCTS, MCSE (W2K3/W2K/NT4), MCSA (W2K3/W2K/MSG), CCNA, Network+ Houston, TX
    Blogs - http://blogs.sivarajan.com/
    Articles - http://www.sivarajan.com/publications.html
    Twitter: @santhosh_sivara - http://twitter.com/santhosh_sivara
    This posting is provided AS IS with no warranties, and confers no rights.

  • What are share point server 2013 & Share point Designer 2013 & Office 365 & Yammer & Share point 2013 & Windows server 2008 server & Windows Server 2012 Server Data Center?

    I need some clarifications.
    What are share point server 2013 & Share point Designer 2013 & Office 365 & Yammer & Share point 2013 & Windows server 2008 server & Windows Server 2012 Server Data Center? How each them are related in collaboration system?
    Is Share point server 2013 and Share pointer Designer 2013 available in 32bit version? If not, then how to use it in 32 bit machine by using any VMs?
    Thanks
    Senthil

    SharePoint Server 2013:
    http://office.microsoft.com/en-us/microsoft-sharepoint-collaboration-software-FX103479517.aspx
    SharePoint Designer 2013:
    Designer is used to develop SharePoint pages using HTML/CSS/JS as well as SharePoint Designer Workflows
    Yammer: 
    https://about.yammer.com/
    Windows Server is Windows, but the Server OS. SharePoint runs on top of supported Windows Servers editions (see http://technet.microsoft.com/en-us/library/cc262485.aspx).
    SharePoint Server is 64-bit only (trial:
    http://technet.microsoft.com/en-us/evalcenter/hh973397.aspx), although Designer does have a 32-bit edition (full product:
    http://www.microsoft.com/en-us/download/details.aspx?id=35491).
    You will need the capability to run 64bit VMs. Minimum recommended all-in-one VM for SharePoint is to allocate 24GB of RAM, but you can get away with as little as 12GB (I wouldn't go below that). Because of this, it generally rules out 32bit OSes as a virtual
    machine host.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Mount Points in Windows 2012 R2 Cluster not displaying correctly

    Hi,
    Try
    and I might, I can't get Mount Points displayed properly in a Windows 2012 R2 cluster.
    In Windows 2008 R2, I added them, and they appear under Storage, as for Example, Cluster Disk 7: Mounted Volume (S:\SYSDB). (I may have had to bring them offline/online).
    in Windows 2012 R2, they are showing up as, for example, '\\?\Volume{7c636157-e7e9-11e4-80dc0005056873123}'
    In the error log it shows up as :
    Cluster disk resource 'Cluster Disk 7' contains an invalid mount point. Both the source and target disks associated with the mount point must be clustered disks, and must be members of the same group.
    Mount point 'SYSDB\' for volume '\\?\Volume{7c636106-e7e9-11e4-80dc-005056873123}\' references an invalid target disk. Please ensure that the target disk is also a clustered disk and in the same group as the source disk (hosting the mount point).
    Now I've checked the error, and in
    https://technet.microsoft.com/en-au/library/dd353925(v=ws.10).aspx it says
    "The mounted disk and the disk it is mounted onto must be part of the same clustered service or application. They cannot be in two different clustered services or applications, and they cannot be in the general pool of Available Storage in the cluster."
    So I have created a 'Other Server' Role. When I go right click on the Role and go to 'Add Storage', Cluster Disk 6 (the root volume) displays S:\, and Cluster Disk 9 (hosting the mountpoint) says Mount Point(s): (S:\SYSDB). I select both, and add, but
    alas, the Mount Point still shows up as '\\?\Volume{7c636106-e7e9-11e4-80dc-005056873123}\ (not S:\SYSDB or Cluster Disk 6: Mounted Volume (S:\SYSDB).) as I would expect.
    They are both clustered disks (iSCSI). I would expect when it says in the "same group", both added to the same role would be in the same group.

    Hi,
    Thankyou for your response. That's (sort of) good to know, but it seems to be a step backwards from Windows 2008 R2, where you would actually have the meaningful Mounted Volume: (S:\SYSDB) displayed, to the meaningless '\\?\Volume{7c636157-e7e9-11e4-80dc0005056873123}'
    GUID. Obviously before you do anything, you need to cross reference the disk number to 'Disk Management'; it would be better if is was displayed correctly in Failover Cluster Manager in the first place.
    Secondly, the GUID is somewhat misleading. In Windows 2008 R2 for example, it appears as though the same GUID was displayed on each node (e.g. using Mountvol.exe). In Windows 2012 R2, it appears as though different GUID's are displayed on each node, e.g.
    Node 1.
    \\?\Volume{7c6368a4-e7e9-11e4-80dc-005056873123}\
            S:\SYSDB\
    Node 2.
    \\?\Volume{97cc0d34-e7e9-11e4-80db-0050568724c4}\
            S:\SYSDB\
    But the GUID in Failover cluster manager remains the same (you can't really cross reference with what you see in FCM to Mountvol).
    Strangely enough, when I check the registry in 'MountedDevices' on Node 1, both of the GUIDs are displayed (even though only one is displayed in MountVol.exe),  referencing the same Disk ID listed in Diskpart.exe. I can see this mentioned in
    https://support.microsoft.com/en-us/kb/959573, where is says :
    A volume can be multiple unique volume names (and thus multiple GUIDs) when it is used by multiple running installations of Windows.  This could happen in the following scenarios and in similar scenarios where multiple installations of Windows have
    accessed the volume:
    Using a volume on a shared disk in a cluster where multiple nodes have accessed the volume.
    Oh well, that's progress I guess.

  • Failure to create a shared protection point during Windows Server 2012 R2 backup.

    Several partitions on a system disk have been extended as well as the backup destination partition. After that Windows Server 2012 R2 failed the backup of a system disk with the following error message 0x8004230C. The Server stated it had failed to create
    a shared protection point on source volumes and indicated a problem with volume shadow writer. What needs to be done to fix this error and does it have anything to do with partitions being extended?
    Vladimir Shipitsyn

    Hi,
    What destination did you use to do the previous unsuccessful backup? You could try the steps in the article below to troubleshoot errors where the cause is reported by an underlying layer to Windows Server Backup.
    Diagnosing Failures in Windows Server Backup - Part 1 (VSS/SPP Errors)
    http://blogs.technet.com/b/filecab/archive/2009/09/16/diagnosing-failures-in-windows-server-backup-part-1-vss-spp-errors.aspx
    Best Regards,
    Mandy 
    If you have any feedback on our support, please click
    here .
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Monitoring RT application on windows server 2003

    Hi,
    I developed a simple realtime application using labview 7.1.1 on windows server 2003, I can run the application (in realtime mode) in labview development platform. However, after compiling the application into a startup execuable on the RT, I couldn't monitor it anymore.
    I created a folder c:\ni-rt\startup , and tried to copy the startup executable (test1.exe) from RT (ni-rt\startup) to this folder and got a permission error, however, i logged in windows server 2003 as local administrator. I can copy other files into this folder, but not the executable "test1.exe".
    our IT said "Startup" is a special folder in windows server 2003, and does not allow executables to be put inside it. I am not familiar with this O.S. Has anyone had similar problem? If so, did you get it resolved? and how?
    thanks,
    -Joe

    Joe,
           If your application is running in Windows than it is not running in true realtime and you cannot make it a real-time startup executable.  In LabVIEW 8.0 and later you can create a debuggable executable, with which you can see the block diagram of an executable.  This Knowledge Base Article talks about how to automatically launch a VI at startup, which sounds like what you are looking for.  Here is a link to the Real Time Module for LabVIEW.
    Cheers,
    NathanT

  • Getting error while trying to install ADRMS role on Windows Server 2008 R2 SP1.

    Hello,
    I am trying to install ADRMS on Windows Server 2008 R2 SP1 (This machine also has domain controller and Exchange Server 2010 SP3 installed). But I am getting following error:
    Install-ADRMS : The configuration object is read only, because it has been committed by a call to ServerManager.CommitChanges().
    If write access is required, use ServerManager to get a new reference.    at Microsoft.Web.Administration.Configuration.SetDirty()
    Not sure what is causing this error. Any help to solve it would be appreciated.
    Thanks.
    Jigar Mehta

    Hello,
    I am trying to install ADRMS on Windows Server 2008 R2 SP1 (This machine also has domain controller and Exchange Server 2010 SP3 installed). But I am getting following error:
    Install-ADRMS : The configuration object is read only, because it has been committed by a call to ServerManager.CommitChanges().
    If write access is required, use ServerManager to get a new reference.    at Microsoft.Web.Administration.Configuration.SetDirty()
    Not sure what is causing this error. Any help to solve it would be appreciated.
    Thanks.
    Jigar Mehta

  • Monitoring SNMP Traps from Windows Server

    Hello All
    im looking for a way to monitor an application that runs with os windows server 2003 and windows 2008 r2 and send its alarms as a snmp traps with system center operations maanger 2012 R2.
    in the scom 2007 environment i could discover the servers as network device and recive traps and genrate alerts.
    is there a way to edit the existing management pack to enable the windows server discovery as a network device
    and enable traps with a microsoft oid to be resived  ?
    i understand that this is by desigin from
    http://technet.microsoft.com/en-us/library/hh212935.aspx
    or is there another option to create this monitor with scom 2012 R2?
    Thank you

    Hello Yan.
    thank you for the replay i understand that this is by design, 
    what im looking for is a way to edit the management pack that discard those OID
    or even a 3rd part solution to monitor windoes server snmp genrated alerts.
    thank you

  • Mounting multiple directories with same name on different severs to a single mount point on another server

    We have a requirement where in we have multiple solaris servers and each solaris server has a directory with the same name.
    The files in these directories will be different.
    These same name directories on multiple severs has to be mounted to a single directory on another sever.
    We are planning to use NFS, but it seems we can not mount multiple directories with same name on different severs to a single mount point using NFS, and we need to create multiple mount points.
    Is there any way we can achieve this so that all the directories can be mounted to a single mount point?

    You can try to mount all these mount points via NFS in one additional server and then export this new tree again via NFS to all your servers.
    No sure if this works. If this works, then you will have in this case just an additional level in the tree.

  • If I already have an XSAN, can I mount it as Windows Server Drive letter?

    I am Mac-familiar, but not well-versed in XSAN. If a customer says they have an XSAN, I presume that could be any number of storage devices across multiple platforms, that are organized and managed by XSAN software. Is that a correct analysis?
    Can I take that that (or part of that) available storage and make it available to a windows server 2008 environment so it shows up as a mounted drive letter?
    Thanks for your assistance!

    Your understanding of Xsan is kind of flawed. Xsan is a filesystem that clusters together fiber channel based storage. Xsan doesn't just manage the filesystem, it IS the filesystem. To make a volume be available on another platform/OS, that platform needs to have compatible software to support seeing see the file system on that storage.
    Xsan though is based on another product called StorNext by Quantum. They make a cheaper client only version of StorNext for connecting Windows and Linux machines to Apple based Xsans. It's called StorNext FX. You need to purchase a license for this though.

  • Mount volume with windows server password (not remembering the password)

    Hello,
    I have a setup through "System Preferences" "Users & Groups" "Login Items", wherein there is a volume which is mounted upon login. Set volume is within a Windows Server domain, for which I have credentials to login.
    My question is related, to the fact that OSX (under Snow Leopard nor Lion), seems to remeber the password for said login, even though the checkbox for "remeber this password, etc." is set. So everyday I need to type in my password for it to mount the volume.

    Satellite C875-S7303
    If you have a Microsoft account, you can reset the Windows password easily. So do you have that or a local account?
    -Jerry

Maybe you are looking for