Tag Info

New answers tagged

0

I guess by now you MIGHT have found an answer to this phenomena. I ran upon this post after encountering the same problem...I could load the assembly, and view the types contained in the assembly, but was unable to instanciate a instance of it from a static class. Was it EFTIDY. Tidy, EFTidyNet.TidyNet.Options or what? Ooooo ...


1

This powershell blog entry goes into detail about how powershell determines if a script is remote for the RemoteSigned executionpolicy. I've found that even when the policy is set to Unrestricted, you will still get the prompt to execute if powershell thinks the script is remote. So as tchester said, this may be related to your IE security zones. I think I ...


0

I tried your function, and i get an empty result too. The problem is what you do with your software parameter: you do not have to convert it to the variable $soft, you can directly use the $software-Variable with the astersik in the Where-Object clause. Just use: Get-ItemProperty | Where-Object {$_.DisplayName -like "*$software*"} | Select-Object ...


4

Get-ADObject only returns a subset of attributes from Active Directory. You can speficy additional attributes with the Properties parameter: $ADObjectSplat = @{ Server = 'localhost:389' SearchBase = 'CN=Academics,CN=Portal,O=Jenzabar,C=US' Properties = 'jenzabar-ICSNET-GenericFlags' } Get-ADObject @ADObjectSplat | Where-Object { ...


4

You cannot use a partial wildcard in an LDAP filter on a DN attribute such as distinguishedName. From Active Directory: LDAP Syntax Filters The wildcard character '*' is allowed, except when the (AD Attribute) is a DN attribute. Examples of DN attributes are distinguishedName, manager, directReports, member, and memberOf. If the attribute is DN, then ...


2

use: Add-NTFSAccess -Path 'C:\MyFolder' -Account BUILTIN\IIS_IUSRS -AccessRights FullControl or just Add-NTFSAccess -Path 'C:\MyFolder' -Account IIS_IUSRS -AccessRights FullControl IIS_IUSRS is a special internal group that you shouldn't/can't prefix with the computer or domain name.


1

Concerning local enviremental variables or paths in a powershell script, it is not important where the script file is located, but where it is executed. Meaning, you just have to be shure that the paths and variables exist on the machine you want to execute the script on. Powershell will then use "his" local C:\Windows\System32\someprogram.exe, and not the ...


0

The short answer is no, there is no way that you can only close one document now if we can close the whole program then we have a lot of options. The only thing you could do is delete the lock file on the workbook and then someone else can edit it.


0

Old thread, but for anyone still searching try this: Get-QADUser -samaccountName *type-in-username-here* | Remove-QADMemberOf -RemoveAll For example: Get-QADUser -samaccountName SmithJ | Remove-QADMemberOf -RemoveAll


0

A more complete answer for those who use unmodified machine.config -files. 1) Check your powershell version with $psversiontable.psversion.tostring() 2) Move to folder that corresponds your powershell version C:\Windows\Microsoft.NET\Framework*\*\CONFIG 3) Modify machine.config. Between following lines: </configSections> <configProtectedData ...


0

Try using the -config parameter. Please check out the TechNet page for more details on the options included in certreq.exe and certutil.exe. https://technet.microsoft.com/en-us/library/dn296456.aspx I know I am too late to answer this, but hopefully this will help someone else.


0

I finally managed to pull off a Google search that provided useful information. It was all due to not having installed KB2883200. Ref: The PowerShell proivder MSFT_RoleResource does not contain the corresponding MOF file


2

