Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Powershell

16K

Solutions

7K

Contributors

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.

Share tech news, updates, or what's on your mind.

Sign up to Post

$computers = Get-content 'C:\Powershell Projects\lastconnect\New Text Document.txt'
Foreach ($computer in $computers)
 {Copy-Item -Path '\\$Computer\Program Files (x86)\Quest Software\Toad for Oracle 10.5\ClientFiles\QSAuth11.key' -Destination 'c:\programs\powershell projects\$computer.txt'}

Open in new window


Afternoon,

So the script above, I know I can't put the variable in like that, but I can't find or figure out how to get it to work the way I need it to.

Could you help at all?

Cheers
Alex
0
Evaluating UTMs? Here's what you need to know!
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

Dear Script Gurus,

I have a demand where I need to get a report in csv foramt with a list of users who has particular value in an extenstionAttribute and should have 500 MB mailbox size in our concern...

Example:

User1
ExtensionAttribute3:XXXX
ProhibitSendReceiveQuota     : 500 MB

Would you please help with a PowerShell Script to get this report generated.. Thanks...
0
Hi all,

We utilize Exchange 2013 and are trying to setup an iPad as a replacement for a laptop in the field. However, the one hurdle we are facing is how the user can reset their password when it expires through an iPad. We do not want them locked out when they are on the road and only have the iPad.

Suggestions?
0
hello,

we have a job every night turn on our active directory to create contacts without activate exchange contact.

so i need a script i can use with scheduled task to go in specific OU (included all sub OU) and activate exchange contact for all contact.

thanks for help
0
A user erroneously deleted ten folders containing only contacts, from the companies Public Folders mailbox. Restoring the folders with Outlook or Powershell brings the folders back.....but no contacts! After going back and forth with support over the last five days, they say that it was all permanently deleted. They claim the retention policy does not include the Public Folder mailbox and they are gone forever. I find this a bit hard to believe. I was notified by the user the same day it happened so it has only been five days now. Is Office 365's backup of PF really that weak?
0
In Outlook there is a GPO to empty deleted items with leaving Outlook.
What about Shared Mailbox : How to achieve this ?

GPO ? or PowerShell ? I did not find anything about this. (exchange 2016 on premises)

Tks.
0
I have these backup files:
Social_DB_backup_2018_01_07_071010_0794131.BAK
SharePoint_Config_backup_2018_01_07_071010_0326524.bak
BDC_Service_DB_backup_2018_01_07_071010_0482393.bak
 And so on....
I want to rename them
Social_DB_backup.bak
SharePoint_Config_backup.bak
BDC_Service_DB.bak
how can I go recursively through file directory and rename all of the backups?
Thanks!
0
Dear experts,
When I run this command and at least 2 mailboxes are found  the result is an array...

$ArrSMList = get-mailbox | Get-MailboxPermission -user $strUser | ?  {($_.AccessRights -match "FullAccess") -and -not ($_.User -like "NT AUTHORITY\SELF")} | Get-user | Select DisplayName,SamaccountName,Identity

I may ask for $arrSMList.Count or even ($I = 0 to .count)
Write-Host "$ArrSMList[$I]" + $ArrSMList[$I].DisplayName

BUT when only ONE is found NO WAY, I can't access the .Count cause this is not an array...

I would like to have EVEN IF only 1 is found  as return an array.
How can I transform this to an array if ONLY ONE is found ?

tks.
0
Hello,

Does anyone know if it's possible to disable Integrated Apps for an Office365 Tenant via powershell?  If so, can you give me the command as I can't find a reference for it.

See that attachment for reference.  (Settings> Serives & Addins> Integrated Apps)

Thank you
Integrated-Apps.PNG
0
We are running an exchange upgrade project (exchange 2007 - Exchange 2012), 1000 users in 4 different countries, single domain, single forest.
I need assistance to find out who’s account in AD is not inheriting permissions from the parent, so it will be good to find out permissions of accounts with Inheritance enabled, vs Inheritance disabled to work out whether the differences have any impact in our environment. So I guess a power shell script can report/output this kind of information?


Thanks.
0
Get free NFR key for Veeam Availability Suite 9.5
LVL 1
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Hi,

I data into SQL database usage of an RDS server.
 Now I would like to show this in an HTML page, using power shell. F.e.  4 th January 8 am, 30 users, 10 am 50 users etc. then the sale for next days whole year round.
 I can create the HTML via power shell, but how to build/show the graph?

J.
0
Trying to create a List called 'Contact List' on a SharePoint site, https://mainsite.sharepoint.com/sites/Client/List/ContactList, that has a number of columns (Phone -single line of text w/ length 12, Notes - multiple lines of text, Position - managed metadata, Active -
 Yes/No, Sign Date - Date (Date Only))  and I can create the list via PowerShell PnP but I cannot create the columns no matter what I have tired.  I am using SharePoint Online and Powershell Pnp.  I cannot find one place with an example that will work.  Does anyone know of a web site of examples or have an example they can share?

Thanks,
John
0
PLEASE DELETE
0
Hello experts,

I want to delegate access (for a group) to an attribute called userprincipalname, but this attribute does not show in delegate wizard in ADUC. How would I delegate/grant access.

Your assistance is appreciated.
0
Hi

We use exchange 2007 and planning  to migrate to O365 and we have a database called staffdatabase.
We have 400 staff and would like to know the mail box size of individual users.
Is there a way to find the mailbox size of every individual users.

Any tutorials will be great.
Thanks
0
Experts out there,
I am trying to run the speculationcontrol script at my desktop and  getting the following error.
I downloaded from Microsoft site and saved it in ADV180002.
I ran all those commands one at a time


