Tag Info

Hot answers tagged

8

You have 2 problems with your code: 1) IF only does a numeric comparison if the string on both sides evaluates to a number. Your left side is numeric, but your right side has quotes, which forces the entire comparison to be done using string semantics. Numeric digits always sort higher than a quote character, so it always reports TRUE. As austinian ...


7

Run dcdiag and check replication to ensure that your AD is healthy Safely migrate all FSMO roles to other servers Ensure that at least one other DC is also a GC Run dcdiag and check replication to ensure that your AD is healthy again Assuming you don't have any other applications on the DC, particularly non-AD-integrated DNS, you should be good to ...


4

Windows server downtime for updates is inevitable. Service downtime is avoidable, however. The key is to realize that downtime needs to be measured by service availability, not the status of individual servers. For your SQL Server instance, your best bet is to implement some form of multi-server instancing. One technique that Microsoft allows in SQL Server ...


3

Take out the "s from around the number, and the script almost works correctly. Using the "s forces a string comparison instead of a numerical comparison. As dbenham notes, CMD only stores (and compares) numbers as 32-bit signed ints. Since we're checking for GB, we can reasonably ignore several of less significant digits. If we remove the last 6 digits, ...


2

Azure Automation runbooks are just PowerShell Workflows, which can be run in the PowerShell ISE on your local machine as well. The only thing special about runbooks compared to PowerShell Workflows is in runbooks you can use the "Automation activities" (Get-AutomationVariable, Get-AutomationPSCredential, etc). We don't have a blog post about this out for ...


2

Look at the "Caveats & Legal Disclaimers" section on http://cyber-defense.sans.org/blog/2011/10/25/windows-firewall-script-block-addresses-network-ranges and then look at how their Import-Firewall-Blocklist.ps1 script works.


1

There's no such cmdlet for that http://technet.microsoft.com/en-us/library/jj821822(v=sc.20).aspx But if you export settings for endpoint protection in xml file and place it somewhere in your network you can push installation with powershell in the following way: $computers = Get-Content "C:\computer.txt" foreach ($computer in $computers) { #The ...


1

Just mentioning a trick I do not see mentioned here yet. Take this file for example: C:\Folder1\Really Long Path\Such Recursion\So Deep\Wow\Still Going\I will run out of ideas soon\I have organizational problems\Obsessive compulsive subdirectory disorder\Here is a guid for no good reason\936DA01F-9ABD-4d9d-80C7-02AF85C822A8\Almost there\Tax ...


1

Mapped drives are usually not available to system processes since the mapping is tied to an interactive user session. Try using a UNC path to the file instead.



Only top voted, non community-wiki answers of a minimum length are eligible