Explicit parameter type casting The second example you posted (explicitly casting the parameter variable) is the correct way to go: Function Test-Me { Param( [System.Collections.ArrayList] $Properties = @("red","blue","green") ) Write-Host $Properties.GetType().FullName if("Orange" -notin $Properties){ ...


0

I used a custom object to organize the list with 3 properties: filename, full date, date only. The date values are cast and stored as actual [datetime] vars. With that true time, you can use native powershell grouping and sorting functions to get the most recent file for each day. I'm located in the US, where my OS defaults to mm/dd/yy. If your region has ...


1

You don't actually want to escape your wildcard character. Because then you just end up comparing to the wildcard character, while what you want to do is find out if your string contains an asterisk. The way to do this is by matching on a regular expression. 'www.website.*' -match '\*'


0

If you installed the 2012 PowerShellTools.msi, then you need to reference SqlServerCmdletSnapin110 (you are specifying SqlServerCmdletSnapin100). Also - it appears sometimes you have to register the DLLs even after running the Power ShellTools.msi install. Take a look at this post for details: ...


0

I think what you're after is the following: $bindings = @( @{protocol="http";bindingInformation=$ip + ":"+ $port + ":" + $hostRecord}, @{protocol="https";bindingInformation=$ip + ":"+ $port + ":" + $hostRecord}, ) Basically you need to pass an array of bindings in. More helpful information here - ...


0

I think you need new approach. If parse your file to hashtable then you will be able to receive last date+time by date. # I use string variable for debugging $temp = "testdatabase-21-07-15-12-00 testdatabase-21-07-15-18-00 testdatabase-21-07-15-19-00 testdatabase-21-07-15-20-00 testdatabase-21-07-15-21-00 testdatabase-21-07-15-23-00 ...


2

Get-ChildItem waits path from pipeline, not a computer name. First thing that you need is get computer object with it's attributes (name, type, description) from CSV file: Get-Content -Path "c:\temp\servers.csv" | ConvertFrom-Csv | ForEach-Object -Process { Write-Host "Server name: " -NoNewline Write-Host $_.Name } Next you need to execute ...


0

What error are you getting? Is it working on some users, failing on others? Are you sure all the employees ALREDY have employee ID's? If there are users without EID's, the code mod below would handle the error more gracefully. You may want to get-user based on samaccountname which is a required field (EID is not required) $user = Get-ADUser -Filter ...


3

First, create an object with all the data like this: $Path = "location of csv" $Users = Get-Content -Path $Path | ConvertFrom-CSV Then just iterate through the rows of data like this: $Users | %{ #Set ad user stuff using $_.Attribute }


3

Assuming you are working with Exchange mailboxes (it's not terribly clear in your question) Set-Mailbox is your best friend. You're going to need a for-each loop to retrieve the user's attributes and properly set the destination SMTP address. If you have a whole OU of users to apply changes to, use something like: Get-Mailbox -OrganizationalUnit ...


0

If you are happy with msdeploy, you can just use it without installing it. Create a temporary folder on the server, find an existing installation on Web Deploy 3.5 and copy the files from: C:\Program Files\IIS\Microsoft Web Deploy V3 You can skip all the language folders you don't need. Navigate into your new directory as elevated admin and just use ...


3

If you want all the jpg and xml files into one folder, you could use Get-ChildItem -Include: Get-ChildItem -Include *.jpg,*.xml -Recurse | ForEach-Object { Copy-Item -Path $_.FullName -Destination D:\Users\MS5253\Desktop\Lots }


0

By using the add-member cmdlet we keep the PsObject and add the group information that we need to export. Keeping the data in a PsObject makes it easy to output. $adGroups = Get-ADGroup -Filter * foreach ($grp in $adGroups){ Write-Host "Processing $($grp.DistinguishedName)" #get the memebers of the group $grpMembers = Get-ADGroupMember $grp | ...


0

The problem with doing it this way around is that your results are not guaranteed to be unique. You could and probably do have users who are members of multiple groups. Should this happen, you'll find you have duplicate entries in your report. Another problem is that you will end up with other objects such as computers and groups in your results. It is ...


1

Due to shortness of time I'll answer like so: You could work along the lines of first ferreting out all the groups into a variable similar to: $Groups = Get-ADGroup ... Then you iterate over the $Groups object in an fashion similar to: $Groups | Foreach-Object ` { $CurrentGroup = $_ $Members = Get-ADGroupMember -Identity $CurrentGroup ... ...


2

Sorry I cannot add comments yet. Are you able to browse to the URL normally without requiring credentials? If authentication is enabled on your site, you might want to modify your web.conf file and exclude the URL you are trying to access.


1

In OWA, normal invitations should not involve you picking the Calendar in the interface. You only have this permission in OWA because you have FullAccess to the entity assigned in Exchange, and that's now how bookable resources are designed to work. Normally when scheduling resources, you would instead set the Location as a Room from the Room List or ...


0

You would want to use a real-time event log monitoring solution, there are a plethora of options available on the market today, including many free and open source options. If you are looking for something free and easy to install, I'd recommend the free edition of our monitoring product EventSentry, "EventSentry Light". It's developed for Windows, monitors ...


0

We use the PRTG monitoring application (100 sensors free if you want to try it) and we get SMS notifications if our customised limits are reached, we also plot live graphs of certain key statistics on a screen for our Core Team technicians to constantly check with large green - orange - red blocks for warnings.


0

Well, this command worked: route add 172.30.200.0 mask 255.255.255.0 0.0.0.0 IF 28 -p The -p was throwing it off, it has to be at the end of the command for whatever reason.


1

It appears that Orchestrator only uses PowerShell v2 by default. This can be changed with a registry hack: http://www.scsm.se/?p=1458 I've done this on my server and it works for me.


1

Since you asked for PowerShell, you can use WMI and set it via the Win32_NetworkAdapterConfiguration provider: Get-WMIObject win32_NetworkAdapterConfiguration This will list the adapters you have, then you can select a specific one: $adapter = Get-WMIObject win32_NetworkAdapterConfiguration -Filter "Index=X" # or use PowerShell filtering $adapter = ...


2

I tried to solve the problem with Get-Member, as suggested by mortenya in the comment section, but with no luck. Finally, I ended up with directly editing the WSUS database to change the description. Be careful! Use my solution only if you're absolutely sure what you're doing. Editing the database your server is depending on, is like performing an open ...


0

Due to this site I tried to add -Identity at the end of the line, as in the line on the top. This worked for me. Thanks! BTW:I excluded also some other users, because I don't know exactly what they do, am afraid to delete too much. I also added -confirm:$false. Get-MailboxPermission -Identity $TheUser | where {($_.User -notlike "NT AUTHORITY\SELF") -and ...


3

It's not possible to do this via PowerShell (the docs aren't explicit about this, but you can see Server 2008 is not listed at the top of the page), but you can use netsh: netsh interface ip add dnsserver "Local Area Connection" 10.0.0.1


2

I've used PowerShell studio and can recommend it, but I have no other product to compare it to as it's the only software of it's kind I've used. It's pretty solid and does what I need it to do. Whether this project and/or the software will be worth your money, time and effort is subjective, and is based on your needs and budget.


0

A GPO doesn't have a "run immediately" tool in it. However you can add things to the run once area, or the logon script area. Another spot to add executables to run is to the task scheduler. Another option is to install something from an MSI package. These can all be done without the user seeing anything on their screen. Can you give more details of what ...


1

For simplicity's sake, Is there a way to simply check if the password has never been changed? That way, I could run a scheduled task at the end of the day disabling any account with this property? – Jacksgrin I see this question is quite old, however, comparing the values of the Created or CreatedTimeStamp properties, along with the PasswordLastSet ...


0

As indicated here and here, the volrest commandline utility can be used to browse and restore shadow copies (previous versions) of files. It is available from the Windows 2003 reskit.



Top 50 recent answers are included