PS C:\adv180002\SpeculationControl> Import-Module .\SpeculationControl.psd1
Import-Module : The 'C:\adv180002\SpeculationControl\SpeculationControl\SpeculationControl.psd1' module cannot be impor
ted because its manifest contains one or more members that are not valid. The valid manifest members are ('ModuleToProc
ess', 'NestedModules', 'GUID', 'Author', 'CompanyName', 'Copyright', 'ModuleVersion', 'Description', 'PowerShellVersion
', 'PowerShellHostName', 'PowerShellHostVersion', 'CLRVersion', 'DotNetFrameworkVersion', 'ProcessorArchitecture', 'Req
uiredModules', 'TypesToProcess', 'FormatsToProcess', 'ScriptsToProcess', 'PrivateData', 'RequiredAssemblies', 'ModuleLi
st', 'FileList', 'FunctionsToExport', 'VariablesToExport', 'AliasesToExport', 'CmdletsToExport'). Remove the members th
at are not valid ('RootModule'), then try to import the module again.
At line:1 char:14
+ Import-Module <<<<  .\SpeculationControl
    + CategoryInfo          : InvalidData: (C:\adv180002\Sp...ionControl.psd1:String) [Import-Module], InvalidOperatio
   nException
    + FullyQualifiedErrorId : Modules_InvalidManifestMember,Microsoft.PowerShell.Commands.ImportModuleCommand
0
Hello,

I am trying to write script but I have no enough powershell experience to do that. I would like to have a loop until a condition is true.

For my project I need to check if a CD or dvd inserted is blank or not. I found I can check with "Get-Volume | select -property operationalStatus | Where-Object {$_.operationalStatus -eq "Unknown"} " When media is blank operationalstatus is alway Unknown.

I have started to write like that (see below) but it does not work. I am not surprised I do not know how to do that :-)


I would like to continue to show a warning until blank CD is inserted and then continue to action. I do not know how to build a loop until the condition is true.

Thank you in advance for your help and sorry for my bad english. I am a french who did not work during english lessons at school :-)

$OS = Get-Volume | select -property operationalStatus | Where-Object {$_.operationalStatus -eq "Unknown"} 

Do{

If ($OS.operationalStatus -eq  "Unknown")

{ 
 
Start-Process -Wait "C:\Program Files (x86)\softwarexxx"

 
}
Else {

[System.Windows.Forms.MessageBox]::Show("CD/DVD inserted is not blank")
Start-Process -Wait "C:\Program Files (x86)\CDBurnerXP\cdbxpcmd.exe" -ArgumentList "--eject [ -device:1 ]"
[System.Windows.Forms.MessageBox]::Show("Please insert a blank CD/DVD and click OK")
Start-Process -Wait "C:\Program Files (x86)\CDBurnerXP\cdbxpcmd.exe" -ArgumentList "--wait-for-disc [ -device:$Devicenumber ]"
}

}
Until ($OS -eq  "Unknown")

Open in new window

0
I am using MS exchange 2013. I have to change authentication type format from Domain\Username to only Username. When I visit at OWA of server and click on Authentication, the page is just loading. How can I fix this? Restart of IIS did not help. However, I have already made the same changes using Powershell  and same is working fine. Just facing issue with GUI only. Need assistance.

Set-owavirtualdirectory -identity "owa (default web site)" -LogonFormat UserName -DefaultDomain "<domain name>"
Error.jpg
0
hello experts
i am using powershell to start up plink.exe ssh to my network device and promote some commands, see below please.
$Plink = (${env:ProgramFiles} + "\PuTTy\plink.exe")
$commands = "d:\commands.txt"
& $Plink 192.168.18.2 -l admin -pw ******** -m $commands

and below is the content of commands.txt
conf t
int gig 0/0
shu

but i can't get it works, if you put only one command in the txt file or without -m parameter with only one command, it works, could you help me fix it and let me know what is the correct command text file format should be?

thank you
0
Making Bulk Changes to Active Directory
LVL 7
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

0
I have a PowerShell script that collects data from Active Directory and puts it into a nicely formatted Word Document and appends the date at the end of the file name when it is saved so I can see the different files and when they were ran.
I then run the Document Merge in Word to save the file with the differences indicated between the last two times the script ran.
***I want to automate this process.***

I don't want a third party application to do this.  I want to be able to do this with either PowerShell or VBS or a VBS called out from with in a PowerShell Script.
0
Looking for a script to generate a list of Computers and IP in the entire domain, preferably in a delimited format.
Thanks in advance.
0
I have enabled audit logging for few mailboxes, need to know who took the mailbox ownership or accessed it with an alert mail or daily report. I tried checking the built in Non-owner mailbox report doesnt shows when i tried to take control with some test accounts. Is there any powershell script which helps to identify and alert per day or immediately.

Appreciate your help!

Note: Customer want to achieve it with native tool and no third party tool needed.
0
I'm having an issue with moving large mailboxes between two exchange 2010 servers on the same network over the wan. Many of these mailboxes are at around 50GB, exchange won't let me move them via GUI. Need to do this via power shell WITH a higher than 50 corrupt message threshold.

I'm trying to move UserA's mailbox from ServerA-DatastoreA to ServerB-DatastoreB.

Thanks!
Capture.JPG
0
Hi,

Please I need a script (vbscript or Powershell)  to export the following attribute from two "OU" in active directory,
After to run the script we obtein a output file .csv (encode in UTF-8 )

I want to display in the output file the following fields:
"Account","Disabled","First Name","Last Name","Mail"

*Disable = True or False
"""ou=Accounts,ou=Sales,ou=USA,dc=Dom,dc=local"",""DC1Serv.dom.local"""
"""ou=Accounts,ou=Marketing,ou=USA,dc=Dom,dc=local"",""DC1Serv.dom.local"""

Best regards,
0

Powershell

16K

Solutions

7K

Contributors

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.