Using powershell to script quality assurance process
Hi,
I am new to powershell and using powershell 3.
I have been asked to write a powershell script that would be able to perform a quality assurance test on newly built servers. Mainly looking for a script that would give certification/authentication successes/failures and verify if configuration settings
were still correct.
(Server 2008 R2, SQL Server 2008 R2) no idea on how to do this, I'm still in the learning phase.
Any help with this would be much appreciated.
Thanks in advance for your help!
Hi,
I am new to powershell and using powershell 3.
I have been asked to write a powershell script that would be able to perform a quality assurance test on newly built servers. Mainly looking for a script that would give certification/authentication successes/failures and verify if configuration settings
were still correct.
(Server 2008 R2, SQL Server 2008 R2) no idea on how to do this, I'm still in the learning phase.
Any help with this would be much appreciated.
Thanks in advance for your help!
Similar Messages
-
Changing a SQL Report server Database to a new One Using Powershell script
Hi,
I have an existing report server (Native Mode) and a pre-configured report server database. I have created a new database and want to assign it new report server database. How can i automate this process using powershell?
Here is the detail requirement
If there is a Report Server database seeded on the xxxxx server, follow the below steps:
◾Click the Database button on the left. Click on the Change Database button, choose option Choose an existing report server database. Enter the RPT server name (e.g. xxxxxx) in Server Name text box and click Next.
◾In the Report Server Database selection, select the ReportServer database. Then click next button to complete the process.
Any help in this regard will be very much helpfull.
Sushruta BanerjeeHi Sushruta,
To query export from Report server Database, the scripts below may be helpful for you:
Export RDL Files from ReportServer Database with PowerShell
SQL Database Reports with PowerShell
I hope this helps. -
I need help to do this using powershell scripts on Windows 8.1?
OS : Windows 8.1 Enterprise
TPM Chip : None
Enabling bitlocker on OS drive with a password at boot time is a 2 step process.
1) Edit the Group Policy (gpedit.msc) - Administrative Templates -> Windows Components -> BitLocker Drive Encryption -> Operating System Drives ->
Require additional authentication at startup -> Allow bitlocker without a compatible TPM
ref : http://www.7tutorials.com/how-enable-bitlocker-without-tpm-chip-windows-7-windows-8
2) Enable Bitlocker on c driver using manage bitlocker snapin
I need help to do this using powershell scripts?
I researched on the forums but ran into an issue.
I found that Group policy commandlets can be used to do step 1.
I am getting the error : "ins have been registered for Windows PowerShell version 4" when I try to do the following in windows 8.1
Add-PSSnapin GroupPolicy
Import-Module GroupPolicy -VerboseHi TinkerBotFoo,
I’m writing to just check in to see if the suggestions were helpful. If you need further help,
please feel free to reply this post directly so we will be notified to follow it up.
If you have any feedback on our support, please click here.
Best Regards
Anna
TechNet Community Support
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. -
Using Powershell Script Run simple query in MS Access 2007 and export the results of query to Excel
Hi Experts,
I have a Access 2007 DB file and 2 Big tables inside that (bigger than the size that can be easily handled by MS Excel 2007).
My requirement is automate using powershell scripts the below things.
1. Create a SQL query in Access DB and save that in access DB
2. Run the saved query and export the result in excel sheet where I can create the charts and Pivots. Thanks in advance
PrajeshDo you have to use the Access query, couldn't you just recreate the query in Powershell? Here's a link with good info that references an existing script for querying an Access database:
http://blogs.technet.com/b/heyscriptingguy/archive/2009/08/13/hey-scripting-guy-can-i-query-a-microsoft-access-database-with-a-windows-powershell-script.aspx
Once you have your dataset you can pipe it to
Export-Csv -NoType c:\pathtofile\output.csv -
How to Compare 2 CSV file and store the result to 3rd csv file using PowerShell script?
I want to do the below task using powershell script only.
I have 2 csv files and I want to compare those two files and I want to store the comparision result to 3rd csv file. Please look at the follwingsnap:
This image is csv file only.
Could you please any one help me.
Thanks in advance.
By
A Path finder
JoSwa
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful"
Best Online JournalNot certain this is what you're after, but this :
#import the contents of both csv files
$dbexcel=import-csv c:\dbexcel.csv
$liveexcel=import-csv C:\liveexcel.csv
#prepare the output csv and create the headers
$outputexcel="c:\outputexcel.csv"
$outputline="Name,Connection Status,Version,DbExcel,LiveExcel"
$outputline | out-file $outputexcel
#Loop through each record based on the number of records (assuming equal number in both files)
for ($i=0; $i -le $dbexcel.Length-1;$i++)
# Assign the yes / null values to equal the word equivalent
if ($dbexcel.isavail[$i] -eq "yes") {$dbavail="Available"} else {$dbavail="Unavailable"}
if ($liveexcel.isavail[$i] -eq "yes") {$liveavail="Available"} else {$liveavail="Unavailable"}
#create the live of csv content from the two input csv files
$outputline=$dbexcel.name[$i] + "," + $liveexcel.'connection status'[$i] + "," + $dbexcel.version[$i] + "," + $dbavail + "," + $liveavail
#output that line to the csv file
$outputline | out-file $outputexcel -Append
should do what you're looking for, or give you enough to edit it to your exact need.
I've assumed that the dbexcel.csv and liveexcel.csv files live in the root of c:\ for this, that they include the header information, and that the outputexcel.csv file will be saved to the same place (including headers). -
Set Default Printer based on user setting using Powershell script
Hi
I would like to create a script that runs on user log off and captures the default printer (set manually by the user) and then another script to reapply the settings (saved upon log off) when the user logs back in.
This is because local printers are set as default printer (PDF Creator Programs) when we all use Network Printers so this means a user has to set default printer to the network printer all the time.
I have found this script to start with:
$Printer = Get-WmiObject -namespace root\cimv2 -Query “select * from Win32_Printer Where Default = TRUE” -Impersonation 3 | select name | out-file C:\temp\Printer.txt
But the out file looks like this:
name
\\PrinterserverName\Accounts01
Which I dont see how it can be used on another script plus there are spaces after\Account01
Any Ideas please?
M
MaelitoHi Maelito,
According to your description, you want to export the default printer name to text file, then read this printer name from text file and set the default printer via Powershell:
#save printer name to text file
Get-WmiObject -namespace root\cimv2 -Query “select * from Win32_Printer Where Default = TRUE” -Impersonation 3 | select -ExpandProperty name | out-file C:\temp\Printer.txt
# read printer name from text file and set default printer
$name=get-content C:\temp\Printer.txt
(Get-WmiObject -Class Win32_Printer -Filter "Name='$name'").SetDefaultPrinter()
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
How to set volume using Powershell script?
I would like to know on how to set volume under Window 7 Home 64 bits system using Powershell script.
Such as 8000 levels as default
Does anyone have any suggestions?
Thanks in advance for any suggestions
Thanks in advance for any suggestionsTry this.
Function Set-SpeakerVolume{
Param (
[switch]$min,
[switch]$max,
[int]$Percent
$wshShell = new-object -com wscript.shell
If ($min){
1..50 | % {$wshShell.SendKeys([char]174)}
ElseIf ($max){
1..50 | % {$wshShell.SendKeys([char]175)}
elseif($Percent){
1..50 | % {$wshShell.SendKeys([char]174)}
1..($Percent/2) |% {$wshShell.SendKeys([char]175)}
Else{
$wshShell.SendKeys([char]173)
This works in Windows 8.1.
Stolen / Modified from
http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/28/weekend-scripter-cheesy-script-to-set-speaker-volume.aspx, which took me 20 seconds of (apparently) lucky searching.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
Is it possible to monitor State change of a .CSV file using powershell scripting ?
Hi All,
I just would like to know Is it possible to monitor State change of a .CSV file using powershell scripting ? We have SCOM tool which has that capability but there are some drawbacks in that for which we are not able to utilise that. So i would like
to know is this possible using powershell.
So if there is any number above 303 in the .CSV file then i need a email alert / notification for the same.
Gautam.75801Hi Jrv,
Thank you very much. I modified the above and it worked.
Import-Csv C:\SCOM_Tasks\GCC2010Capacitymanagement\CapacityMgntData.csv | ?{$_.Mailboxes -gt 303} | Export-csv -path C:\SCOM_Tasks\Mbx_Above303.csv;
Send-MailMessage -Attachments "C:\SCOM_Tasks\Mbx_Above303.csv" -To “[email protected]" -From “abc@xyz" -SMTPServer [email protected] -Subject “Mailboxex are above 303 in Exchange databases” -Body “Mailboxex are above 303 in Exchange databases"
Mailboxex - is the line which i want to monitor if the values there are above 303. And it will extract the lines with all above 303 to another CSV file and 2nd is a mail script to email me the same with the attachment of the 2nd extract.
Gautam.75801 -
Scripting the capture process in Vivado 2015.1 ILA using the tcl
Hello,
I'm wondering how can I use the TCL script in order to automate the capturing process.
The way that it works so far is that I have to change the condition manually through the GUI, start trigrring, waiting for it to upload the waveform (I really would like to bypass this step!) and then downloading the captured data in .csv file. I've tried the attached script to automate two captures, it didn't work though :( I got same results for test0.csv and test1.csv
any ideas?!
set_property TRIGGER_COMPARE_VALUE eq5'u1 [get_hw_probes state_reg__0 -of_objects [get_hw_ilas hw_ila_1]]
wait_on_hw_ila hw_ila_1
run_hw_ila hw_ila_1
wait_on_hw_ila hw_ila_1
write_hw_ila_data -csv_file d:/pss/test0.csv [current_hw_ila_data]
set_property TRIGGER_COMPARE_VALUE eq5'u10 [get_hw_probes state_reg__0 -of_objects [get_hw_ilas hw_ila_1]]
wait_on_hw_ila hw_ila_1
run_hw_ila hw_ila_1
wait_on_hw_ila -timeout 0 hw_ila_1
write_hw_ila_data -csv_file d:/pss/test1.csv [current_hw_ila_data]
Hello Pratham,
I have tried that before. it works perfectly saving one shot of the ILA. However if you just copy and past, it will fail for the 2nd captured data. (it will save the same thing).
What I'm particularly looking is saving more than one sample, let's say I would like to automate for 1000 captures.
The problem that I've encountered follows as this:
When you try to capture more than one sample, it doesn't stop the trigger and when it does it will save the same thing. in order to stop it it needs to upload the waveform (which is really time consuming and I don't need the tool to upload it in order to captuer the .csv data!) so it will slow down the capturing process.
In ChipScope it was very easy to do that! there was an option called repetitive trigger on. and it was easily capturing down repeatedly with log1, log2, ... and so forth. I'm looking for that! -
How to publish infopath form using powershell script in infopath 2010?
Is any approach for such solution.Hi,
Try below command:
Uninstall the existing solution (based on the from file name):
Uninstall-SPInfoPathFormTemplate -Identity Exampleform.xsn
Install the new solution (based on the from file name):
Install-SPInfoPathFormTemplate -Path C:\Form.xsn
Disable feature on site collection level
Disable-SPInfoPathFormTemplate -Identity "Form.xsn" -Site http://SPSite
Enable feature on site collection level
Enable-SPInfoPathFormTemplate -Identity "Form.xsn" -Site "http://SPSite"
See this blogs for your ref:
http://rgielen.blogspot.in/2010/11/deploy-infopath-2010-forms-with.html
http://mysharepointwork.blogspot.in/2010/09/deploy-infopath-forms-with-powershell.html
Hope it could help
Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
you see a reply being an answer to the question of the thread, click "Mark As Answer -
Using PowerShell 3.0 (And if possible the CIM, not WMI cmdlet), how can I script with | out-file C:\<filename>.txt or .csv option to list all local user accounts & local groups
on remote computers?
Thank You!I don't recall PowerShell V3 introducing anything new to handle local users and groups. You need to use PowerShell V1 methods, using the [ADSI] accelerator and the WinNT: provider. The scripts linked above show this. No need to use WMI (which would probably
be slower).
Here is a script I've used to enumerate all local groups and their members:
$Computer
= "MyServer"
$Computer =
[ADSI]"WinNT://$Computer"
$Groups =
$Computer.psbase.Children | Where {$_.psbase.schemaClassName
-eq "group"}
ForEach ($Group
In $Groups)
"Group: "
+ $Group.Name
$Members
= @($Group.psbase.Invoke("Members"))
ForEach ($Member
In $Members)
$Class
= $Member.GetType().InvokeMember("Class",
'GetProperty', $Null,
$Member, $Null)
$Name
= $Member.GetType().InvokeMember("Name",
'GetProperty', $Null,
$Member, $Null)
"-- Member: $Name ($Class)"
A similar script to enumerate all local users would be:
$Computer
= "MyServer"
$Computer =
[ADSI]"WinNT://$Computer"
$Users =
$Computer.psbase.Children | Where {$_.psbase.schemaClassName
-eq "user"}
ForEach ($User
In $Users)
"User: "
+ $User.Name
Richard Mueller - MVP Directory Services -
Get the daily incremental search crawl information using PowerShell script
Dear Friends ,
I want to get the daily incremental search crawl information using PowerShell script . I need this information into CSV or txt format . Can you please help me with this.
valmikiHi
I have got the below script which worked .
## SharePoint Reference
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
function global:Get-CrawlHistory($url)
trap [Exception] {
write-error $("ERROR: " + $_.Exception.GetType().FullName);
write-error $("ERROR: " + $_.Exception.Message);
continue;
$s =
new-Object Microsoft.SharePoint.SPSite($url);
$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
$h =
new-Object Microsoft.Office.Server.Search.Administration.CrawlHistory($c);
Write-OutPut $h.GetCrawlHistory();
$s.Dispose();
Get-CrawlHistory
-url http://your_site_url/
|
Export-CsvF:\temp\search.csv
valmiki -
Script for change IP static address using Powershell
Hi...
I have a question: I regularly connect me to two different network segments, I want to know how to create a script to map to the network adapter an IP static, in this way could run the corresponding script when I find in each segment of the network using
powershell... the DHCP not permitt in company, is for that reason that I need a way to automate the allocation of IP address static in my network adapter, in this way could change the IP address depending on the network segment that I find.
I hope your comments..
ThanksStart by looking here:
http://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=networking&f%5B0%5D.Text=Networking&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=clientside&f%5B1%5D.Text=Client-Side%20Management
¯\_(ツ)_/¯ -
Generating Audit log report using PowerShell script
Hi All,
I have a requirement to generate the audit log report for a Document library/ custum list. Like
1) Who had downloaded and when for the site
2) Respective username,date time
3) URL of the document / subsite name etc.
if it possible, how to automate the process in weekly basess.
I know it can be done through OOB. Audit log reports
can any one help on this?
Below URL i had for reference : http://social.technet.microsoft.com/wiki/contents/articles/23900.get-audits-for-a-sharepoint-document-using-powershell.aspx
VijaivelHi Peter,
thanks for your reply, URLS are good but am having limited access (i.e) am not a sitecollection Aministrator. So I will not have the access for SiteCollection Administrator section. I having the only one option is Site Collection Web Analytic report. Is
it possible to achive with this option? or anyother work around ?
Suggest any other option for automated notification process
Thanks
Vijaivel -
Is there any way to deploy the Sandbox solution .wsp file to sharepoint 2013 online publishing site using powershell or CSOM or any other way?
Hi,
According to your post, my understanding is that you wanted to deploy sandboxed solution .wsp file to sharepoint 2013 online.
"Add-SPSolution" command is not available in SharePoint Online management shell. So, we cannot use PowerShell to update and deploy a solution in SharePoint Online environment. Meanwhile, here is index of Windows PowerShell for SharePoint Online
cmdlets for your reference:
http://technet.microsoft.com/en-us/library/fp161364.aspx
You can CSOM to deploy solution using helper class from CodePlex. The activation code is as follows: SandboxSolutions.ActivateSolution(siteCollectionURl, cookies, "solution_name.wsp");
About the Client Side Object Model (CSOM), it is a development related issue, we have a specific support channel for the SharePoint developers, so I recommend you go to our MSDN forum for further assistance.
Here is a similar thread for you to take a look at:
http://community.office365.com/en-us/forums/156/t/197404.aspx
In addition, if you would like to upload and activate sandbox solution manually, you can refer to:
http://community.office365.com/en-us/forums/154/p/64010/244496.aspx#244496
Best Regards,
Linda Li
Linda Li
TechNet Community Support
Maybe you are looking for
-
Multimapping???
In multimapping combination of JAVA mapping,ABAP mapping is posiible???? correct answer will be rewarded. Anyone please??? Message was edited by: sam kumar
-
Consider the following scenario: worker measures air flow outside of machine filter and manually creates measurement documents. Upper and lower threshold limits are 5 and -5 units. What should be the best way to utilize SAP PM to analyze these measur
-
Some queries on RAC database 11g
We have RAC oracle database 11g and we don't want to overburden the OLTP instance. So we thought of bringing the changed data from the OLTP instance to reporting instance via logical standby or streams and log the changes with the help of using total
-
My N80 seems to be missing the call divert software, how do I re-install it.
-
How do i register an older version of photoshop cs2
i need help